Some fixes after the rebase.

This commit is contained in:
shriwise 2018-08-17 13:36:16 -05:00 committed by pshriwise
parent aa1374504b
commit 32f91ace56
7 changed files with 16 additions and 21 deletions

View file

@ -404,6 +404,10 @@ extern "C" {
int surface_bc(Surface* surf);
bool surface_sense(Surface* surf, double xyz[3], double uvw[3]);
void surface_reflect(Surface* surf, double xyz[3], double uvw[3]);
/* double surface_distance(Surface* surf, double xyz[3], double uvw[3], */
/* bool coincident); */
/* void surface_normal(Surface* surf, double xyz[3], double uvw[3]); */
/* void surface_to_hdf5(CSGSurface* surf, hid_t group); */
int surface_i_periodic(PeriodicSurface* surf);
bool surface_periodic(PeriodicSurface* surf, PeriodicSurface* other,
double xyz[3], double uvw[3]);

View file

@ -77,7 +77,7 @@ void load_cad_geometry_c()
if(DAGMC->is_implicit_complement(vol_handle)) {
// assuming implicit complement is void for now
c->material.push_back(openmc::C_MATERIAL_VOID);
c->material.push_back(openmc::MATERIAL_VOID);
continue;
}
@ -88,7 +88,7 @@ void load_cad_geometry_c()
TOLOWER(mat_value);
if(mat_value == "void") {
c->material.push_back(openmc::C_MATERIAL_VOID);
c->material.push_back(openmc::MATERIAL_VOID);
}
else {
c->material.push_back(std::stoi(mat_value));
@ -96,13 +96,13 @@ void load_cad_geometry_c()
}
else {
std::cout << "Warning: volume without material found!" << std::endl;
c->material.push_back(openmc::C_MATERIAL_VOID);
c->material.push_back(openmc::MATERIAL_VOID);
}
}
// initialize surface objects
openmc::n_surfaces = DAGMC->num_entities(2);
openmc::surfaces_c = new openmc::Surface*[openmc::n_surfaces];
openmc::global_surfaces.resize(openmc::n_surfaces);
for(int i = 0; i < openmc::n_surfaces; i++)
{
@ -144,7 +144,7 @@ void load_cad_geometry_c()
}
// add to global array and map
openmc::surfaces_c[i] = s;
openmc::global_surfaces[i] = s;
openmc::surface_map[s->id] = s->id;
}

View file

@ -769,8 +769,6 @@ extern "C" {
int cell_type(Cell* c) {return c->type_;}
int cell_material(Cell* c, int32_t mat_ind) {return c->material[mat_ind-1];}
#ifdef CAD
int32_t next_cell(CADCell* cur_cell, CADSurface *surf_xed ) {

View file

@ -129,7 +129,7 @@ module constants
integer(C_INT), bind(C, name='FILL_LATTICE') :: FILL_LATTICE_C = FILL_LATTICE
! Void material
integer, parameter :: MATERIAL_VOID = -2
integer, parameter :: MATERIAL_VOID = -1
! Flag to say that the outside of a lattice is not defined
integer, parameter :: NO_OUTER_UNIVERSE = -1
@ -424,7 +424,7 @@ module constants
real(8), parameter :: ERROR_REAL = -huge(0.0_8) * 0.917826354_8
! Running modes
integer, parameter :: &
integer, parameter :: &
MODE_FIXEDSOURCE = 1, & ! Fixed source mode
MODE_EIGENVALUE = 2, & ! K eigenvalue mode
MODE_PLOTTING = 3, & ! Plotting mode

View file

@ -27,13 +27,6 @@ module geometry_header
integer(C_INT32_T), intent(in), value :: cell_ind
type(C_PTR) :: ptr
end function cell_pointer
function cell_material_c(cell_ptr, mat_ind) bind(C, name='cell_material') result(mat_id)
import C_PTR, C_INT32_T
type(C_PTR), intent(in), value :: cell_ptr
integer(C_INT32_T), intent(in), value :: mat_ind
integer(C_INT32_T) :: mat_id
end function cell_material_c
function cell_id_c(cell_ptr) bind(C, name='cell_id') result(id)
import C_PTR, C_INT32_T

View file

@ -599,8 +599,8 @@ contains
do i = 1, n_cells
c => cells(i)
! additional metadata spoofing
allocate(c % material(1))
c % material(1) = cell_material_c(cell_pointer_c(i-1), 1)
! allocate(c % material(1))
! c % material(1) = cell_material(cell_pointer(i-1), 1)
allocate(c % sqrtKT(1))
c % sqrtkT(1) = 293
c % sqrtkT(:) = sqrt(K_BOLTZMANN * c % sqrtkT(:))
@ -852,7 +852,7 @@ contains
allocate(surfaces(n_surfaces))
do i = 1, n_surfaces
surfaces(i) % ptr = surface_pointer_c(i - 1);
surfaces(i) % ptr = surface_pointer(i - 1);
! Add surface to dictionary
call surface_dict % set(surfaces(i) % id(), i)
end do
@ -868,7 +868,7 @@ contains
do i = 1, n_cells
c => cells(i)
c % ptr = cell_pointer_c(i - 1)
c % ptr = cell_pointer(i - 1)
! Check to make sure 'id' hasn't been used
if (cell_dict % has(c % id())) then
call fatal_error("Two or more cells use the same unique ID: " &

View file

@ -249,7 +249,7 @@ CSGSurface::to_hdf5(hid_t group_id) const
// CADSurface implementation
//==============================================================================
#ifdef CAD
CADSurface::CADSurface() :Surface{} {} // empty constructor
CADSurface::CADSurface() : Surface{} {} // empty constructor
double CADSurface::evaluate(Position r) const
{