PyNE C++
Public Member Functions | Public Attributes | List of all members
pyne::Tally Class Reference

Public Member Functions

 Tally ()
 Tally Constructors.
 
 Tally (std::string type, std::string particle_name, int entity, std::string entity_type, std::string entity_name, std::string tally_name="", double entity_size=0.0, double normalization=1.0)
 empty constructor More...
 
 Tally (std::string type, std::vector< std::string > part_names, int entity, std::string entity_type, std::string entity_name, std::string tally_name="", double entity_size=0.0, double normalization=1.0)
 
 Tally (std::string particle_name, std::string entity_geom, vector< double > orgn, vector< double > i_mesh, vector< double > j_mesh, vector< double > k_mesh, vector< int > i_ints=null_v_int, vector< int > j_ints=null_v_int, vector< int > k_ints=null_v_int, vector< double > e_bounds=null_v_dbl, vector< int > e_ints=null_v_int, vector< double > axs=null_v_dbl, vector< double > vec=null_v_dbl, std::string tally_name="", double norm=1.0)
 
hid_t create_dataspace (hid_t file, std::string datapath)
 default destructor
 
hid_t create_filetype ()
 
hid_t create_memtype ()
 
void from_hdf5 (char *filename, char *datapath, int row=-1)
 
void from_hdf5 (std::string filename, std::string datapath, int row=-1)
 
void write_hdf5 (char *filename, char *datapath)
 
void write_hdf5 (std::string filename, std::string datapath)
 
std::string mcnp (int tally_index=1, std::string mcnp_version="mcnp5", std::string out="")
 
template<typename T >
bool is_zero (T vect)
 
std::string form_mcnp_tally (int tally_index, int type, std::string particle_token, int entity_id, double entity_size, double normalization)
 
std::string form_mcnp_meshtally (int tally_index, std::string particle_token, std::string entity_geometry, std::vector< double > axs, std::vector< double > vec, std::vector< double > origin, std::vector< double > meshes[3], std::vector< int > ints[3], std::vector< double > e_bounds, std::vector< int > e_ints, std::string out)
 
std::string fluka (std::string unit_number="-21")
 

Public Attributes

std::map< std::string, std::string > rx2fluka
 
std::map< std::string, std::string > rx2mcnp5
 
std::map< std::string, std::string > rx2mcnp6
 
std::string entity_type
 the type of entity (volume,surface) More...
 
std::string entity_name
 the name of the entity (optional)
 
std::vector< std::string > particle_names
 particle names string
 
std::string tally_type
 type of tally flux or current
 
std::string tally_name
 name of the tally
 
int entity_id
 id number of the entity being tallied upon
 
double entity_size
 the physical size of the entity
 
double normalization
 the tally normalization
 
std::string entity_geometry
 Mesh Tally variables. More...
 
std::vector< double > origin
 Origin of the Mesh Tally.
 
std::vector< double > vec
 defining with axs the place for Theta=0 (Cyl Mesh)
 
std::vector< double > axs
 dircetion of the axis of the cylindrical Mesh
 
std::vector< double > meshes [3]
 mesh interval coordinates
 
std::vector< int > ints [3]
 Bin per mesh interval.
 
std::vector< double > e_bounds
 Energy Mesh.
 
std::vector< int > e_ints
 Bin per energy.
 

Constructor & Destructor Documentation

◆ Tally() [1/3]

pyne::Tally::Tally ( std::string  type,
std::string  particle_name,
int  entity,
std::string  entity_type,
std::string  entity_name,
std::string  tally_name = "",
double  entity_size = 0.0,
double  normalization = 1.0 
)

empty constructor

Constructor for regular tally

Parameters
typethe type of tally (flux or current)
particle_namethe name of the particle type
entitythe entity id of the tally (eg. surface index, volume number)
entity_type(volume or surface)
entity_namestring identifying the entity
tally_namestring identifying the tally
entity_sizethe physical size of the tally volume
normalizationthe number required to normalize your tally

◆ Tally() [2/3]

pyne::Tally::Tally ( std::string  type,
std::vector< std::string >  part_names,
int  entity,
std::string  entity_type,
std::string  entity_name,
std::string  tally_name = "",
double  entity_size = 0.0,
double  normalization = 1.0 
)

Constructor for regular tally

Parameters
typethe type of tally (flux or current)
particles_namevector of the name of the particle types
entitythe entity id of the tally (eg. surface index, volume number)
entity_type(volume or surface)
entity_namestring identifying the entity
tally_namestring identifying the tally
entity_sizethe physical size of the tally volume
normalizationthe number required to normalize your tally

◆ Tally() [3/3]

pyne::Tally::Tally ( std::string  particle_name,
std::string  entity_geom,
vector< double >  orgn,
vector< double >  i_mesh,
vector< double >  j_mesh,
vector< double >  k_mesh,
vector< int >  i_ints = null_v_int,
vector< int >  j_ints = null_v_int,
vector< int >  k_ints = null_v_int,
vector< double >  e_bounds = null_v_dbl,
vector< int >  e_ints = null_v_int,
vector< double >  axs = null_v_dbl,
vector< double >  vec = null_v_dbl,
std::string  tally_name = "",
double  norm = 1.0 
)

Constructor for mesh tally

Parameters
particle_namethe name of the particle type
entity_geom(xyz, cylinder)
orgndouble[3] origin of the meshtally
i_mesh,j_mesh,k_meshvector<double> coordinate of the coarse meshes
i_ints,j_ints,k_intsvector<int> coordinate of the coarse meshes
e_boundsvector<double values of the coearse mesh points in energy in MeV
e_intsvector<int> number of fine mesh points within each corresponding coarse mesh in energy
axsvector<double> vector giving the direction of the axis of the cylindrical mesh
vecvector<double> vector defining along with axs the plane for Theta=0
tally_namestring identifying the tally
normthe number required to normalize your tally

Member Function Documentation

◆ from_hdf5() [1/2]

void pyne::Tally::from_hdf5 ( char *  filename,
char *  datapath,
int  row = -1 
)

Dummy read method wrapper around c style strings

Parameters
filenamethe filename of the file to read from
datapath_name the name of the region where tallies are stored
rowthe array index of data to access

◆ from_hdf5() [2/2]

void pyne::Tally::from_hdf5 ( std::string  filename,
std::string  datapath,
int  row = -1 
)

Main read tally method

Parameters
filenamethe filename of the file to read from
datapath_name the name of the region where tallies are stored
rowthe array index of data to access

◆ write_hdf5() [1/2]

void pyne::Tally::write_hdf5 ( char *  filename,
char *  datapath 
)

Dummy write method wrapper around c style strings

Parameters
filenamethe filename of the file to write to
datapath_name the name of the region where tallies are to be stored

◆ write_hdf5() [2/2]

void pyne::Tally::write_hdf5 ( std::string  filename,
std::string  datapath 
)

Main write tally method

Parameters
filenamethe filename of the file to write to
datapath_name the name of the region where tallies are to be stored

Member Data Documentation

◆ entity_geometry

std::string pyne::Tally::entity_geometry

Mesh Tally variables.

Shape of the Mesh, XYZ or Cylindrical

◆ entity_type

std::string pyne::Tally::entity_type

the type of entity (volume,surface)

fundamental Tally variables Volume/Surface Tally variables


The documentation for this class was generated from the following files: