#include <ReadMCNP5.hpp>
Public Member Functions | |
ErrorCode | load_file (const char *file_name, const EntityHandle *file_set, const FileOptions &opts, const SubsetList *subset_list=0, const Tag *file_id_tag=0) |
Load mesh from a file. More... | |
ErrorCode | read_tag_values (const char *file_name, const char *tag_name, const FileOptions &opts, std::vector< int > &tag_values_out, const SubsetList *subset_list=0) |
Read tag values from a file. More... | |
ReadMCNP5 (Interface *impl=NULL) | |
virtual | ~ReadMCNP5 () |
Public Member Functions inherited from moab::ReaderIface | |
virtual | ~ReaderIface () |
Static Public Member Functions | |
static ReaderIface * | factory (Interface *) |
Private Types | |
enum | coordinate_system { NO_SYSTEM , CARTESIAN , CYLINDRICAL , SPHERICAL } |
enum | particle { NEUTRON , PHOTON , ELECTRON } |
Private Member Functions | |
ErrorCode | load_one_file (const char *fname, const EntityHandle *input_meshset, const FileOptions &options, const bool average) |
ErrorCode | create_tags (Tag &date_and_time_tag, Tag &title_tag, Tag &nps_tag, Tag &tally_number_tag, Tag &tally_comment_tag, Tag &tally_particle_tag, Tag &tally_coord_sys_tag, Tag &tally_tag, Tag &error_tag) |
ErrorCode | read_file_header (std::fstream &file, bool debug, char date_and_time[100], char title[100], unsigned long int &nps) |
ErrorCode | set_header_tags (EntityHandle output_meshset, char date_and_time[100], char title[100], unsigned long int nps, Tag data_and_time_tag, Tag title_tag, Tag nps_tag) |
ErrorCode | read_tally_header (std::fstream &file, bool debug, unsigned int &tally_number, char tally_comment[100], particle &tally_particle) |
ErrorCode | get_tally_particle (std::string a, bool debug, particle &tally_particle) |
ErrorCode | read_mesh_planes (std::fstream &file, bool debug, std::vector< double > planes[3], coordinate_system &coord_sys) |
ErrorCode | get_mesh_plane (std::istringstream &ss, bool debug, std::vector< double > &plane) |
ErrorCode | read_element_values_and_errors (std::fstream &file, bool debug, std::vector< double > planes[3], unsigned int n_chopped_x0_planes, unsigned int n_chopped_x2_planes, particle tally_particle, double values[], double errors[]) |
ErrorCode | set_tally_tags (EntityHandle tally_meshset, unsigned int tally_number, char tally_comment[100], particle tally_particle, coordinate_system tally_coord_sys, Tag tally_number_tag, Tag tally_comment_tag, Tag tally_particle_tag, Tag tally_coord_sys_tag) |
ErrorCode | create_vertices (std::vector< double > planes[3], bool debug, EntityHandle &start_vert, coordinate_system coord_sys, EntityHandle tally_meshset) |
ErrorCode | create_elements (bool debug, std::vector< double > planes[3], unsigned int n_chopped_x0_planes, unsigned int n_chopped_x2_planes, EntityHandle start_vert, double values[], double errors[], Tag tally_tag, Tag error_tag, EntityHandle tally_meshset, coordinate_system tally_coord_sys) |
ErrorCode | average_with_existing_tally (bool debug, unsigned long int &new_nps, unsigned long int nps, unsigned int tally_number, Tag tally_number_tag, Tag nps_tag, Tag tally_tag, Tag error_tag, double values[], double errors[], unsigned int n_elements) |
ErrorCode | transform_point_to_cartesian (double *in, double *out, coordinate_system coord_sys) |
ErrorCode | average_tally_values (const unsigned long int nps0, const unsigned long int nps1, double *values0, const double *values1, double *errors0, const double *errors1, const unsigned long int n_values) |
Private Attributes | |
ReadUtilIface * | readMeshIface |
Interface * | MBI |
const Tag * | fileIDTag |
int | nodeId |
int | elemId |
Static Private Attributes | |
static const double | PI = 3.141592653589793 |
static const double | C2PI = 0.1591549430918954 |
static const double | CPI = 0.3183098861837907 |
Definition at line 52 of file ReadMCNP5.hpp.
|
private |
Enumerator | |
---|---|
NO_SYSTEM | |
CARTESIAN | |
CYLINDRICAL | |
SPHERICAL |
Definition at line 84 of file ReadMCNP5.hpp.
|
private |
Enumerator | |
---|---|
NEUTRON | |
PHOTON | |
ELECTRON |
Definition at line 91 of file ReadMCNP5.hpp.
moab::ReadMCNP5::ReadMCNP5 | ( | Interface * | impl = NULL | ) |
Definition at line 46 of file ReadMCNP5.cpp.
References MBI, moab::Interface::query_interface(), and readMeshIface.
Referenced by factory().
|
virtual |
Definition at line 54 of file ReadMCNP5.cpp.
References MBI, readMeshIface, and moab::Interface::release_interface().
|
private |
Definition at line 1006 of file ReadMCNP5.cpp.
References moab::Util::is_finite(), and MB_SUCCESS.
Referenced by average_with_existing_tally().
|
private |
Definition at line 883 of file ReadMCNP5.cpp.
References average_tally_values(), moab::debug, ErrorCode, moab::Range::front(), moab::Interface::get_entities_by_type(), moab::Interface::get_entities_by_type_and_tag(), MB_SUCCESS, MBENTITYSET, MBHEX, MBI, moab::Range::size(), moab::Interface::tag_get_data(), and moab::Interface::tag_set_data().
Referenced by load_one_file().
|
private |
Definition at line 793 of file ReadMCNP5.cpp.
References moab::Interface::add_entities(), moab::ReadUtilIface::assign_ids(), CARTESIAN, CYLINDRICAL, moab::debug, elemId, ErrorCode, fileIDTag, moab::ReadUtilIface::get_element_connect(), MB_NOT_IMPLEMENTED, MB_START_ID, MB_SUCCESS, MBHEX, MBI, readMeshIface, size, moab::Range::size(), and moab::Interface::tag_set_data().
Referenced by load_one_file().
|
private |
Definition at line 335 of file ReadMCNP5.cpp.
References ErrorCode, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TAG_SPARSE, MB_TYPE_DOUBLE, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, MBI, and moab::Interface::tag_get_handle().
Referenced by load_one_file().
|
private |
Definition at line 741 of file ReadMCNP5.cpp.
References moab::Interface::add_entities(), moab::ReadUtilIface::assign_ids(), moab::debug, ErrorCode, fileIDTag, moab::ReadUtilIface::get_node_coords(), MB_START_ID, MB_SUCCESS, MBI, nodeId, readMeshIface, moab::Range::size(), and transform_point_to_cartesian().
Referenced by load_one_file().
|
static |
Definition at line 40 of file ReadMCNP5.cpp.
References iface, and ReadMCNP5().
Referenced by moab::ReaderWriterSet::ReaderWriterSet().
|
private |
Definition at line 647 of file ReadMCNP5.cpp.
References moab::debug, and MB_SUCCESS.
Referenced by read_mesh_planes().
|
private |
Definition at line 479 of file ReadMCNP5.cpp.
References moab::debug, ELECTRON, MB_SUCCESS, NEUTRON, and PHOTON.
Referenced by read_tally_header().
|
virtual |
Load mesh from a file.
Method all readers must provide to import a mesh.
file_name | The file to read. |
file_set | Optional pointer to entity set representing file. If this is not NULL, reader may optionally tag the pointed-to set with format-specific meta-data. |
subset_list | An optional struct pointer specifying the tags identifying entity sets to be read. |
file_id_tag | If specified, reader should store for each entity it reads, a unique integer ID for this tag. |
Implements moab::ReaderIface.
Definition at line 73 of file ReadMCNP5.cpp.
References elemId, ErrorCode, fileIDTag, moab::FileOptions::get_int_option(), length(), load_one_file(), MB_SET_ERR, MB_SUCCESS, MB_UNSUPPORTED_OPERATION, and nodeId.
|
private |
Definition at line 131 of file ReadMCNP5.cpp.
References average_with_existing_tally(), create_elements(), moab::Interface::create_meshset(), create_tags(), create_vertices(), CYLINDRICAL, moab::debug, ErrorCode, moab::Interface::get_entities_by_type_and_tag(), moab::FileOptions::get_null_option(), MB_SUCCESS, MBENTITYSET, MBI, MESHSET_SET, read_element_values_and_errors(), read_file_header(), read_mesh_planes(), read_tally_header(), set_header_tags(), set_tally_tags(), size, moab::Range::size(), and moab::Interface::tag_set_data().
Referenced by load_file().
|
private |
Definition at line 662 of file ReadMCNP5.cpp.
References moab::Util::is_finite(), MB_SUCCESS, PHOTON, and size.
Referenced by load_one_file().
|
private |
Definition at line 374 of file ReadMCNP5.cpp.
References moab::debug, and MB_SUCCESS.
Referenced by load_one_file().
|
private |
Definition at line 501 of file ReadMCNP5.cpp.
References CARTESIAN, CYLINDRICAL, moab::debug, ErrorCode, get_mesh_plane(), and MB_SUCCESS.
Referenced by load_one_file().
|
virtual |
Read tag values from a file.
Read the list if all integer tag values from the file for a tag that is a single integer value per entity.
file_name | The file to read. |
tag_name | The tag for which to read values |
tag_values_out | Output: The list of tag values. |
subset_list | An array of tag name and value sets specifying the subset of the file to read. If multiple tags are specified, the sets that match all tags (intersection) should be read. |
subset_list_length | The length of the 'subset_list' array. |
Implements moab::ReaderIface.
Definition at line 63 of file ReadMCNP5.cpp.
References MB_NOT_IMPLEMENTED.
|
private |
Definition at line 430 of file ReadMCNP5.cpp.
References moab::debug, ErrorCode, get_tally_particle(), and MB_SUCCESS.
Referenced by load_one_file().
|
private |
Definition at line 411 of file ReadMCNP5.cpp.
References ErrorCode, MB_SUCCESS, MBI, and moab::Interface::tag_set_data().
Referenced by load_one_file().
|
private |
Definition at line 718 of file ReadMCNP5.cpp.
References ErrorCode, MB_SUCCESS, MBI, and moab::Interface::tag_set_data().
Referenced by load_one_file().
|
private |
Definition at line 979 of file ReadMCNP5.cpp.
References CARTESIAN, CYLINDRICAL, MB_NOT_IMPLEMENTED, MB_SUCCESS, PI, and SPHERICAL.
Referenced by create_vertices().
|
staticprivate |
Definition at line 81 of file ReadMCNP5.hpp.
|
staticprivate |
Definition at line 82 of file ReadMCNP5.hpp.
|
private |
Definition at line 105 of file ReadMCNP5.hpp.
Referenced by create_elements(), and load_file().
|
private |
Definition at line 104 of file ReadMCNP5.hpp.
Referenced by create_elements(), create_vertices(), and load_file().
|
private |
Definition at line 102 of file ReadMCNP5.hpp.
Referenced by average_with_existing_tally(), create_elements(), create_tags(), create_vertices(), load_one_file(), ReadMCNP5(), set_header_tags(), set_tally_tags(), and ~ReadMCNP5().
|
private |
Definition at line 105 of file ReadMCNP5.hpp.
Referenced by create_vertices(), and load_file().
|
staticprivate |
Definition at line 80 of file ReadMCNP5.hpp.
Referenced by transform_point_to_cartesian().
|
private |
Definition at line 99 of file ReadMCNP5.hpp.
Referenced by create_elements(), create_vertices(), ReadMCNP5(), and ~ReadMCNP5().