16 #ifndef QMCPLUSPLUS_GRID_FUNCTOR_H 17 #define QMCPLUSPLUS_GRID_FUNCTOR_H 35 template<
class Td,
class Tg = Td,
class CTd = Vector<Td>,
class CTg = Vector<Tg>>
87 inline int size()
const {
return m_Y.size(); }
205 template<
class Td,
class Tg = Td,
class CTd = Vector<Td>,
class CTg = Vector<Tg>>
value_type f(point_type r)
Evaluate the function and its derivatives, store the derivatives.
CTd data_type
the type of the containers Y, dY and d2Y
OneDimGridFunctor(const OneDimGridFunctor &a)
value_type evaluate(point_type r, point_type rinv)
Evaluate the function value only.
value_type splint(point_type r, value_type &du, value_type &d2u) const override
helper functions for EinsplineSetBuilder
OneDimConstFunctor(grid_type *gt=0)
void resetParameters(const TT &active)
int getNumOfNodes() const
return the number of nodes
virtual void spline(int imin, value_type yp1, int imax, value_type ypn)
value_type * data()
return the grid data
Implement One-Dimensional function on a radial grid.
int NumNodes
the number of nodes
void spline(int imin, value_type yp1, int imax, value_type ypn)
value_type & operator()(int i)
asign a value at i
An abstract base class to implement a One-Dimensional grid.
Decalaration of One-Dimesional grids.
T value_type
the type of the value on a grid
value_type Y
store the value of the function
One-dimensional grid functor that returns a constant.
value_type d2Y
store the second derivative of the function
value_type df(point_type r)
Evaluate the function and its derivatives, store the derivatives.
OneDimGridBase< Tg, CTg > grid_type
the grid type
value_type splint(point_type r) const override
point_type dr(int i) const
return
OneDimGridFunctor(std::unique_ptr< grid_type > gt=std::unique_ptr< grid_type >())
constructor
virtual ~OneDimGridFunctor()=default
virtual value_type splint(point_type r, value_type &du, value_type &d2u) const
int size() const
return the number of data points
value_type dY
store the derivative of the function
void setNumOfNodes(int n)
set the number of nodes
value_type evaluate(point_type r, point_type rinv, value_type &du, value_type &d2u)
Evaluate the function and its derivatives.
const value_type * data() const
assign the grid data
void resize(int n)
resize the number of data points
T point_type
the type of the grid value
grid_type & grid()
assign a radial grid
value_type operator()(int i) const
returns a value
const grid_type & grid() const
return the radial grid
point_type dh() const
return the address of the values
point_type r(int i) const
return the grid point at index i
value_type evaluateAll(point_type r, point_type rinv)
Evaluate the function and its derivatives.
std::unique_ptr< grid_type > m_grid
pointer to the radial grid
virtual value_type splint(point_type r) const
data_type m_Y
data for the function on the grid