Skip to content

Commit

Permalink
Supporting a copule more surface conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
pshriwise committed Jul 6, 2020
1 parent cc43370 commit 8f49302
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/dagmc/dagmcmetadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@ void dagmcMetaData::parse_tally_volume_data() {
}
}

void dagmcMetaData::to_lower(std::string& input) {
for (int i = 0; i < input.size(); i++) {
input[i] = std::tolower(input[i]);
}
}

// parse the boundary data
void dagmcMetaData::parse_boundary_data() {
auto boundary_assignments = get_property_assignments("boundary", 2, ":");
Expand All @@ -337,10 +343,17 @@ void dagmcMetaData::parse_boundary_data() {
// 2d entities have been tagged with the boundary condition property
// ie. both surfaces and its members triangles,

if (boundary_assignment[0].find("Reflecting") != std::string::npos)

to_lower(boundary_assignment[0]);

if (boundary_assignment[0].find("reflecting") != std::string::npos)
surface_boundary_data_eh[eh] = "Reflecting";
if (boundary_assignment[0].find("White") != std::string::npos)
if (boundary_assignment[0].find("white") != std::string::npos)
surface_boundary_data_eh[eh] = "White";
if (boundary_assignment[0].find("periodic") != std::string::npos)
surface_boundary_data_eh[eh] = "Periodic";
if (boundary_assignment[0].find("vacuum") != std::string::npos)
surface_boundary_data_eh[eh] = "Vacuum";
}
}

Expand Down Expand Up @@ -570,7 +583,7 @@ std::pair<std::string, std::string> dagmcMetaData::split_string(std::string prop
int str_length = property_string.length() - found_delimiter;
second = property_string.substr(found_delimiter + 1, str_length);
} else {
std::cout << "Didnt find any delimiter" << std::endl;
std::cout << "Didn't find any delimiter" << std::endl;
std::cout << "Returning empty strings" << std::endl;
}

Expand Down
2 changes: 2 additions & 0 deletions src/dagmc/dagmcmetadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ class dagmcMetaData {
// the second one
std::set<std::string> set_remove_rich(std::set<std::string> properties_set);

void to_lower(std::string& input);

// public member variables
public:
// material property data map, mat:/density value
Expand Down

0 comments on commit 8f49302

Please sign in to comment.