Linear Grid inherets from Grid.
More...
Linear Grid inherets from Grid.
Definition at line 73 of file Grid.h.
◆ LinearGrid() [1/2]
Useless constructor.
Definition at line 119 of file Grid.h.
◆ LinearGrid() [2/2]
LinearGrid |
( |
double |
start, |
|
|
double |
end, |
|
|
int |
numpoints |
|
) |
| |
|
inline |
Constructor that sets the number of points, start and end point of the original grid.
Definition at line 136 of file Grid.h.
References Init().
136 {
Init(start, end, numpoints); }
void Init(double start, double end, int numpoints)
Initializes the linear grid.
◆ CheckRoundingMode()
void CheckRoundingMode |
( |
| ) |
|
|
inlineprivate |
Definition at line 661 of file Grid.h.
Referenced by Init().
663 for (
int i = 0; i < 100; i++)
665 double x = 100.0 * drand48() - 50.0;
666 if (nearbyint(x) != round(x))
668 std::cerr <<
"Error in rounding mode detected in LinearGrid. Abort.\n";
◆ Init()
void Init |
( |
double |
start, |
|
|
double |
end, |
|
|
int |
numpoints |
|
) |
| |
|
inline |
Initializes the linear grid.
Definition at line 88 of file Grid.h.
References CheckRoundingMode(), delta, deltainv, Grid::End, Grid::grid, Grid::NumPoints, Array< T, D, ALLOC >::resize(), and Grid::Start.
Referenced by LinearGrid(), and Read().
Array< double, 1 > grid
Contains the grid points.
int NumPoints
Number of points in the grid.
void resize(const std::array< SIZET, D > &dims)
Resize the container.
double Start
First and last grid points.
double delta
The value between successive grid points.
◆ operator=()
Definition at line 123 of file Grid.h.
References delta, deltainv, Grid::End, Grid::grid, Array< T, D, ALLOC >::resize(), Array< T, D, ALLOC >::shape(), and Grid::Start.
Array< double, 1 > grid
Contains the grid points.
void resize(const std::array< SIZET, D > &dims)
Resize the container.
double Start
First and last grid points.
double delta
The value between successive grid points.
const std::array< size_t, D > & shape() const
◆ Read()
Implements Grid.
Definition at line 110 of file Grid.h.
References Grid::End, Init(), Grid::NumPoints, IOSectionClass::ReadVar(), and Grid::Start.
int NumPoints
Number of points in the grid.
void Init(double start, double end, int numpoints)
Initializes the linear grid.
double Start
First and last grid points.
bool ReadVar(std::string name, T &var)
Template function which reads a variable in the present section into the passed-by-reference T variab...
◆ ReverseMap()
int ReverseMap |
( |
double |
r | ) |
|
|
inlineoverridevirtual |
Returns the index of the nearest point below r.
Implements Grid.
Definition at line 85 of file Grid.h.
References deltainv, and Grid::Start.
double Start
First and last grid points.
◆ Type()
Returns the type of the grid (in this case LINEAR)
Implements Grid.
Definition at line 82 of file Grid.h.
References LINEAR.
◆ Write()
◆ delta
◆ deltainv
The documentation for this class was generated from the following file:
- /home/pk7/projects/qmc/for_cron_doxygen/qmcpack/src/QMCTools/ppconvert/src/common/Grid.h