22#ifdef CAD
33
44#include " cad.h"
5- #include " error.h"
5+ #include " openmc/ error.h"
66
77#include < string>
88#include < algorithm>
@@ -59,25 +59,25 @@ void load_cad_geometry_c()
5959
6060 c->fill_ = openmc::C_NONE ;
6161
62- openmc::global_cells .push_back (c);
62+ openmc::cells .push_back (c);
6363 openmc::cell_map[c->id_ ] = c->id_ ;
6464
6565 // Populate the Universe vector and dict
6666 auto it = openmc::universe_map.find (cad_univ_id);
6767 if (it == openmc::universe_map.end ()) {
68- openmc::global_universes .push_back (new openmc::Universe ());
69- openmc::global_universes .back ()-> id = cad_univ_id;
70- openmc::global_universes .back ()->cells .push_back (i);
71- openmc::universe_map[cad_univ_id] = openmc::global_universes .size () - 1 ;
68+ openmc::universes .push_back (new openmc::Universe ());
69+ openmc::universes .back ()-> id_ = cad_univ_id;
70+ openmc::universes .back ()->cells_ .push_back (i);
71+ openmc::universe_map[cad_univ_id] = openmc::universes .size () - 1 ;
7272 }
7373 else {
74- openmc::global_universes [it->second ]->cells .push_back (i);
74+ openmc::universes [it->second ]->cells_ .push_back (i);
7575 }
7676
7777
7878 if (DAGMC ->is_implicit_complement (vol_handle)) {
7979 // assuming implicit complement is void for now
80- c->material .push_back (openmc::MATERIAL_VOID );
80+ c->material_ .push_back (openmc::MATERIAL_VOID );
8181 continue ;
8282 }
8383
@@ -88,29 +88,29 @@ void load_cad_geometry_c()
8888 TOLOWER (mat_value);
8989
9090 if (mat_value == " void" ) {
91- c->material .push_back (openmc::MATERIAL_VOID );
91+ c->material_ .push_back (openmc::MATERIAL_VOID );
9292 }
9393 else {
94- c->material .push_back (std::stoi (mat_value));
94+ c->material_ .push_back (std::stoi (mat_value));
9595 }
9696 }
9797 else {
9898 std::cout << " Warning: volume without material found!" << std::endl;
99- c->material .push_back (openmc::MATERIAL_VOID );
99+ c->material_ .push_back (openmc::MATERIAL_VOID );
100100 }
101101 }
102102
103103 // initialize surface objects
104104 openmc::n_surfaces = DAGMC ->num_entities (2 );
105- openmc::global_surfaces .resize (openmc::n_surfaces);
105+ openmc::surfaces .resize (openmc::n_surfaces);
106106
107107 for (int i = 0 ; i < openmc::n_surfaces; i++)
108108 {
109109 moab::EntityHandle surf_handle = DAGMC ->entity_by_index (2 , i+1 );
110110
111111 // set cell ids using global IDs
112112 openmc::CADSurface* s = new openmc::CADSurface ();
113- s->id = DAGMC ->id_by_index (2 , i+1 );
113+ s->id_ = DAGMC ->id_by_index (2 , i+1 );
114114 s->dagmc_ptr = DAGMC ;
115115
116116 if (DAGMC ->has_prop (surf_handle, " boundary" )) {
@@ -120,32 +120,32 @@ void load_cad_geometry_c()
120120 TOLOWER (bc_value);
121121
122122 if (bc_value == " transmit" || bc_value == " transmission" ) {
123- s->bc = openmc::BC_TRANSMIT ;
123+ s->bc_ = openmc::BC_TRANSMIT ;
124124 }
125125 else if (bc_value == " vacuum" ) {
126- s->bc = openmc::BC_VACUUM ;
126+ s->bc_ = openmc::BC_VACUUM ;
127127 }
128128 else if (bc_value == " reflective" || bc_value == " reflect" || bc_value == " reflecting" ) {
129- s->bc = openmc::BC_REFLECT ;
129+ s->bc_ = openmc::BC_REFLECT ;
130130 }
131131 else if (bc_value == " periodic" ) {
132132 openmc::fatal_error (" Periodic boundary condition not supported in CAD." );
133133 }
134134 else {
135135 std::stringstream err_msg;
136- err_msg << " Unknown boundary condition \" " << s->bc
137- << " \" specified on surface " << s->id ;
136+ err_msg << " Unknown boundary condition \" " << s->bc_
137+ << " \" specified on surface " << s->id_ ;
138138 openmc::fatal_error (err_msg);
139139 }
140140 }
141141 // if no BC property is found, set to transmit
142142 else {
143- s->bc = openmc::BC_TRANSMIT ;
143+ s->bc_ = openmc::BC_TRANSMIT ;
144144 }
145145
146146 // add to global array and map
147- openmc::global_surfaces [i] = s;
148- openmc::surface_map[s->id ] = s->id ;
147+ openmc::surfaces [i] = s;
148+ openmc::surface_map[s->id_ ] = s->id_ ;
149149 }
150150
151151 return ;
0 commit comments