![]() |
QMCPACK
|
Perform One-Dimensional linear spline Interpolation. More...
Inheritance diagram for OneDimLinearSpline< Td, Tg, CTd, CTg >:
Collaboration diagram for OneDimLinearSpline< Td, Tg, CTd, CTg >:Public Types | |
| using | base_type = OneDimGridFunctor< Td, Tg, CTd, CTg > |
| using | value_type = typename base_type::value_type |
| using | point_type = typename base_type::point_type |
| using | data_type = typename base_type::data_type |
| using | grid_type = typename base_type::grid_type |
Public Types inherited from OneDimGridFunctor< Td, Tg, CTd, CTg > | |
| using | value_type = Td |
| the type of the value on a grid More... | |
| using | point_type = Tg |
| the type of the grid value More... | |
| using | data_type = CTd |
| the type of the containers Y, dY and d2Y More... | |
| using | grid_type = OneDimGridBase< Tg, CTg > |
| the grid type More... | |
| using | this_type = OneDimGridFunctor< Td, Tg, CTd, CTg > |
| the type of this class More... | |
Public Member Functions | |
| OneDimLinearSpline (const grid_type *gt=0) | |
| OneDimLinearSpline (point_type ri, point_type rf) | |
| template<class VV > | |
| OneDimLinearSpline (grid_type *gt, const VV &nv, bool pbc=false) | |
| OneDimLinearSpline< Td, Tg, CTd, CTg > * | makeClone () const |
| template<class IT > | |
| void | assign (IT d_first, IT d_last) |
| point_type | rmax () const |
| value_type | splint (point_type r) const override |
| evaluate the value at r More... | |
| void | locate (point_type r, int &k, point_type &rfrac) |
| evaluate the value at r using a binary search on a grid More... | |
| value_type | f (int k, point_type rfrac) |
| evaluate the value at r=(k + rfrac)*delta More... | |
| value_type | splint (point_type r, value_type &du, value_type &d2u) const override |
| evaluate the value at r More... | |
| void | spline (int imin, value_type yp1, int imax, value_type ypn) |
| evaluate the spline coefficients More... | |
| void | spline () |
Public Member Functions inherited from OneDimGridFunctor< Td, Tg, CTd, CTg > | |
| OneDimGridFunctor (std::unique_ptr< grid_type > gt=std::unique_ptr< grid_type >()) | |
| constructor More... | |
| OneDimGridFunctor (const OneDimGridFunctor &a) | |
| virtual | ~OneDimGridFunctor ()=default |
| template<typename TT > | |
| void | resetParameters (const TT &active) |
| void | setNumOfNodes (int n) |
| set the number of nodes More... | |
| int | getNumOfNodes () const |
| return the number of nodes More... | |
| value_type * | data () |
| return the grid data More... | |
| const value_type * | data () const |
| assign the grid data More... | |
| int | size () const |
| return the number of data points More... | |
| void | resize (int n) |
| resize the number of data points More... | |
| const grid_type & | grid () const |
| return the radial grid More... | |
| grid_type & | grid () |
| assign a radial grid More... | |
| value_type | operator() (int i) const |
| returns a value More... | |
| value_type & | operator() (int i) |
| asign a value at i More... | |
| point_type | dh () const |
| return the address of the values More... | |
| point_type | r (int i) const |
return the grid point at index i More... | |
| point_type | dr (int i) const |
return More... | |
| value_type | f (point_type r) |
| Evaluate the function and its derivatives, store the derivatives. More... | |
| value_type | df (point_type r) |
| Evaluate the function and its derivatives, store the derivatives. More... | |
| value_type | evaluate (point_type r, point_type rinv) |
| Evaluate the function value only. More... | |
| value_type | evaluateAll (point_type r, point_type rinv) |
| Evaluate the function and its derivatives. More... | |
| value_type | evaluate (point_type r, point_type rinv, value_type &du, value_type &d2u) |
| Evaluate the function and its derivatives. More... | |
Public Attributes | |
| int | First |
| int | Last |
| value_type | ConstValue |
| point_type | r_min |
| point_type | r_max |
| point_type | delta |
| point_type | delta_inv |
| data_type | m_Y1 |
| value_type | d2Y |
| store the second derivative of the function More... | |
| value_type | dY |
| store the derivative of the function More... | |
| std::unique_ptr< grid_type > | m_grid |
| pointer to the radial grid More... | |
| data_type | m_Y |
| data for the function on the grid More... | |
| value_type | Y |
| store the value of the function More... | |
Public Attributes inherited from OneDimGridFunctor< Td, Tg, CTd, CTg > | |
| std::unique_ptr< grid_type > | m_grid |
| pointer to the radial grid More... | |
| value_type | Y |
| store the value of the function More... | |
| value_type | dY |
| store the derivative of the function More... | |
| value_type | d2Y |
| store the second derivative of the function More... | |
| data_type | m_Y |
| data for the function on the grid More... | |
| int | NumNodes |
| the number of nodes More... | |
Perform One-Dimensional linear spline Interpolation.
Only valid with linear grid.
Definition at line 30 of file OneDimLinearSpline.h.
| using base_type = OneDimGridFunctor<Td, Tg, CTd, CTg> |
Definition at line 33 of file OneDimLinearSpline.h.
| using data_type = typename base_type::data_type |
Definition at line 36 of file OneDimLinearSpline.h.
| using grid_type = typename base_type::grid_type |
Definition at line 37 of file OneDimLinearSpline.h.
| using point_type = typename base_type::point_type |
Definition at line 35 of file OneDimLinearSpline.h.
| using value_type = typename base_type::value_type |
Definition at line 34 of file OneDimLinearSpline.h.
|
inline |
Definition at line 56 of file OneDimLinearSpline.h.
References OneDimLinearSpline< Td, Tg, CTd, CTg >::r_max, and OneDimLinearSpline< Td, Tg, CTd, CTg >::r_min.
|
inline |
Definition at line 65 of file OneDimLinearSpline.h.
|
inline |
Definition at line 68 of file OneDimLinearSpline.h.
References OneDimLinearSpline< Td, Tg, CTd, CTg >::assign(), OneDimLinearSpline< Td, Tg, CTd, CTg >::r_max, OneDimLinearSpline< Td, Tg, CTd, CTg >::r_min, OneDimGridBase< T, CT >::rmax(), and OneDimGridBase< T, CT >::rmin().
|
inline |
Definition at line 81 of file OneDimLinearSpline.h.
References copy(), OneDimLinearSpline< Td, Tg, CTd, CTg >::delta, OneDimLinearSpline< Td, Tg, CTd, CTg >::delta_inv, OneDimGridFunctor< Td, Tg, CTd, CTg >::m_Y, OneDimLinearSpline< Td, Tg, CTd, CTg >::r_max, and OneDimLinearSpline< Td, Tg, CTd, CTg >::r_min.
Referenced by OneDimLinearSpline< Td, Tg, CTd, CTg >::OneDimLinearSpline().
|
inline |
evaluate the value at r=(k + rfrac)*delta
Definition at line 155 of file OneDimLinearSpline.h.
References OneDimGridFunctor< Td, Tg, CTd, CTg >::m_Y.
|
inline |
evaluate the value at r using a binary search on a grid
| r | distance evaluate the index and the linear coefficient |
| r | distance |
| k | return index |
| rfrac | (r-floor(r/delta))/delta |
Definition at line 147 of file OneDimLinearSpline.h.
References OneDimLinearSpline< Td, Tg, CTd, CTg >::delta_inv, OneDimGridFunctor< Td, Tg, CTd, CTg >::r(), and OneDimLinearSpline< Td, Tg, CTd, CTg >::r_min.
|
inline |
Definition at line 78 of file OneDimLinearSpline.h.
|
inline |
Definition at line 93 of file OneDimLinearSpline.h.
References OneDimLinearSpline< Td, Tg, CTd, CTg >::r_max.
|
inlinevirtual |
evaluate the spline coefficients
| imin | index of the first valid grid |
| yp1 | first derivative at imin grid point |
| imax | index of the last valid grid |
| ypn | first derivative at imax grid point |
Reimplemented from OneDimGridFunctor< Td, Tg, CTd, CTg >.
Definition at line 176 of file OneDimLinearSpline.h.
References OneDimLinearSpline< Td, Tg, CTd, CTg >::ConstValue, OneDimLinearSpline< Td, Tg, CTd, CTg >::First, OneDimLinearSpline< Td, Tg, CTd, CTg >::Last, OneDimGridFunctor< Td, Tg, CTd, CTg >::m_grid, OneDimGridFunctor< Td, Tg, CTd, CTg >::m_Y, and OneDimLinearSpline< Td, Tg, CTd, CTg >::m_Y1.
|
inlinevirtual |
Reimplemented from OneDimGridFunctor< Td, Tg, CTd, CTg >.
Definition at line 193 of file OneDimLinearSpline.h.
References OneDimGridFunctor< Td, Tg, CTd, CTg >::size(), and OneDimLinearSpline< Td, Tg, CTd, CTg >::spline().
Referenced by OneDimLinearSpline< Td, Tg, CTd, CTg >::spline().
|
inlineoverridevirtual |
evaluate the value at r
| r | value on a grid |
Performance may be tunned: define USE_MEMORYSAVEMODE to evaluate the coefficients instead of using aux. arrays
Reimplemented from OneDimGridFunctor< Td, Tg, CTd, CTg >.
Definition at line 102 of file OneDimLinearSpline.h.
References OneDimLinearSpline< Td, Tg, CTd, CTg >::ConstValue, OneDimLinearSpline< Td, Tg, CTd, CTg >::delta_inv, OneDimGridFunctor< Td, Tg, CTd, CTg >::m_Y, OneDimLinearSpline< Td, Tg, CTd, CTg >::m_Y1, OneDimGridFunctor< Td, Tg, CTd, CTg >::r(), OneDimLinearSpline< Td, Tg, CTd, CTg >::r_max, and OneDimLinearSpline< Td, Tg, CTd, CTg >::r_min.
|
inlineoverridevirtual |
evaluate the value at r
| r | value on a grid |
| du | first derivative (assigned) |
| d2u | second derivative (assigned) |
Reimplemented from OneDimGridFunctor< Td, Tg, CTd, CTg >.
Definition at line 163 of file OneDimLinearSpline.h.
| value_type ConstValue |
Definition at line 49 of file OneDimLinearSpline.h.
Referenced by OneDimLinearSpline< Td, Tg, CTd, CTg >::spline(), and OneDimLinearSpline< Td, Tg, CTd, CTg >::splint().
| value_type d2Y |
store the second derivative of the function
Definition at line 191 of file OneDimGridFunctor.h.
| point_type delta |
Definition at line 52 of file OneDimLinearSpline.h.
Referenced by OneDimLinearSpline< Td, Tg, CTd, CTg >::assign().
| point_type delta_inv |
Definition at line 53 of file OneDimLinearSpline.h.
Referenced by OneDimLinearSpline< Td, Tg, CTd, CTg >::assign(), OneDimLinearSpline< Td, Tg, CTd, CTg >::locate(), and OneDimLinearSpline< Td, Tg, CTd, CTg >::splint().
| value_type dY |
store the derivative of the function
Definition at line 189 of file OneDimGridFunctor.h.
| int First |
Definition at line 47 of file OneDimLinearSpline.h.
Referenced by OneDimLinearSpline< Td, Tg, CTd, CTg >::spline().
| int Last |
Definition at line 48 of file OneDimLinearSpline.h.
Referenced by OneDimLinearSpline< Td, Tg, CTd, CTg >::spline().
| std::unique_ptr<grid_type> m_grid |
pointer to the radial grid
Definition at line 184 of file OneDimGridFunctor.h.
| data_type m_Y |
data for the function on the grid
Definition at line 194 of file OneDimGridFunctor.h.
| data_type m_Y1 |
Definition at line 54 of file OneDimLinearSpline.h.
Referenced by OneDimLinearSpline< Td, Tg, CTd, CTg >::spline(), and OneDimLinearSpline< Td, Tg, CTd, CTg >::splint().
| point_type r_max |
| point_type r_min |
store the value of the function
Definition at line 187 of file OneDimGridFunctor.h.