Loading [MathJax]/extensions/tex2jax.js
Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mcnpmit.hpp
Go to the documentation of this file.
1 #include "moab/Core.hpp" 2 #include "moab/Range.hpp" 3 #include <iostream> 4 #define MCNP mc_instance() 5 #define BOXMIN_TAG "BOXMIN_TAG" 6 #define BOXMAX_TAG "BOXMAX_TAG" 7 #define TALLY_TAG "TALLY_TAG" 8 #define ERROR_TAG "ERROR_TAG" 9  10 #define MBI mb_instance() 11  12 enum MCNPError 13 { 14  MCNP_SUCCESS, 15  MCNP_FAILURE, 16  DONE 17 }; 18 enum 19 { 20  NOSYS, 21  CARTESIAN, 22  CYLINDRICAL, 23  SPHERICAL 24 }; 25  26 class McnpData 27 { 28  29  public: 30  // Constructor and Destructor 31  McnpData(); 32  ~McnpData(); 33  34  // Coordinate system and rotation matrix 35  int coord_system; 36  double rotation_matrix[16]; 37  38  // Vertices and elements 39  std::vector< moab::EntityHandle > MCNP_vertices; 40  std::vector< moab::EntityHandle > MCNP_elems; 41  moab::Range vert_handles; 42  moab::Range elem_handles; 43  44  // Tally data 45  moab::Tag box_min_tag, box_max_tag; 46  moab::Tag tally_tag; 47  moab::Tag relerr_tag; 48  49  // MCNP Meshtal file name 50  std::string MCNP_filename; 51  52  // Setting and retrieving coordinate sysem 53  MCNPError set_coord_system( int ); 54  int get_coord_system(); 55  56  // Setting and retrieving roation matrix 57  MCNPError set_rotation_matrix( double[16] ); 58  double* get_rotation_matrix(); 59  60  // Set the filename 61  MCNPError set_filename( std::string ); 62  std::string get_filename(); 63  64  // MCNP reading routines 65  MCNPError read_mcnpfile( bool ); 66  MCNPError read_coord_system( std::string ); 67  MCNPError read_rotation_matrix( std::string, int ); 68  MCNPError make_elements( std::vector< double >[3], int* ); 69  MCNPError make_adjacencies( int* ); 70  MCNPError initialize_tags(); 71  MCNPError extract_tally_data( std::string, moab::EntityHandle ); 72  73  // Transformation routine 74  MCNPError transform_point( double*, double*, int, double* ); 75 };