#include <Cylinder2DSpatialGrid.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 |
int | dimension () const override |
Mesh * | meshRadial () const |
Mesh * | meshZ () const |
int | numCells () const override |
Position | randomPositionInCell (int m) const override |
void | setupSelfAfter () override |
double | volume (int m) const override |
![]() | |
double | maxRadius () const |
double | maxZ () const |
double | minRadius () 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 |
Protected Member Functions | |
Cylinder2DSpatialGrid () | |
void | write_xy (SpatialGridPlotFile *outfile) const override |
void | write_xz (SpatialGridPlotFile *outfile) const override |
![]() | |
CylinderSpatialGrid () | |
Box | boundingBox () const override |
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 () | |
Private Types | |
using | BaseType = CylinderSpatialGrid |
using | ItemType = Cylinder2DSpatialGrid |
Private Member Functions | |
bool | getCoords (int m, double &Rmin, double &zmin, double &Rmax, double &zmax) const |
int | index (int i, int k) const |
Private Attributes | |
Mesh * | _meshRadial |
Mesh * | _meshZ |
int | _Ncells |
int | _NR |
int | _Nz |
Array | _Rv |
Array | _zv |
Friends | |
class | ItemRegistry |
class | MySegmentGenerator |
The Cylinder2DSpatialGrid class is subclass of the CylinderSpatialGrid class, and represents axisymmetric spatial grids based on cylindrical coordinates. The grid is defined in the meridional plane and rotated around the z-axis. The meridional grid is specified through two sets of grid points:
In total there are
This item type is allowed only if the Boolean expression "!Dimension3" evaluates to true after replacing the names by true or false depending on their presence.
|
inlineprotected |
Default constructor for concrete Item subclass Cylinder2DSpatialGrid : "a 2D axisymmetric spatial grid in cylindrical coordinates" .
|
overridevirtual |
This function returns the index
Implements SpatialGrid.
|
overridevirtual |
This function returns the central location of the cell with index
Implements SpatialGrid.
|
overridevirtual |
This function creates and hands over ownership of a path segment generator (an instance of a PathSegmentGenerator subclass) appropriate for a 2D cylindrical grid, implemented as a private PathSegmentGenerator subclass.
The figure above is a projection on the equatorial plane. It shows coordinate system origin
In the vertical direction, the distance to the intersection of the path with a horizontal plane at height
The segment generator uses these relations to step the path through the cells, finding the nearest intersection and updating the values of
Implements SpatialGrid.
|
overridevirtual |
This function returns the "diagonal" of the cell with index
Implements SpatialGrid.
|
overridevirtual |
This function returns the dimension of the grid, which is 2.
Implements SpatialGrid.
|
private |
This function obtains the coordinates in the meridional plane for the corners of the cell with index
If both the resulting bin indices are within range, the function stores the corresponding cell corner coordinates in the provided arguments and returns true. If any of the indices are out of range, the function returns false and the contents of the provided arguments remains unchanged.
|
private |
This function returns the index
|
inline |
This function returns the value of the discoverable item property meshRadial : "the bin distribution in the radial 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
Implements SpatialGrid.
|
overridevirtual |
This function returns a random location in the cell with index
with
Implements SpatialGrid.
|
overridevirtual |
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 with the xy plane to the specified SpatialGridPlotFile object.
Reimplemented from SpatialGrid.
|
overrideprotectedvirtual |
This function writes the intersection of the grid with the xz plane to the specified SpatialGridPlotFile object.
Reimplemented from SpatialGrid.