Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
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
00013 {
00014     MCNP_SUCCESS,
00015     MCNP_FAILURE,
00016     DONE
00017 };
00018 enum
00019 {
00020     NOSYS,
00021     CARTESIAN,
00022     CYLINDRICAL,
00023     SPHERICAL
00024 };
00025 
00026 class McnpData
00027 {
00028 
00029   public:
00030     // Constructor and Destructor
00031     McnpData();
00032     ~McnpData();
00033 
00034     // Coordinate system and rotation matrix
00035     int coord_system;
00036     double rotation_matrix[16];
00037 
00038     // Vertices and elements
00039     std::vector< moab::EntityHandle > MCNP_vertices;
00040     std::vector< moab::EntityHandle > MCNP_elems;
00041     moab::Range vert_handles;
00042     moab::Range elem_handles;
00043 
00044     // Tally data
00045     moab::Tag box_min_tag, box_max_tag;
00046     moab::Tag tally_tag;
00047     moab::Tag relerr_tag;
00048 
00049     // MCNP Meshtal file name
00050     std::string MCNP_filename;
00051 
00052     // Setting and retrieving coordinate sysem
00053     MCNPError set_coord_system( int );
00054     int get_coord_system();
00055 
00056     // Setting and retrieving roation matrix
00057     MCNPError set_rotation_matrix( double[16] );
00058     double* get_rotation_matrix();
00059 
00060     // Set the filename
00061     MCNPError set_filename( std::string );
00062     std::string get_filename();
00063 
00064     // MCNP reading routines
00065     MCNPError read_mcnpfile( bool );
00066     MCNPError read_coord_system( std::string );
00067     MCNPError read_rotation_matrix( std::string, int );
00068     MCNPError make_elements( std::vector< double >[3], int* );
00069     MCNPError make_adjacencies( int* );
00070     MCNPError initialize_tags();
00071     MCNPError extract_tally_data( std::string, moab::EntityHandle );
00072 
00073     // Transformation routine
00074     MCNPError transform_point( double*, double*, int, double* );
00075 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines