Skip to content

Commit

Permalink
Adressing remaining review comments
Browse files Browse the repository at this point in the history
addressing @gonuke last comments
  • Loading branch information
bam241 committed May 28, 2020
1 parent aec2371 commit 4da86ca
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/dagmc/DagMC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ unsigned int DagMC::interface_revision() {
return result;
}

/* SECTION I: Geometry Initialization and problem setup */

// the standard DAGMC load file method
ErrorCode DagMC::load_file(const char* cfile) {
ErrorCode rval;
Expand All @@ -142,7 +144,7 @@ ErrorCode DagMC::load_file(const char* cfile) {
// Some options were unhandled; this is common for loading h5m files.
// Print a warning if an option was unhandled for a file that does not end in '.h5m'
std::string filename(cfile);
if (std::string(file_ext) != ".h5m") {
if (file_ext != ".h5m") {
std::cerr << "DagMC warning: unhandled file loading options." << std::endl;
}
} else if (MB_SUCCESS != rval) {
Expand Down Expand Up @@ -395,15 +397,14 @@ int DagMC::get_entity_id(EntityHandle this_ent) {
ErrorCode DagMC::build_indices(Range& surfs, Range& vols) {
ErrorCode rval = MB_SUCCESS;

// surf/vol offsets are just first handles
EntityHandle tmp_offset = 0;

if (surfs.size() == 0 || vols.size() == 0) {
std::cout << "Volumes or Surfaces not found" << std::endl;
return MB_ENTITY_NOT_FOUND;
}
setOffset = std::min(*surfs.begin(), *vols.begin());
tmp_offset = std::max(surfs.back(), vols.back());
// surf/vol offsets are just first handles
EntityHandle tmp_offset = std::max(surfs.back(), vols.back());

// set size
entIndices.resize(tmp_offset - setOffset + 1);
Expand Down

0 comments on commit 4da86ca

Please sign in to comment.