From 587c1a794ef2a73f727e8f3d4e90aedc0c264e35 Mon Sep 17 00:00:00 2001
From: Wenqing Wang <wenqing.wang@ufz.de>
Date: Thu, 22 Aug 2024 15:23:17 +0200
Subject: [PATCH] [LIE/M] Added an optional input tag to use the B bar method

---
 .../LIE/SmallDeformation/CreateSmallDeformationProcess.cpp | 7 +++++--
 .../LIE/SmallDeformation/SmallDeformationProcessData.h     | 4 ++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ProcessLib/LIE/SmallDeformation/CreateSmallDeformationProcess.cpp b/ProcessLib/LIE/SmallDeformation/CreateSmallDeformationProcess.cpp
index 6b80d734f3c..899d1bd95fc 100644
--- a/ProcessLib/LIE/SmallDeformation/CreateSmallDeformationProcess.cpp
+++ b/ProcessLib/LIE/SmallDeformation/CreateSmallDeformationProcess.cpp
@@ -181,10 +181,13 @@ std::unique_ptr<Process> createSmallDeformationProcess(
         config.getConfigParameter<double>(
             "reference_temperature", std::numeric_limits<double>::quiet_NaN());
 
+    //! \ogs_file_param{prj__processes__process__SMALL_DEFORMATION_WITH_LIE__use_b_bar}
+    auto const use_b_bar = config.getConfigParameter<bool>("use_b_bar", false);
+
     SmallDeformationProcessData<DisplacementDim> process_data{
-        materialIDs(mesh), std::move(solid_constitutive_relations),
+        materialIDs(mesh),         std::move(solid_constitutive_relations),
         std::move(fracture_model), std::move(fracture_properties),
-        reference_temperature};
+        reference_temperature,     use_b_bar};
 
     SecondaryVariableCollection secondary_variables;
 
diff --git a/ProcessLib/LIE/SmallDeformation/SmallDeformationProcessData.h b/ProcessLib/LIE/SmallDeformation/SmallDeformationProcessData.h
index aee0519a687..34a2cd3f2c8 100644
--- a/ProcessLib/LIE/SmallDeformation/SmallDeformationProcessData.h
+++ b/ProcessLib/LIE/SmallDeformation/SmallDeformationProcessData.h
@@ -46,6 +46,10 @@ struct SmallDeformationProcessData
 
     double const reference_temperature;
 
+    /// An indicator to use the B bar method \cite hughes1980generalization to
+    /// tackle the  volumetric locking.
+    const bool use_b_bar;
+
     std::vector<JunctionProperty> junction_properties = {};
 
     MeshLib::PropertyVector<int> const* mesh_prop_materialIDs = nullptr;
-- 
GitLab