Class ScalarGrid¶
- Defined in File Grid.h
 
Inheritance Relationships¶
Base Type¶
public crpropa::Grid< float >(Template Class Grid)
Class Documentation¶
- 
class 
ScalarGrid: public crpropa::Grid<float>¶ Public Functions
- 
void 
setGridSize(size_t Nx, size_t Ny, size_t Nz) Resize grid, also enlarges the volume as the spacing stays constant
- 
void 
setSpacing(Vector3d spacing) 
- 
void 
setReflective(bool b) 
- 
Vector3d 
getOrigin() const 
- 
size_t 
getNx() const 
- 
size_t 
getNy() const 
- 
size_t 
getNz() const 
- 
size_t 
getSizeOf() const Calculates the total size of the grid in bytes
- 
Vector3d 
getSpacing() const 
- 
bool 
isReflective() const 
- 
T &
get(size_t ix, size_t iy, size_t iz) Inspector & Mutator
- 
const T &
get(size_t ix, size_t iy, size_t iz) const¶ Inspector
- 
T 
getValue(size_t ix, size_t iy, size_t iz) 
- 
void 
setValue(size_t ix, size_t iy, size_t iz, T value) 
- 
std::vector<T> &
getGrid() Return a reference to the grid values
- 
Vector3d 
positionFromIndex(int index) const Position of the grid point of a given index
- 
T 
closestValue(const Vector3d &position) const Value of a grid point that is closest to a given position
- 
T 
interpolate(const Vector3d &position) const Interpolate the grid at a given position
- 
size_t 
addReference() const 
- 
size_t 
removeReference() const 
- 
int 
removeReferenceNoDelete() const 
- 
size_t 
getReferenceCount() const 
Protected Attributes
- 
size_t 
_referenceCount 
- 
void