Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
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 
13 {
16  DONE
17 };
18 enum
19 {
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
36  double rotation_matrix[16];
37 
38  // Vertices and elements
39  std::vector< moab::EntityHandle > MCNP_vertices;
40  std::vector< moab::EntityHandle > MCNP_elems;
43 
44  // Tally data
48 
49  // MCNP Meshtal file name
50  std::string MCNP_filename;
51 
52  // Setting and retrieving coordinate sysem
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* );
72 
73  // Transformation routine
74  MCNPError transform_point( double*, double*, int, double* );
75 };