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
31 McnpData();
32 ~McnpData();
33
34
35 int coord_system;
36 double rotation_matrix[16];
37
38
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
45 moab::Tag box_min_tag, box_max_tag;
46 moab::Tag tally_tag;
47 moab::Tag relerr_tag;
48
49
50 std::string MCNP_filename;
51
52
53 MCNPError set_coord_system( int );
54 int get_coord_system();
55
56
57 MCNPError set_rotation_matrix( double[16] );
58 double* get_rotation_matrix();
59
60
61 MCNPError set_filename( std::string );
62 std::string get_filename();
63
64
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
74 MCNPError transform_point( double*, double*, int, double* );
75 };