GQCP
|
#include <CubicGrid.hpp>
Public Member Functions | |
CubicGrid (const Vector< double, 3 > &origin, const std::array< size_t, 3 > &numbers_of_steps, const std::array< double, 3 > &step_sizes) | |
template<typename OutputType > | |
Field< OutputType > | evaluate (const Function< OutputType, Vector< double, 3 > > &function) const |
template<typename T > | |
T | integrate (const Field< T > &field) const |
void | forEach (const std::function< void(const size_t, const size_t, const size_t)> &callback) const |
void | forEach (const std::function< void(const Vector< double, 3 > &)> &callback) const |
size_t | numberOfPoints () const |
const Vector< double, 3 > & | origin () const |
Vector< double, 3 > | position (const size_t i, const size_t j, const size_t k) const |
std::vector< Vector< double, 3 > > | points () const |
size_t | numbersOfSteps (const size_t axis) const |
const std::array< size_t, 3 > & | numbersOfSteps () const |
double | stepSize (const size_t axis) const |
const std::array< double, 3 > & | stepSizes () const |
double | totalVolume () const |
void | writeToCubeFile (const Field< double > &scalar_field, const std::string &filename, const Molecule &molecule) const |
double | voxelVolume () const |
Static Public Member Functions | |
static CubicGrid | Centered (const Vector< double, 3 > &point, const size_t number_of_steps, const double step_size) |
static CubicGrid | ReadCubeFile (const std::string &filename) |
static CubicGrid | ReadRegularGridFile (const std::string &filename) |
A grid type whose points are on a regular cubic lattice.
GQCP::CubicGrid::CubicGrid | ( | const Vector< double, 3 > & | origin, |
const std::array< size_t, 3 > & | numbers_of_steps, | ||
const std::array< double, 3 > & | step_sizes | ||
) |
origin | the origin of the grid |
numbers_of_steps | the number of steps in the x, y, z-directions |
step_sizes | the step sizes in the x, y, z-directions |
|
static |
Create a cubic ground that is centered around the given point. Equal numbers of steps and step sizes are taken in the x-, y- and z-directions.
point | the point around which the grid should be centered |
number_of_steps | the number of steps that should be taken in the x-, y- and z-directions |
step_size | the size of the steps that should be taken in the x-, y- and z-directions |
|
inline |
Evaluate a function on every point of this grid.
function | The function whose values should be evaluated. |
void GQCP::CubicGrid::forEach | ( | const std::function< void(const size_t, const size_t, const size_t)> & | callback | ) | const |
Loop over the points of this grid by index number.
callback | the function you would like to apply to each incoming (i,j,k)-tuple of numbers of steps taken in the x,y,z-direction. |
void GQCP::CubicGrid::forEach | ( | const std::function< void(const Vector< double, 3 > &)> & | callback | ) | const |
Loop over the points of this grid by position (relative to the origin of this grid).
callback | the function you would like to apply to each incoming position vector |
|
inline |
Integrate a Field over this grid.
field | the field that should be integrated, i.e. provided as the integrand |
size_t GQCP::CubicGrid::numberOfPoints | ( | ) | const |
|
inline |
|
inline |
axis | 0, 1, 2 representing the x-, y-, or z-axis |
|
inline |
std::vector< Vector< double, 3 > > GQCP::CubicGrid::points | ( | ) | const |
Vector< double, 3 > GQCP::CubicGrid::position | ( | const size_t | i, |
const size_t | j, | ||
const size_t | k | ||
) | const |
i | the number of steps taken in the x-direction |
j | the number of steps taken in the y-direction |
k | the number of steps taken in the z-direction |
|
static |
Parse a GAUSSIAN Cube file (http://paulbourke.net/dataformats/cube/). The values for the contained scalar field are ignored.
filename | the name of the cubefile |
|
static |
Parse an .rgrid-file and create the CubicGrid that is contained in it. The values for the scalar field or vector field are ignored.
filename | the name of the .igrid-file |
|
inline |
axis | 0, 1, 2 representing the x-, y-, or z-axis |
|
inline |
|
inline |
double GQCP::CubicGrid::voxelVolume | ( | ) | const |
void GQCP::CubicGrid::writeToCubeFile | ( | const Field< double > & | scalar_field, |
const std::string & | filename, | ||
const Molecule & | molecule | ||
) | const |
Write a field's values to a GAUSSIAN Cube file (http://paulbourke.net/dataformats/cube/).
scalar_field | the scalar field that should be written to the cubefile |
filename | the name of the cubefile that has to be generated |
molecule | the molecule that should be placed in the cubefile |