|
EGSnrc C++ class library
Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
|
a subclass of EGS_NDGeometry for conveniently defining an RZ geometry More...
#include <egs_rz.h>
Public Types | |
| enum | DIRS { ZDIR , RDIR } |
Public Member Functions | |
| EGS_RZGeometry (vector< EGS_BaseGeometry * > geoms, vector< EGS_Float > rads, vector< EGS_Float > zbs, const string &name="") | |
| RZ geometry constructor. More... | |
| const string & | getType () const |
| return RZ geometry type | |
| EGS_Float | getBound (int idir, int ind) |
| get RZ boundary for a given direction and directional index More... | |
| int | getNRegDir (int dir) |
| get number of regions in a given direction More... | |
| EGS_Float | getVolume (int ireg) |
| get mass of a given region | |
Public Member Functions inherited from EGS_NDGeometry | |
| EGS_NDGeometry (int ng, EGS_BaseGeometry **G, const string &Name="", bool O=true) | |
| EGS_NDGeometry (vector< EGS_BaseGeometry * > &G, const string &Name="", bool O=true) | |
| bool | isInside (const EGS_Vector &x) |
| int | isWhere (const EGS_Vector &x) |
| int | inside (const EGS_Vector &x) |
| EGS_Float | howfarToOutside (int ireg, const EGS_Vector &x, const EGS_Vector &u) |
| int | howfar (int ireg, const EGS_Vector &x, const EGS_Vector &u, EGS_Float &t, int *newmed=0, EGS_Vector *normal=0) |
| EGS_Float | hownear (int ireg, const EGS_Vector &x) |
| int | getMaxStep () const |
| void | getNextGeom (EGS_RandomGenerator *rndm) |
| void | updatePosition (EGS_Float time) |
| void | containsDynamic (bool &hasdynamic) |
| void | printInfo () const |
| virtual void | getLabelRegions (const string &str, vector< int > ®s) |
| void | ndRegions (int r, int dim, int dimk, int k, vector< int > ®s) |
Public Member Functions inherited from EGS_BaseGeometry | |
| EGS_BaseGeometry (const string &Name) | |
| Construct a geometry named Name. More... | |
| virtual | ~EGS_BaseGeometry () |
| Destructor. More... | |
| bool | isConvex () const |
| Is the geometry convex? More... | |
| int | regions () const |
| Returns the number of local regions in this geometry. More... | |
| virtual bool | isRealRegion (int ireg) const |
| Returnes true if ireg is a real region, false otherwise. More... | |
| virtual int | medium (int ireg) const |
| Returns the medium index in region ireg. More... | |
| virtual int | computeIntersections (int ireg, int n, const EGS_Vector &x, const EGS_Vector &u, EGS_GeometryIntersections *isections) |
| Calculates intersection distances to region boundaries. More... | |
| void | setMedium (const string &Name) |
| Set all regions to a medium with name Name. More... | |
| void | setMedium (int start, int end, const string &Name, int delta=1) |
| Set every delta'th region between start and end to the medium named Name. More... | |
| void | setMedium (int imed) |
| Set all regions to a medium with index imed. More... | |
| void | setMedium (int istart, int iend, int imed, int delta=1) |
| Set every delta'th region between start and end (inclusive) to imed. More... | |
| void | setMedia (EGS_Input *inp) |
| Set the media in the geometry from the input pointed to by inp. More... | |
| bool | hasRhoScaling () const |
| Does this geometry object have a mass density scaling feature? | |
| virtual EGS_Float | getRelativeRho (int ireg) const |
| Get the relative mass density in region ireg. | |
| virtual void | setRelativeRho (int start, int end, EGS_Float rho) |
| Set the relative mass density in regions. More... | |
| virtual void | setRelativeRho (EGS_Input *) |
| Set the relative mass density from an user input. More... | |
| EGS_Float | getMediumRho (int ind) const |
| virtual void | setApplication (EGS_Application *app) |
| bool | hasBScaling () const |
| Does this geometry object have a B field scaling feature? | |
| virtual EGS_Float | getBScaling (int ireg) const |
| Get the B field scaling factor in region ireg. | |
| virtual void | setBScaling (int start, int end, EGS_Float bf) |
| Set the B field scaling factor in regions. More... | |
| virtual void | setBScaling (EGS_Input *) |
| Set the B field scaling factor from an user input. More... | |
| const string & | getName () const |
| Get the name of this geometry. More... | |
| void | setDebug (bool deb) |
| Turn debugging on. More... | |
| void | setName (EGS_Input *inp) |
| Set the name of the geometry from the input inp. More... | |
| void | setBoundaryTolerance (EGS_Input *inp) |
| Set the value of the boundary tolerance from the input inp. More... | |
| void | setBoundaryTolerance (EGS_Float tol) |
| Set the value of the boundary tolerance from argument. | |
| virtual bool | hasBooleanProperty (int ireg, EGS_BPType prop) const |
| Is the boolean property prop set for region ireg ? | |
| virtual void | setBooleanProperty (EGS_BPType prop) |
| Set the boolean properties of the entire geometry to prop. More... | |
| virtual void | addBooleanProperty (int bit) |
| Add a boolean property for the entire geometry by setting the bit'th bit. More... | |
| virtual void | setBooleanProperty (EGS_BPType prop, int start, int end, int step=1) |
| Set the boolean properties of every step'th region between start and end (inclusive) to prop. More... | |
| virtual void | addBooleanProperty (int bit, int start, int end, int step=1) |
| Add a boolean property to every step'th region between start and end (inclusive) by setting the bit'th bit. More... | |
| int | ref () |
| Increase the reference count to this geometry. More... | |
| int | deref () |
| Decrease the reference count to this geometry. More... | |
| EGS_Float | getBoundaryTolerance () |
| Get the value of the boundary tolerance. | |
| virtual void | getNumberRegions (const string &str, vector< int > ®s) |
| Get a list of all the regions labeled with a number. | |
| virtual const string & | getLabelName (const int i) |
| Get the name of the i-th explicit label in the geometry. | |
| virtual int | getLabelCount () |
| Get the number of explicit labels in the geometry. | |
| int | setLabels (EGS_Input *input) |
| Set the labels from an input block. | |
| int | setLabels (const string &inp) |
| Set the labels from an input string. | |
Additional Inherited Members | |
Static Public Member Functions inherited from EGS_BaseGeometry | |
| static int | findRegion (EGS_Float xp, int np, const EGS_Float *p) |
| Find the bin to which xp belongs, given np bin edges p. More... | |
| static int | nMedia () |
| Get the number of media registered so far by all geometries. More... | |
| static const char * | getMediumName (int ind) |
| Get the name of medium with index ind. More... | |
| static int | addMedium (const string &medname) |
| Add a medium or get the index of an existing medium. More... | |
| static int | getMediumIndex (const string &medname) |
| Get the index of a medium named medname. More... | |
| static EGS_BaseGeometry * | createGeometry (EGS_Input *) |
| Create a geometry (or geometries) from a given input. More... | |
| static EGS_BaseGeometry * | createSingleGeometry (EGS_Input *inp) |
| Create a single geometry from the input inp. More... | |
| static void | clearGeometries () |
| Clears (deletes) all geometries in the currently active geometry list. More... | |
| static EGS_BaseGeometry * | getGeometry (const string &Name) |
| Get a pointer to the geometry named Name. More... | |
| static EGS_BaseGeometry ** | getGeometries () |
| static int | getNGeometries () |
| static string | getUniqueName () |
| Get a unique geometry name. More... | |
| static void | describeGeometries () |
| Describes all existing geometries. More... | |
| static void | setActiveGeometryList (int list) |
| Set the currently active geometry list. | |
| static int | getLastError () |
| static void | resetErrorFlag () |
Protected Member Functions inherited from EGS_NDGeometry | |
| void | setup () |
| void | setMedia (EGS_Input *inp, int nmed, const int *med_ind) |
| Define media. More... | |
Protected Attributes inherited from EGS_NDGeometry | |
| int | N |
| Number of dimensions. | |
| EGS_BaseGeometry ** | g |
| The dimensions. | |
| int * | n |
| Used for calculating region indeces. | |
| bool | ortho |
| Is the geometry orthogonal ? | |
Protected Attributes inherited from EGS_BaseGeometry | |
| int | nreg |
| Number of local regions in this geometry. More... | |
| string | name |
| Name of this geometry. More... | |
| short * | region_media |
| Array of media indeces. More... | |
| int | med |
| Medium index. More... | |
| bool | has_rho_scaling |
| Does this geometry have relative mass density scvaling? | |
| EGS_Float * | rhor |
| Array with relative mass densities. | |
| bool | has_B_scaling |
| Does this geometry has B field scaling factor? | |
| bool | has_Ref_rho |
| EGS_Float * | bfactor |
| Array with B field scaling factors. | |
| EGS_Float | rhoRef |
| Reference density for B field scaling. | |
| int | nref |
| Number of references to this geometry. More... | |
| bool | debug |
| Debugging flag. More... | |
| bool | is_convex |
| Is this geometry convex? More... | |
| EGS_BPType | bproperty |
| A bit mask of boolean properties for the entire geometry. More... | |
| EGS_BPType * | bp_array |
| An array of boolean properties on a region by region basis. More... | |
| EGS_Float | boundaryTolerance |
| Boundary tolerance for geometries that need it. | |
| EGS_Float | halfBoundaryTolerance |
| vector< label > | labels |
| Labels. More... | |
| EGS_Application * | app |
| The application this object belongs to. | |
Static Protected Attributes inherited from EGS_NDGeometry | |
| static string | type = "EGS_NDGeometry" |
| The geometry type. | |
Static Protected Attributes inherited from EGS_BaseGeometry | |
| static int | error_flag = 0 |
| Set to non-zero status if a geometry problem is encountered. | |
a subclass of EGS_NDGeometry for conveniently defining an RZ geometry
Input blocks for the RZ geometry look like the following:
:start geometry:
name = phantom
library = egs_rz
radii = 1, 2, 3
z-planes = -4 -3 -2 -1 0 1 2 3 4
:start media input:
media = M0
:stop media input:
:stop geometry:
which would create a num_regions = n_r_bounds*(n_z_bounds - 1) = 3*(9-1) = 24 region geometry with index numbers ranging from 0 to 23.
Alternatively you can specify the geometry using slabs & shells:
:start geometry:
name = phantom
library = egs_rz
number of shells = 2 2 2
shell thickness = 0.5 1 2
first plane = -4
number of slabs = 2 8 2
slab thickness = 1 0.5 1
:start media input:
media = M0
:stop media input:
:stop geometry:
Example geometries are available in the rz_lib1.geom and rz_lib2.geom files.
| enum EGS_RZGeometry::DIRS |
| EGS_RZGeometry::EGS_RZGeometry | ( | vector< EGS_BaseGeometry * > | geoms, |
| vector< EGS_Float > | rads, | ||
| vector< EGS_Float > | zbs, | ||
| const string & | name = "" |
||
| ) |
RZ geometry constructor.
geoms must be a 2 length vector of [EGS_CylindersZ*, EGS_PlanesZ] and the radii/zbounds of the geometries must be passed in order to allow calculation of the region masses
Definition at line 54 of file egs_rz.cpp.
|
virtual |
get RZ boundary for a given direction and directional index
This is useful for e.g. outputing bounds for a 3ddose file
Reimplemented from EGS_BaseGeometry.
Definition at line 80 of file egs_rz.cpp.
|
virtual |
get number of regions in a given direction
This is useful for e.g. outputing bounds for a 3ddose file
Reimplemented from EGS_BaseGeometry.
Definition at line 91 of file egs_rz.cpp.
1.9.1