moab
mcnpmit.hpp
Go to the documentation of this file.
00001 #include "moab/Core.hpp"
00002 #include "moab/Range.hpp"
00003 #include <iostream>
00004 #define MCNP mc_instance()
00005 #define BOXMIN_TAG "BOXMIN_TAG"
00006 #define BOXMAX_TAG "BOXMAX_TAG"
00007 #define TALLY_TAG  "TALLY_TAG"
00008 #define ERROR_TAG  "ERROR_TAG"
00009 
00010 #define MBI mb_instance()
00011 
00012 enum MCNPError { MCNP_SUCCESS, MCNP_FAILURE, DONE };
00013 enum { NOSYS, CARTESIAN, CYLINDRICAL, SPHERICAL };
00014 
00015 class McnpData {
00016       
00017       public:
00018             // Constructor and Destructor
00019             McnpData ();
00020             ~McnpData ();
00021 
00022             // Coordinate system and rotation matrix
00023             int coord_system;
00024             double rotation_matrix[16];
00025 
00026             // Vertices and elements
00027             std::vector<moab::EntityHandle> MCNP_vertices;
00028             std::vector<moab::EntityHandle> MCNP_elems;
00029             moab::Range                 vert_handles;
00030             moab::Range                 elem_handles;
00031 
00032             // Tally data
00033             moab::Tag box_min_tag, box_max_tag;
00034             moab::Tag tally_tag;
00035             moab::Tag relerr_tag;
00036 
00037             // MCNP Meshtal file name
00038             std::string MCNP_filename;
00039 
00040             // Setting and retrieving coordinate sysem
00041             MCNPError set_coord_system(int);
00042             int get_coord_system();
00043 
00044             // Setting and retrieving roation matrix
00045             MCNPError set_rotation_matrix(double[16]); 
00046             double* get_rotation_matrix();
00047 
00048             // Set the filename
00049             MCNPError set_filename(std::string);
00050             std::string get_filename();
00051 
00052             // MCNP reading routines
00053             MCNPError read_mcnpfile(bool);
00054             MCNPError read_coord_system(std::string);
00055             MCNPError read_rotation_matrix(std::string, int);
00056             MCNPError make_elements(std::vector<double> [3], int*);
00057             MCNPError make_adjacencies(int*);
00058             MCNPError initialize_tags();
00059             MCNPError extract_tally_data(std::string, moab::EntityHandle);
00060 
00061             // Transformation routine
00062             MCNPError transform_point(double*, double*, int, double*);
00063 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines