From a99ff5347ebd4e1ed094e146d9ebcd9e7563f119 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <dmitri.naumov@ufz.de> Date: Thu, 9 Nov 2017 12:57:48 +0100 Subject: [PATCH] [PL] LIE/HM; Add braces around if. google-readability-braces-around-statements --- ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp | 4 ++++ .../LIE/HydroMechanics/LocalAssembler/LocalDataInitializer.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp b/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp index 8858fdb7aad..d03c9358899 100644 --- a/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp +++ b/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp @@ -58,9 +58,11 @@ std::unique_ptr<Process> createHydroMechanicsProcess( { if (pv_name != "pressure" && pv_name != "displacement" && pv_name.find("displacement_jump") != 0) + { OGS_FATAL( "Found a process variable name '%s'. It should be " "'displacement' or 'displacement_jumpN' or 'pressure'"); + } auto variable = std::find_if(variables.cbegin(), variables.cend(), [&pv_name](ProcessVariable const& v) { return v.getName() == pv_name; @@ -182,11 +184,13 @@ std::unique_ptr<Process> createHydroMechanicsProcess( config.getConfigParameter<std::vector<double>>( "specific_body_force"); if (b.size() != GlobalDim) + { OGS_FATAL( "The size of the specific body force vector does not match the " "displacement dimension. Vector size is %d, displacement " "dimension is %d", b.size(), GlobalDim); + } std::copy_n(b.data(), b.size(), specific_body_force.data()); } diff --git a/ProcessLib/LIE/HydroMechanics/LocalAssembler/LocalDataInitializer.h b/ProcessLib/LIE/HydroMechanics/LocalAssembler/LocalDataInitializer.h index 9346d924283..9abfb0607b0 100644 --- a/ProcessLib/LIE/HydroMechanics/LocalAssembler/LocalDataInitializer.h +++ b/ProcessLib/LIE/HydroMechanics/LocalAssembler/LocalDataInitializer.h @@ -190,12 +190,14 @@ public: auto const it = _builder.find(type_idx); if (it == _builder.end()) + { OGS_FATAL( "You are trying to build a local assembler for an unknown mesh " "element type (%s)." " Maybe you have disabled this mesh element type in your build " "configuration or this process requires higher order elements.", type_idx.name()); + } auto const n_local_dof = _dof_table.getNumberOfElementDOF(id); auto const varIDs = _dof_table.getElementVariableIDs(id); -- GitLab