Skip to content

Commit

Permalink
[PL/BC] Added a check for the presence of the component
Browse files Browse the repository at this point in the history
  • Loading branch information
chleh committed Nov 21, 2023
1 parent 26e596b commit 27546c0
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ std::unique_ptr<BoundaryCondition> createBoundaryCondition(
//! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__type}
auto const type = config.config.peekConfigParameter<std::string>("type");

if (bool const component_id_required = type != "NormalTraction";
component_id_required && !config.component_id.has_value())
{
OGS_FATAL(
"Specifying the component id (<component>) for a boundary "
"condition of type {} is mandatory.",
type);
}

if (type == "Dirichlet")
{
return ProcessLib::createDirichletBoundaryCondition(
Expand Down

0 comments on commit 27546c0

Please sign in to comment.