diff --git a/ProcessLib/ProcessVariable.cpp b/ProcessLib/ProcessVariable.cpp index 58e3c441585879151b2fcc9b7af4ef16b5ae157d..148e9859d4a68302149285b75e67c25aa35edd4e 100644 --- a/ProcessLib/ProcessVariable.cpp +++ b/ProcessLib/ProcessVariable.cpp @@ -37,6 +37,9 @@ ProcessVariable::ProcessVariable( { DBUG("Constructing process variable %s", _name.c_str()); + if (_shapefunction_order < 1 || 2 < _shapefunction_order) + OGS_FATAL("The given shape function order %d is not supported", _shapefunction_order); + // Boundary conditions //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions} if (auto bcs_config = config.getConfigSubtreeOptional("boundary_conditions")) diff --git a/ProcessLib/Utils/LocalDataInitializer.h b/ProcessLib/Utils/LocalDataInitializer.h index f9bd9b7a6d9fb64e045b2e9fc9689e9266acde3a..2708ecc8b479182a2ff45bb6eac6e4adafdcc374 100644 --- a/ProcessLib/Utils/LocalDataInitializer.h +++ b/ProcessLib/Utils/LocalDataInitializer.h @@ -133,6 +133,9 @@ public: const unsigned shapefunction_order) : _dof_table(dof_table) { + if (shapefunction_order < 1 || 2 < shapefunction_order) + OGS_FATAL("The given shape function order %d is not supported", shapefunction_order); + if (shapefunction_order == 1) { // /// Lines and points ///////////////////////////////////