From 27546c0f4ca687993024d30ed078d60c3d361557 Mon Sep 17 00:00:00 2001 From: Christoph Lehmann Date: Tue, 21 Nov 2023 14:28:48 +0100 Subject: [PATCH] [PL/BC] Added a check for the presence of the component --- .../CreateBoundaryCondition.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ProcessLib/BoundaryConditionAndSourceTerm/CreateBoundaryCondition.cpp b/ProcessLib/BoundaryConditionAndSourceTerm/CreateBoundaryCondition.cpp index 4191dba25f2..2f25857fe25 100644 --- a/ProcessLib/BoundaryConditionAndSourceTerm/CreateBoundaryCondition.cpp +++ b/ProcessLib/BoundaryConditionAndSourceTerm/CreateBoundaryCondition.cpp @@ -54,6 +54,15 @@ std::unique_ptr createBoundaryCondition( //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__type} auto const type = config.config.peekConfigParameter("type"); + if (bool const component_id_required = type != "NormalTraction"; + component_id_required && !config.component_id.has_value()) + { + OGS_FATAL( + "Specifying the component id () for a boundary " + "condition of type {} is mandatory.", + type); + } + if (type == "Dirichlet") { return ProcessLib::createDirichletBoundaryCondition(