#include <CartesianSpatialGrid.hpp>
Public Member Functions | |
int | cellIndex (Position bfr) const override |
Position | centralPositionInCell (int m) const override |
std::unique_ptr< PathSegmentGenerator > | createPathSegmentGenerator () const override |
double | diagonal (int m) const override |
Mesh * | meshX () const |
Mesh * | meshY () const |
Mesh * | meshZ () const |
int | numCells () const override |
Position | randomPositionInCell (int m) const override |
double | volume (int m) const override |
![]() | |
Box | boundingBox () const override |
int | dimension () const override |
double | maxX () const |
double | maxY () const |
double | maxZ () const |
double | minX () const |
double | minY () const |
double | minZ () const |
![]() | |
virtual Box | boundingBox () const =0 |
virtual int | cellIndex (Position bfr) const =0 |
virtual Position | centralPositionInCell (int m) const =0 |
virtual std::unique_ptr< PathSegmentGenerator > | createPathSegmentGenerator () const =0 |
virtual double | diagonal (int m) const =0 |
virtual int | dimension () const =0 |
virtual int | numCells () const =0 |
virtual Position | randomPositionInCell (int m) const =0 |
virtual double | volume (int m) const =0 |
virtual void | writeGridPlotFiles (const SimulationItem *probe) const |
![]() | |
template<class T > | |
T * | find (bool setup=true) const |
template<class T > | |
T * | interface (int levels=-999999, bool setup=true) const |
virtual string | itemName () const |
void | setup () |
string | typeAndName () const |
![]() | |
Item (const Item &)=delete | |
virtual | ~Item () |
void | addChild (Item *child) |
const vector< Item * > & | children () const |
virtual void | clearItemListProperty (const PropertyDef *property) |
void | destroyChild (Item *child) |
virtual bool | getBoolProperty (const PropertyDef *property) const |
virtual vector< double > | getDoubleListProperty (const PropertyDef *property) const |
virtual double | getDoubleProperty (const PropertyDef *property) const |
virtual string | getEnumProperty (const PropertyDef *property) const |
virtual int | getIntProperty (const PropertyDef *property) const |
virtual vector< Item * > | getItemListProperty (const PropertyDef *property) const |
virtual Item * | getItemProperty (const PropertyDef *property) const |
virtual string | getStringProperty (const PropertyDef *property) const |
int | getUtilityProperty (string name) const |
virtual void | insertIntoItemListProperty (const PropertyDef *property, int index, Item *item) |
Item & | operator= (const Item &)=delete |
Item * | parent () const |
virtual void | removeFromItemListProperty (const PropertyDef *property, int index) |
virtual void | setBoolProperty (const PropertyDef *property, bool value) |
virtual void | setDoubleListProperty (const PropertyDef *property, vector< double > value) |
virtual void | setDoubleProperty (const PropertyDef *property, double value) |
virtual void | setEnumProperty (const PropertyDef *property, string value) |
virtual void | setIntProperty (const PropertyDef *property, int value) |
virtual void | setItemProperty (const PropertyDef *property, Item *item) |
virtual void | setStringProperty (const PropertyDef *property, string value) |
void | setUtilityProperty (string name, int value) |
virtual string | type () const |
![]() | |
Box () | |
Box (double xmin, double ymin, double zmin, double xmax, double ymax, double zmax) | |
Box (Vec rmin, Vec rmax) | |
void | cellIndices (int &i, int &j, int &k, Vec r, int nx, int ny, int nz) const |
Vec | center () const |
bool | contains (const Box &box) const |
bool | contains (double x, double y, double z) const |
bool | contains (Vec r) const |
double | diagonal () const |
void | extend (const Box &box) |
const Box & | extent () const |
void | extent (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const |
Vec | fracPos (double xfrac, double yfrac, double zfrac) const |
Vec | fracPos (int xd, int yd, int zd, int xn, int yn, int zn) const |
bool | intersects (const Box &box) const |
bool | intersects (Vec r, const Vec k, double &smin, double &smax) const |
bool | intersects (Vec rc, double r) const |
Vec | rmax () const |
Vec | rmin () const |
double | volume () const |
Vec | widths () const |
double | xmax () const |
double | xmin () const |
double | xwidth () const |
double | ymax () const |
double | ymin () const |
double | ywidth () const |
double | zmax () const |
double | zmin () const |
double | zwidth () const |
Protected Member Functions | |
CartesianSpatialGrid () | |
void | setupSelfAfter () override |
void | write_xy (SpatialGridPlotFile *outfile) const override |
void | write_xyz (SpatialGridPlotFile *outfile) const override |
void | write_xz (SpatialGridPlotFile *outfile) const override |
void | write_yz (SpatialGridPlotFile *outfile) const override |
![]() | |
BoxSpatialGrid () | |
void | setupSelfBefore () override |
![]() | |
SpatialGrid () | |
Random * | random () const |
void | setupSelfBefore () override |
virtual void | write_xy (SpatialGridPlotFile *outfile) const |
virtual void | write_xyz (SpatialGridPlotFile *outfile) const |
virtual void | write_xz (SpatialGridPlotFile *outfile) const |
virtual void | write_yz (SpatialGridPlotFile *outfile) const |
![]() | |
SimulationItem () | |
virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
virtual void | setupSelfAfter () |
virtual void | setupSelfBefore () |
![]() | |
Item () | |
![]() | |
void | setExtent (const Box &extent) |
void | setExtent (double xmin, double ymin, double zmin, double xmax, double ymax, double zmax) |
Private Types | |
using | BaseType = BoxSpatialGrid |
using | ItemType = CartesianSpatialGrid |
Private Member Functions | |
Box | box (int m) const |
int | index (int i, int j, int k) const |
Private Attributes | |
Mesh * | _meshX |
Mesh * | _meshY |
Mesh * | _meshZ |
int | _Nx |
int | _Ny |
int | _Nz |
Array | _xv |
Array | _yv |
Array | _zv |
Friends | |
class | ItemRegistry |
class | MySegmentGenerator |
The CartesianSpatialGrid class is subclass of the BoxSpatialGrid class, and represents three-dimensional spatial grids based on a regular Cartesian grid. Each cell in such a grid is a little cuboid (not necessarily all with the same size or axis ratios).
|
inlineprotected |
Default constructor for concrete Item subclass CartesianSpatialGrid : "a Cartesian spatial grid" .
|
private |
This function calculates the three bin indices
|
overridevirtual |
This function returns the index
Implements SpatialGrid.
|
overridevirtual |
This function returns the central location from the cell with index
A position with these cartesian coordinates is returned.
Implements SpatialGrid.
|
overridevirtual |
This function creates and hands over ownership of a path segment generator (an instance of a PathSegmentGenerator subclass) appropriate for a cartesian grid, implemented as a private PathSegmentGenerator subclass.
The algorithm used to construct the path is fairly straightforward because all cells are cuboids lined up with the coordinate axes and the neighboring cells are easily found by manipulating cell indices.
Implements SpatialGrid.
|
overridevirtual |
This function returns the diagonal of the cell with index
Implements SpatialGrid.
|
private |
This function returns the index
|
inline |
This function returns the value of the discoverable item property meshX : "the bin distribution in the X direction" .
The default value for this property is given by the conditional value expression "LinMesh" .
|
inline |
This function returns the value of the discoverable item property meshY : "the bin distribution in the Y direction" .
The default value for this property is given by the conditional value expression "LinMesh" .
|
inline |
This function returns the value of the discoverable item property meshZ : "the bin distribution in the Z direction" .
The default value for this property is given by the conditional value expression "LinMesh" .
|
overridevirtual |
This function returns the number of cells in the grid.
Implements SpatialGrid.
|
overridevirtual |
This function returns a random location from the cell with index
with
Implements SpatialGrid.
|
overrideprotectedvirtual |
This function sets up a number of data members that depend on the Mesh objects configured for this grid.
Reimplemented from SimulationItem.
|
overridevirtual |
This function returns the volume of the cell with index
Implements SpatialGrid.
|
overrideprotectedvirtual |
This function writes the intersection of the grid structure with the xy plane to the specified SpatialGridPlotFile object.
Reimplemented from SpatialGrid.
|
overrideprotectedvirtual |
This function writes 3D information for all cells in the grid structure to the specified SpatialGridPlotFile object.
Reimplemented from SpatialGrid.
|
overrideprotectedvirtual |
This function writes the intersection of the grid structure with the xz plane to the specified SpatialGridPlotFile object.
Reimplemented from SpatialGrid.
|
overrideprotectedvirtual |
This function writes the intersection of the grid structure with the yz plane to the specified SpatialGridPlotFile object.
Reimplemented from SpatialGrid.