Volume




A Volume is defined by its border surfaces, which are built provided the volume type, its position, its axes and its size. RecPack provides some predefined volume (Box and Tube --two concentric cylinders--), but adding new types is straight forward. The data members of the base class Volume are:

// type of volume: Box, Tube, etc.
std::string name;
// other names
std::string< std::string, std::string > names;

// the map of axes defining the volume orientation
std::string< std::string, EVector > axes;
// the map of parameters to define the volume size
std::map< std::string, double > parameters;

// the position of the volume
EVector position;
// pointer to the outer volume
Volume* outer_volume;
// map of vector of surfaces
std::map< std::string, std::vector< Surface* > > surfacesmap;
// vector of surfaces
std::vector< Surface* > surfaces;
// vector of inner volumes
std::vector< Volume* > inner_volumes;

The name and the map of names are inherited from the base class NamedObject. Example on how to create a Volume.