Constructs a spline \( s(l) \) with constant velocity, i.e. \(
\frac{ds(l)}{dl} \equiv 1\). \( l \) acts as the length alongisde the spline. It works by using tk::spline to construct a cubic spline which depends on another arbitrary parameter \( x \) and then construct an additional spline to convert from \( x \to l \equiv l(x) \).
More...
#include <BSMPT/utility/const_velocity_spline.h>
|
|
| cvspline () |
| | Default constructor.
|
| |
| | cvspline (const std::vector< std::vector< double > > &phipath_in) |
| | Construct a new cvspline object.
|
| |
| | cvspline (const std::vector< std::vector< double > > &phipath_in, int input_num_inter) |
| | Construct a new cvspline object.
|
| |
|
void | initialize () |
| | initialize the constant velocity spline using the given path
|
| |
| void | add_point (const double &p, const std::vector< double > &new_vev, const bool &compile=true) |
| | introduce a new point on the knot list
|
| |
| std::vector< double > | deriv (int order, double x) |
| | derivative of the constant velocity spline in \( x \)
|
| |
| std::vector< double > | dl (double l) |
| | first derivative of the constant velocity spline in \( l \)
|
| |
| std::vector< double > | d2l (double l) |
| | second derivative of the constant velocity spline in \( l \)
|
| |
| std::vector< double > | operator() (double l) const |
| | value of the constant velocity spline at \( l \)
|
| |
|
void | print_path () const |
| | print the current knots of the spline
|
| |
| void | save_path (const std::string &file_name, const bool &header=true) |
| | save the knots of the splien into a file
|
| |
|
|
int | dim |
| | Dimension of the VEV space.
|
| |
|
int | num_points |
| | Number of points in the path (knots)
|
| |
|
int | num_inter |
| | Number of point from x to l (and viceversa)
|
| |
|
tk::spline | x_to_l |
| | Spline to convert from linear length to spline length.
|
| |
|
tk::spline | l_to_x |
| | Spline to convert from spline length to linear length.
|
| |
|
float | linL |
| | Linear length of the (spline) path.
|
| |
|
float | L |
| | True length of the (spline) path.
|
| |
|
std::vector< double > | lin_lengths |
| | We need a parameter, so I used the linear lengths (not the path spline length) as parameter, this is not optimal as the velocity will not be 1.
|
| |
|
std::vector< double > | vev_position |
| | Position of the VEV list "lin_lengths" using spline length.
|
| |
|
std::vector< tk::spline > | splines |
| | Vector of each 2D splines (x = linear length (not important, must be increasing), y = vev_i)
|
| |
|
std::vector< std::vector< double > > | transposed_phi |
| | Transpose of the path given, easier for calculations.
|
| |
|
std::vector< std::vector< double > > | phipath |
| | // List of VEVs paths
|
| |
|
| double | lin_abs_deriv (double x) |
| | derivative in \( x \)
|
| |
| double | Simpson_step (double t0, double t1) |
| | Integrates from \( t_0 \) to \( t_1 \) using a single Simposons' 3/8 integration step.
|
| |
|
|
std::vector< double > | list_x |
| | List of x for linear lengths division.
|
| |
|
std::vector< double > | list_l |
| | // List of l for spline lengths division
|
| |
Constructs a spline \( s(l) \) with constant velocity, i.e. \(
\frac{ds(l)}{dl} \equiv 1\). \( l \) acts as the length alongisde the spline. It works by using tk::spline to construct a cubic spline which depends on another arbitrary parameter \( x \) and then construct an additional spline to convert from \( x \to l \equiv l(x) \).
◆ cvspline() [1/2]
| cvspline::cvspline |
( |
const std::vector< std::vector< double > > & |
phipath_in | ) |
|
Construct a new cvspline object.
- Parameters
-
| phipath_in | knots of the path |
◆ cvspline() [2/2]
| cvspline::cvspline |
( |
const std::vector< std::vector< double > > & |
phipath_in, |
|
|
int |
input_num_inter |
|
) |
| |
Construct a new cvspline object.
- Parameters
-
| phipath_in | knots of the path |
| input_num_inter | number of interpolations between \( x \) and \( l
\) |
◆ add_point()
| void cvspline::add_point |
( |
const double & |
p, |
|
|
const std::vector< double > & |
new_vev, |
|
|
const bool & |
compile = true |
|
) |
| |
introduce a new point on the knot list
- Parameters
-
| p | parameter of the point |
| new_vev | value of the knot |
| compile | initialize after point is added? |
◆ d2l()
| std::vector< double > cvspline::d2l |
( |
double |
l | ) |
|
second derivative of the constant velocity spline in \( l \)
- Parameters
-
| l | where to calculate the derivative |
- Returns
- std::vector<double> result
◆ deriv()
| std::vector< double > cvspline::deriv |
( |
int |
order, |
|
|
double |
x |
|
) |
| |
derivative of the constant velocity spline in \( x \)
- Parameters
-
| order | order of the derivative |
| x | where to calculate the derivative |
- Returns
- std::vector<double> result
◆ dl()
| std::vector< double > cvspline::dl |
( |
double |
l | ) |
|
first derivative of the constant velocity spline in \( l \)
- Parameters
-
| l | where to calculate the derivative |
- Returns
- std::vector<double> result
◆ lin_abs_deriv()
| double cvspline::lin_abs_deriv |
( |
double |
x | ) |
|
|
private |
derivative in \( x \)
- Parameters
-
- Returns
- double
◆ operator()()
| std::vector< double > cvspline::operator() |
( |
double |
l | ) |
const |
value of the constant velocity spline at \( l \)
- Parameters
-
- Returns
- std::vector<double>
◆ save_path()
| void cvspline::save_path |
( |
const std::string & |
file_name, |
|
|
const bool & |
header = true |
|
) |
| |
save the knots of the splien into a file
- Parameters
-
| file_name | name of the file |
| header | print the names of the VEVs in the first column? |
◆ Simpson_step()
| double cvspline::Simpson_step |
( |
double |
t0, |
|
|
double |
t1 |
|
) |
| |
|
private |
Integrates from \( t_0 \) to \( t_1 \) using a single Simposons' 3/8 integration step.
- Parameters
-
| t0 | lower limit |
| t1 | upper limit |
- Returns
- double value of the integral
The documentation for this class was generated from the following files: