Skip to content

Commit

Permalink
fixing cuda bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathaniel Morgan committed Aug 5, 2024
1 parent 97e2008 commit f2620c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void SGH::update_state(


// --- pressure ---
if (Materials.MaterialEnums(mat_id).EOSType == model::decoupledEOSType) {
if (Materials.MaterialEnums.host(mat_id).EOSType == model::decoupledEOSType) {

// loop over all the elements the material lives in
FOR_ALL(mat_elem_lid, 0, num_material_elems, {
Expand Down
8 changes: 8 additions & 0 deletions single-node-refactor/src/input/parse_yaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1611,19 +1611,23 @@ void parse_materials(Yaml::Node& root, Material_t& Materials)
RUN({
Materials.MaterialEnums(mat_id).EOSType = model::decoupledEOSType;
});

Materials.MaterialEnums.host(mat_id).EOSType = model::decoupledEOSType;
break;

case model::coupledEOSType:
std::cout << "Setting EOS type to coupled " << std::endl;
RUN({
Materials.MaterialEnums(mat_id).EOSType = model::coupledEOSType;
});
Materials.MaterialEnums.host(mat_id).EOSType = model::coupledEOSType;
break;

default:
RUN({
Materials.MaterialEnums(mat_id).EOSType = model::noEOSType;
});
Materials.MaterialEnums.host(mat_id).EOSType = model::noEOSType;
std::cout << "ERROR: No valid EOS type input " << std::endl;
std::cout << "Valid EOS types are: " << std::endl;

Expand Down Expand Up @@ -1717,6 +1721,7 @@ void parse_materials(Yaml::Node& root, Material_t& Materials)
RUN({
Materials.MaterialEnums(mat_id).StrengthType = model::noStrengthType;
});
Materials.MaterialEnums.host(mat_id).StrengthType = model::noStrengthType;
if (VERBOSE) {
std::cout << "\tstrength_model_type_type = " << strength_model_type << std::endl;
}
Expand All @@ -1726,6 +1731,7 @@ void parse_materials(Yaml::Node& root, Material_t& Materials)
RUN({
Materials.MaterialEnums(mat_id).StrengthType = model::incrementBased;
});
Materials.MaterialEnums.host(mat_id).StrengthType = model::incrementBased;

if (VERBOSE) {
std::cout << "\tstrength_model_type = " << strength_model_type << std::endl;
Expand All @@ -1735,6 +1741,8 @@ void parse_materials(Yaml::Node& root, Material_t& Materials)
RUN({
Materials.MaterialEnums(mat_id).StrengthType = model::stateBased;
});
Materials.MaterialEnums.host(mat_id).StrengthType = model::stateBased;

std::cout << "ERROR: state_based models not yet defined: " << std::endl;
throw std::runtime_error("**** ERROR: state_based models not yet defined ****");
if (VERBOSE) {
Expand Down

0 comments on commit f2620c2

Please sign in to comment.