Skip to content

Commit

Permalink
back to origin
Browse files Browse the repository at this point in the history
  • Loading branch information
bam241 committed Dec 11, 2024
1 parent 2b8ba5d commit bcd0ce4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
24 changes: 12 additions & 12 deletions src/dagmc/dagmcmetadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,8 @@ void dagmcMetaData::parse_material_data() {
// set the material value
volume_material_property_data_eh[eh] = grp_name;
logger.message("Group name -- " + grp_name);
bool is_graveyard = dagmc_util::to_lower(grp_name) ==
dagmc_util::to_lower(graveyard_mat_str());
bool is_vacuum = dagmc_util::to_lower(grp_name) ==
dagmc_util::to_lower(vacuum_mat_str());
bool is_graveyard = to_lower(grp_name) == to_lower(graveyard_mat_str());
bool is_vacuum = to_lower(grp_name) == to_lower(vacuum_mat_str());

// not graveyard or vacuum or implicit compliment
if (!is_graveyard && !is_vacuum && !DAG->is_implicit_complement(eh)) {
Expand Down Expand Up @@ -347,6 +345,11 @@ void dagmcMetaData::parse_tally_volume_data() {
}
}

std::string dagmcMetaData::to_lower(std::string input) {
dagmc_util::lowercase_str(input);
return input;
}

// parse the boundary data
void dagmcMetaData::parse_boundary_data() {
auto boundary_assignments = get_property_assignments("boundary", 2, ":");
Expand Down Expand Up @@ -376,18 +379,15 @@ void dagmcMetaData::parse_boundary_data() {
// 2d entities have been tagged with the boundary condition property
// ie. both surfaces and its member triangles

std::string bc_string = dagmc_util::to_lower(boundary_assignment[0]);
std::string bc_string = to_lower(boundary_assignment[0]);

if (bc_string.find(dagmc_util::to_lower(reflecting_str())) !=
std::string::npos)
if (bc_string.find(to_lower(reflecting_str())) != std::string::npos)
surface_boundary_data_eh[eh] = reflecting_str();
if (bc_string.find(dagmc_util::to_lower(white_str())) !=
std::string::npos)
if (bc_string.find(to_lower(white_str())) != std::string::npos)
surface_boundary_data_eh[eh] = white_str();
if (bc_string.find(dagmc_util::to_lower(periodic_str())) !=
std::string::npos)
if (bc_string.find(to_lower(periodic_str())) != std::string::npos)
surface_boundary_data_eh[eh] = periodic_str();
if (bc_string.find(dagmc_util::to_lower(vacuum_str())) != std::string::npos)
if (bc_string.find(to_lower(vacuum_str())) != std::string::npos)
surface_boundary_data_eh[eh] = vacuum_str();
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/dagmc/dagmcmetadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ class dagmcMetaData {
*/
std::set<std::string> set_remove_rich(std::set<std::string> properties_set);

std::string to_lower(const std::string input);

// public member variables
public:
/**
Expand Down
5 changes: 0 additions & 5 deletions src/dagmc/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,5 @@ inline void lowercase_str(std::string& input) {
[](unsigned char c) { return std::tolower(c); });
}

inline std::string to_lower(std::string input) {
lowercase_str(input);
return input;
}

} // namespace dagmc_util
#endif

0 comments on commit bcd0ce4

Please sign in to comment.