#include <GridCoordinatesObject.h>
Public Member Functions | |
void | convertIndexToIndices (const unsigned &index, const std::vector< unsigned > &nnbin, std::vector< unsigned > &indices) const |
Convert an index into indices. More... | |
double | getCellVolume () const |
Return the volume of one of the grid cells. More... | |
unsigned | getDimension () const |
Get the dimensionality of the function. More... | |
void | getGridPointCoordinates (const unsigned &, std::vector< double > &) const |
Get the coordinates for a point in the grid. More... | |
void | getGridPointCoordinates (const unsigned &, std::vector< unsigned > &, std::vector< double > &) const |
const std::vector< double > & | getGridSpacing () const |
Get the spacing between grid points. More... | |
std::string | getGridType () const |
Get the type of the grid. More... | |
unsigned | getIndex (const std::vector< double > &p) const |
Convert a point in space the the correspoinding grid point. More... | |
unsigned | getIndex (const std::vector< unsigned > &indices) const |
Flatten the grid and get the grid index for a point. More... | |
void | getIndices (const std::vector< double > &point, std::vector< unsigned > &indices) const |
Get the indices of a particular point. More... | |
void | getIndices (const unsigned &index, std::vector< unsigned > &indices) const |
Get the indices fof a point. More... | |
std::vector< std::string > | getMax () const |
Get the vector containing the maximum value of the grid in each dimension. More... | |
std::vector< std::string > | getMin () const |
Get the vector containing the minimum value of the grid in each dimension. More... | |
std::vector< unsigned > | getNbin (const bool &shape) const |
Get the number of grid points for each dimension. More... | |
void | getNeighbors (const std::vector< double > &pp, const std::vector< unsigned > &nneigh, unsigned &num_neighbours, std::vector< unsigned > &neighbors) const |
Get the set of points neighouring a particular location in space. More... | |
void | getNeighbors (const std::vector< unsigned > &indices, const std::vector< unsigned > &nneigh, unsigned &num_neighbors, std::vector< unsigned > &neighbors) const |
Get the neighbors for a set of indices of a point. More... | |
unsigned | getNumberOfPoints () const |
Get the number of points in the grid. More... | |
void | getSplineNeighbors (const unsigned &mybox, unsigned &nneighbors, std::vector< unsigned > &mysneigh) const |
Get the points neighboring a particular spline point. More... | |
const std::vector< unsigned > & | getStride () const |
Get the stride (the distance between the grid points of an index) More... | |
bool | inbounds (const std::vector< double > &point) const |
Check if a point is within the grid boundaries. More... | |
bool | isPeriodic (const unsigned &i) const |
Is the grid periodic in the ith direction. More... | |
void | putCoordinateAtValue (const unsigned &, const double &, std::vector< double > &) const |
Create a coordinate that has this value of the grid. More... | |
void | setBounds (const std::vector< std::string > &smin, const std::vector< std::string > &smax, const std::vector< unsigned > &nbins, std::vector< double > &spacing) |
Set the minimum and maximum of the grid. More... | |
void | setup (const std::string &geom, const std::vector< bool > &ipbc, const unsigned &np, const double &fib_cutoff) |
Setup the grid. More... | |
Private Types | |
enum | { flat, fibonacci } |
The way that grid points are constructed. More... | |
Private Member Functions | |
void | getFibonacciCoordinates (const unsigned &ipoint, std::vector< double > &x) const |
Get the coordinates on the Fibonacci grid. More... | |
unsigned | getFibonacciIndex (const std::vector< double > &p) const |
Get the index of the closest point on the fibonacci sphere. More... | |
void | getFlatGridCoordinates (const unsigned &ipoint, std::vector< unsigned > &tindices, std::vector< double > &x) const |
Get the flat grid coordinates. More... | |
Private Attributes | |
bool | bounds_set |
Have the bounds been setup on the grid. More... | |
unsigned | dimension |
The dimensionality of the grid. More... | |
std::vector< double > | dx |
The spacing between grid points. More... | |
double | fib_increment |
std::vector< std::vector< unsigned > > | fib_nlist |
double | fib_offset |
Fib increment here is equal to 2*pi*(INVERSE GOLDEN RATIO) More... | |
double | fib_shift |
double | golden |
enum PLMD::gridtools::GridCoordinatesObject:: { ... } | gtype |
The way that grid points are constructed. More... | |
double | igolden |
double | log_golden2 |
std::vector< double > | max |
std::vector< double > | min |
The minimum and maximum of the grid stored as doubles. More... | |
std::vector< unsigned > | nbin |
The number of bins in each grid direction. More... | |
unsigned | npoints |
The number of points in the grid. More... | |
std::vector< bool > | pbc |
Is this direction periodic. More... | |
double | root5 |
Stuff for fibonacci grids. More... | |
std::vector< std::string > | str_max |
std::vector< std::string > | str_min |
The minimum and maximum in the grid stored as strings. More... | |
std::vector< unsigned > | stride |
The numerical distance between adjacent grid points. More... | |
void PLMD::gridtools::GridCoordinatesObject::convertIndexToIndices | ( | const unsigned & | index, |
const std::vector< unsigned > & | nnbin, | ||
std::vector< unsigned > & | indices | ||
) | const |
Convert an index into indices.
|
inline |
Return the volume of one of the grid cells.
|
inline |
Get the dimensionality of the function.
|
private |
Get the coordinates on the Fibonacci grid.
|
private |
Get the index of the closest point on the fibonacci sphere.
|
private |
Get the flat grid coordinates.
void PLMD::gridtools::GridCoordinatesObject::getGridPointCoordinates | ( | const unsigned & | ipoint, |
std::vector< double > & | x | ||
) | const |
Get the coordinates for a point in the grid.
void PLMD::gridtools::GridCoordinatesObject::getGridPointCoordinates | ( | const unsigned & | ipoint, |
std::vector< unsigned > & | tindices, | ||
std::vector< double > & | x | ||
) | const |
|
inline |
Get the spacing between grid points.
|
inline |
Get the type of the grid.
unsigned PLMD::gridtools::GridCoordinatesObject::getIndex | ( | const std::vector< double > & | p | ) | const |
Convert a point in space the the correspoinding grid point.
unsigned PLMD::gridtools::GridCoordinatesObject::getIndex | ( | const std::vector< unsigned > & | indices | ) | const |
Flatten the grid and get the grid index for a point.
void PLMD::gridtools::GridCoordinatesObject::getIndices | ( | const std::vector< double > & | point, |
std::vector< unsigned > & | indices | ||
) | const |
Get the indices of a particular point.
void PLMD::gridtools::GridCoordinatesObject::getIndices | ( | const unsigned & | index, |
std::vector< unsigned > & | indices | ||
) | const |
Get the indices fof a point.
std::vector< std::string > PLMD::gridtools::GridCoordinatesObject::getMax | ( | ) | const |
Get the vector containing the maximum value of the grid in each dimension.
std::vector< std::string > PLMD::gridtools::GridCoordinatesObject::getMin | ( | ) | const |
Get the vector containing the minimum value of the grid in each dimension.
std::vector< unsigned > PLMD::gridtools::GridCoordinatesObject::getNbin | ( | const bool & | shape | ) | const |
Get the number of grid points for each dimension.
void PLMD::gridtools::GridCoordinatesObject::getNeighbors | ( | const std::vector< double > & | pp, |
const std::vector< unsigned > & | nneigh, | ||
unsigned & | num_neighbours, | ||
std::vector< unsigned > & | neighbors | ||
) | const |
Get the set of points neighouring a particular location in space.
void PLMD::gridtools::GridCoordinatesObject::getNeighbors | ( | const std::vector< unsigned > & | indices, |
const std::vector< unsigned > & | nneigh, | ||
unsigned & | num_neighbors, | ||
std::vector< unsigned > & | neighbors | ||
) | const |
Get the neighbors for a set of indices of a point.
|
inline |
Get the number of points in the grid.
void PLMD::gridtools::GridCoordinatesObject::getSplineNeighbors | ( | const unsigned & | mybox, |
unsigned & | nneighbors, | ||
std::vector< unsigned > & | mysneigh | ||
) | const |
Get the points neighboring a particular spline point.
|
inline |
Get the stride (the distance between the grid points of an index)
bool PLMD::gridtools::GridCoordinatesObject::inbounds | ( | const std::vector< double > & | point | ) | const |
Check if a point is within the grid boundaries.
|
inline |
Is the grid periodic in the ith direction.
void PLMD::gridtools::GridCoordinatesObject::putCoordinateAtValue | ( | const unsigned & | ind, |
const double & | val, | ||
std::vector< double > & | coords | ||
) | const |
Create a coordinate that has this value of the grid.
void PLMD::gridtools::GridCoordinatesObject::setBounds | ( | const std::vector< std::string > & | smin, |
const std::vector< std::string > & | smax, | ||
const std::vector< unsigned > & | nbins, | ||
std::vector< double > & | spacing | ||
) |
Set the minimum and maximum of the grid.
void PLMD::gridtools::GridCoordinatesObject::setup | ( | const std::string & | geom, |
const std::vector< bool > & | ipbc, | ||
const unsigned & | np, | ||
const double & | fib_cutoff | ||
) |
Setup the grid.
|
private |
Have the bounds been setup on the grid.
|
private |
The dimensionality of the grid.
|
private |
The spacing between grid points.
|
private |
|
private |
|
private |
Fib increment here is equal to 2*pi*(INVERSE GOLDEN RATIO)
|
private |
|
private |
enum { ... } PLMD::gridtools::GridCoordinatesObject::gtype |
The way that grid points are constructed.
|
private |
|
private |
|
private |
|
private |
The minimum and maximum of the grid stored as doubles.
|
private |
The number of bins in each grid direction.
|
private |
The number of points in the grid.
|
private |
Is this direction periodic.
|
private |
Stuff for fibonacci grids.
|
private |
|
private |
The minimum and maximum in the grid stored as strings.
|
private |
The numerical distance between adjacent grid points.
Hosted by GitHub | 1.8.17 |