#include <Grid.h>

Classes | |
| class | AcceleratorBase |
| Auxiliary class for accelerating grid calculations. More... | |
| class | AcceleratorHandler |
| Auxiliary class for managing AcceleratorBase. More... | |
Public Types | |
| typedef std::size_t | index_t |
Public Member Functions | |
| GridBase (const std::string &funcl, const std::vector< std::string > &names, const std::vector< std::string > &gmin, const std::vector< std::string > &gmax, const std::vector< unsigned > &nbin, bool dospline, bool usederiv, const std::vector< bool > &isperiodic, const std::vector< std::string > &pmin, const std::vector< std::string > &pmax) | |
| this constructor here is not Value-aware | |
| GridBase (const std::string &funcl, const std::vector< Value * > &args, const std::vector< std::string > &gmin, const std::vector< std::string > &gmax, const std::vector< unsigned > &nbin, bool dospline, bool usederiv) | |
| this constructor here is Value-aware | |
| virtual | ~GridBase ()=default |
| void | addKernel (const KernelFunctions &kernel) |
| add a kernel function to the grid | |
| void | addValue (const std::vector< unsigned > &indices, double value) |
| virtual void | addValue (index_t index, double value)=0 |
| add to grid value | |
| void | addValueAndDerivatives (const std::vector< unsigned > &indices, double value, std::vector< double > &der) |
| virtual void | addValueAndDerivatives (index_t index, double value, std::vector< double > &der)=0 |
| add to grid value and derivatives | |
| double | findMaximalPathMinimum (const std::vector< double > &source, const std::vector< double > &sink) |
| Find the maximum over paths of the minimum value of the gridded function along the paths for all paths of neighboring grid lattice points from a source point to a sink point. | |
| std::vector< std::string > | getArgNames () const |
| get argument names of this grid | |
| double | getBinVolume () const |
| get bin volume | |
| unsigned | getDimension () const |
| get grid dimension | |
| std::vector< double > | getDx () const |
| get bin size | |
| double | getDx (index_t j) const |
| index_t | getIndex (const std::vector< double > &x) const |
| index_t | getIndex (const std::vector< unsigned > &indices) const |
| index_t | getIndex (const unsigned *indices, std::size_t indices_size) const |
| std::vector< unsigned > | getIndices (const std::vector< double > &x) const |
| void | getIndices (const std::vector< double > &x, std::vector< unsigned > &rindex) const |
| void | getIndices (const std::vector< double > &x, unsigned *rindex_data, std::size_t rindex_size) const |
| std::vector< unsigned > | getIndices (index_t index) const |
| void | getIndices (index_t index, std::vector< unsigned > &rindex) const |
| methods to handle grid indices | |
| void | getIndices (index_t index, unsigned *rindex_data, std::size_t rindex_size) const |
| std::vector< bool > | getIsPeriodic () const |
| get if periodic | |
| std::vector< std::string > | getMax () const |
| get upper boundary | |
| virtual double | getMaxValue () const =0 |
| get maximum value | |
| std::vector< std::string > | getMin () const |
| get lower boundary | |
| virtual double | getMinValue () const =0 |
| get minimum value | |
| std::vector< unsigned > | getNbin () const |
| get number of bins | |
| std::vector< index_t > | getNearestNeighbors (const index_t index) const |
| get nearest neighbors (those separated by exactly one lattice unit) | |
| std::vector< index_t > | getNearestNeighbors (const std::vector< unsigned > &indices) const |
| std::vector< index_t > | getNeighbors (const std::vector< double > &x, const std::vector< unsigned > &neigh) const |
| std::vector< index_t > | getNeighbors (const std::vector< unsigned > &indices, const std::vector< unsigned > &neigh) const |
| std::vector< index_t > | getNeighbors (index_t index, const std::vector< unsigned > &neigh) const |
| get neighbors | |
| std::vector< double > | getPoint (const std::vector< double > &x) const |
| void | getPoint (const std::vector< double > &x, std::vector< double > &point) const |
| std::vector< double > | getPoint (const std::vector< unsigned > &indices) const |
| void | getPoint (const std::vector< unsigned > &indices, std::vector< double > &point) const |
| void | getPoint (const unsigned *indices_data, std::size_t indices_size, double *point, std::size_t point_size) const |
| void | getPoint (const unsigned *indices_data, std::size_t indices_size, std::vector< double > &point) const |
| std::vector< double > | getPoint (index_t index) const |
| void | getPoint (index_t index, std::vector< double > &point) const |
| faster versions relying on preallocated vectors | |
| virtual index_t | getSize () const =0 |
| get grid size | |
| double | getValue (const std::vector< double > &x) const |
| double | getValue (const std::vector< unsigned > &indices) const |
| virtual double | getValue (index_t index) const =0 |
| get grid value | |
| double | getValueAndDerivatives (const std::vector< double > &x, std::vector< double > &der) const |
| double | getValueAndDerivatives (const std::vector< unsigned > &indices, std::vector< double > &der) const |
| virtual double | getValueAndDerivatives (index_t index, double *der, std::size_t der_size) const =0 |
| get grid value and derivatives | |
| double | getValueAndDerivatives (index_t index, std::vector< double > &der) const |
| bool | hasDerivatives () const |
| get if the grid has derivatives | |
| void | Init (const std::string &funcl, const std::vector< std::string > &names, const std::vector< std::string > &gmin, const std::vector< std::string > &gmax, const std::vector< unsigned > &nbin, bool dospline, bool usederiv, const std::vector< bool > &isperiodic, const std::vector< std::string > &pmin, const std::vector< std::string > &pmax) |
| this is the real initializator | |
| void | resetToDefaultOutputFmt () |
| reset output format to the default %14.9f format | |
| void | setOutputFmt (const std::string &ss) |
| set output format | |
| void | setValue (const std::vector< unsigned > &indices, double value) |
| virtual void | setValue (index_t index, double value)=0 |
| set grid value | |
| void | setValueAndDerivatives (const std::vector< unsigned > &indices, double value, std::vector< double > &der) |
| virtual void | setValueAndDerivatives (index_t index, double value, std::vector< double > &der)=0 |
| set grid value and derivatives | |
| void | writeCubeFile (OFile &, const double &lunit) |
| dump grid to gaussian cube file | |
| void | writeHeader (OFile &file) |
| write header for grid file | |
| virtual void | writeToFile (OFile &)=0 |
| dump grid on file | |
Static Public Member Functions | |
| static std::unique_ptr< GridBase > | create (const std::string &, const std::vector< Value * > &, IFile &, bool, bool, bool) |
| read grid from file | |
| static std::unique_ptr< GridBase > | create (const std::string &, const std::vector< Value * > &, IFile &, const std::vector< std::string > &, const std::vector< std::string > &, const std::vector< unsigned > &, bool, bool, bool) |
| read grid from file and check boundaries are what is expected from input | |
Static Public Attributes | |
| static constexpr std::size_t | maxdim =16 |
| Maximum dimension (exaggerated value). | |
Protected Member Functions | |
| unsigned | getSplineNeighbors (const unsigned *indices, std::size_t indices_size, index_t *neighbors, std::size_t neighbors_size) const |
| get "neighbors" for spline | |
Protected Attributes | |
| AcceleratorHandler | accelerator |
| std::vector< std::string > | argnames |
| unsigned | dimension_ |
| bool | dospline_ |
| std::vector< double > | dx_ |
| std::string | fmt_ |
| std::string | funcname |
| std::vector< double > | max_ |
| index_t | maxsize_ |
| std::vector< double > | min_ |
| std::vector< unsigned > | nbin_ |
| std::vector< bool > | pbc_ |
| std::vector< std::string > | str_max_ |
| std::vector< std::string > | str_min_ |
| bool | usederiv_ |
| typedef std::size_t PLMD::GridBase::index_t |
| PLMD::GridBase::GridBase | ( | const std::string & | funcl, |
| const std::vector< Value * > & | args, | ||
| const std::vector< std::string > & | gmin, | ||
| const std::vector< std::string > & | gmax, | ||
| const std::vector< unsigned > & | nbin, | ||
| bool | dospline, | ||
| bool | usederiv ) |
this constructor here is Value-aware
| PLMD::GridBase::GridBase | ( | const std::string & | funcl, |
| const std::vector< std::string > & | names, | ||
| const std::vector< std::string > & | gmin, | ||
| const std::vector< std::string > & | gmax, | ||
| const std::vector< unsigned > & | nbin, | ||
| bool | dospline, | ||
| bool | usederiv, | ||
| const std::vector< bool > & | isperiodic, | ||
| const std::vector< std::string > & | pmin, | ||
| const std::vector< std::string > & | pmax ) |
this constructor here is not Value-aware
|
virtualdefault |
| void PLMD::GridBase::addKernel | ( | const KernelFunctions & | kernel | ) |
add a kernel function to the grid
| void PLMD::GridBase::addValue | ( | const std::vector< unsigned > & | indices, |
| double | value ) |
|
pure virtual |
add to grid value
Implemented in PLMD::Grid, and PLMD::SparseGrid.
| void PLMD::GridBase::addValueAndDerivatives | ( | const std::vector< unsigned > & | indices, |
| double | value, | ||
| std::vector< double > & | der ) |
|
pure virtual |
add to grid value and derivatives
Implemented in PLMD::Grid, and PLMD::SparseGrid.
|
static |
read grid from file
|
static |
read grid from file and check boundaries are what is expected from input
| double PLMD::GridBase::findMaximalPathMinimum | ( | const std::vector< double > & | source, |
| const std::vector< double > & | sink ) |
Find the maximum over paths of the minimum value of the gridded function along the paths for all paths of neighboring grid lattice points from a source point to a sink point.
| std::vector< std::string > PLMD::GridBase::getArgNames | ( | ) | const |
get argument names of this grid
| double PLMD::GridBase::getBinVolume | ( | ) | const |
get bin volume
| unsigned PLMD::GridBase::getDimension | ( | ) | const |
get grid dimension
| std::vector< double > PLMD::GridBase::getDx | ( | ) | const |
get bin size
| double PLMD::GridBase::getDx | ( | index_t | j | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
methods to handle grid indices
|
inline |
| std::vector< bool > PLMD::GridBase::getIsPeriodic | ( | ) | const |
get if periodic
| std::vector< std::string > PLMD::GridBase::getMax | ( | ) | const |
get upper boundary
|
pure virtual |
get maximum value
Implemented in PLMD::Grid, and PLMD::SparseGrid.
| std::vector< std::string > PLMD::GridBase::getMin | ( | ) | const |
get lower boundary
|
pure virtual |
get minimum value
Implemented in PLMD::Grid, and PLMD::SparseGrid.
| std::vector< unsigned > PLMD::GridBase::getNbin | ( | ) | const |
get number of bins
| std::vector< GridBase::index_t > PLMD::GridBase::getNearestNeighbors | ( | const index_t | index | ) | const |
get nearest neighbors (those separated by exactly one lattice unit)
| std::vector< GridBase::index_t > PLMD::GridBase::getNearestNeighbors | ( | const std::vector< unsigned > & | indices | ) | const |
|
inline |
|
inline |
|
inline |
get neighbors
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
faster versions relying on preallocated vectors
|
pure virtual |
get grid size
Implemented in PLMD::Grid, and PLMD::SparseGrid.
|
protected |
get "neighbors" for spline
| double PLMD::GridBase::getValue | ( | const std::vector< double > & | x | ) | const |
| double PLMD::GridBase::getValue | ( | const std::vector< unsigned > & | indices | ) | const |
|
pure virtual |
get grid value
Implemented in PLMD::Grid, and PLMD::SparseGrid.
| double PLMD::GridBase::getValueAndDerivatives | ( | const std::vector< double > & | x, |
| std::vector< double > & | der ) const |
| double PLMD::GridBase::getValueAndDerivatives | ( | const std::vector< unsigned > & | indices, |
| std::vector< double > & | der ) const |
|
pure virtual |
get grid value and derivatives
Implemented in PLMD::Grid, and PLMD::SparseGrid.
| double PLMD::GridBase::getValueAndDerivatives | ( | index_t | index, |
| std::vector< double > & | der ) const |
|
inline |
get if the grid has derivatives
| void PLMD::GridBase::Init | ( | const std::string & | funcl, |
| const std::vector< std::string > & | names, | ||
| const std::vector< std::string > & | gmin, | ||
| const std::vector< std::string > & | gmax, | ||
| const std::vector< unsigned > & | nbin, | ||
| bool | dospline, | ||
| bool | usederiv, | ||
| const std::vector< bool > & | isperiodic, | ||
| const std::vector< std::string > & | pmin, | ||
| const std::vector< std::string > & | pmax ) |
this is the real initializator
|
inline |
reset output format to the default %14.9f format
|
inline |
set output format
| void PLMD::GridBase::setValue | ( | const std::vector< unsigned > & | indices, |
| double | value ) |
|
pure virtual |
set grid value
Implemented in PLMD::Grid, and PLMD::SparseGrid.
| void PLMD::GridBase::setValueAndDerivatives | ( | const std::vector< unsigned > & | indices, |
| double | value, | ||
| std::vector< double > & | der ) |
|
pure virtual |
set grid value and derivatives
Implemented in PLMD::Grid, and PLMD::SparseGrid.
| void PLMD::GridBase::writeCubeFile | ( | OFile & | ofile, |
| const double & | lunit ) |
dump grid to gaussian cube file
| void PLMD::GridBase::writeHeader | ( | OFile & | file | ) |
write header for grid file
|
pure virtual |
dump grid on file
Implemented in PLMD::Grid, and PLMD::SparseGrid.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticconstexpr |
Maximum dimension (exaggerated value).
Can be used to replace local std::vectors with std::arrays (allocated on stack).
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Hosted by GitHub
|
1.13.2
|