Skip to content

Commit 652b5d3

Browse files
committed
Adapted error condition in FIC element to react to GEO_DRAINAGE_TYPE
1 parent d6c843c commit 652b5d3

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

applications/GeoMechanicsApplication/custom_elements/U_Pw_small_strain_FIC_element.cpp

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
// Application includes
1515
#include "custom_elements/U_Pw_small_strain_FIC_element.h"
16+
#include "custom_utilities/constitutive_law_utilities.h"
1617
#include "custom_utilities/equation_of_motion_utilities.hpp"
1718
#include "custom_utilities/extrapolation_utilities.h"
1819

@@ -121,13 +122,20 @@ int UPwSmallStrainFICElement<TDim, TNumNodes>::Check(const ProcessInfo& rCurrent
121122
int ierr = UPwSmallStrainElement<TDim, TNumNodes>::Check(rCurrentProcessInfo);
122123
if (ierr != 0) return ierr;
123124

124-
const PropertiesType& Prop = this->GetProperties();
125+
const PropertiesType& r_properties = this->GetProperties();
125126

126127
// Verify specific properties
127-
if (Prop[IGNORE_UNDRAINED])
128-
KRATOS_ERROR << "IGNORE_UNDRAINED cannot be used in FIC elements. Use "
129-
"Non FIC elements instead"
130-
<< this->Id() << std::endl;
128+
auto is_constant_pw_field = false;
129+
if (r_properties.Has(GEO_DRAINAGE_TYPE)) {
130+
is_constant_pw_field =
131+
ConstitutiveLawUtilities::StringToDrainageType(r_properties[GEO_DRAINAGE_TYPE]) ==
132+
DrainageType::CONSTANT_WATER_PRESSURE;
133+
} else if (r_properties.Has(IGNORE_UNDRAINED)) {
134+
is_constant_pw_field = r_properties[IGNORE_UNDRAINED];
135+
}
136+
KRATOS_ERROR_IF(is_constant_pw_field) << "IGNORE_UNDRAINED cannot be used in FIC elements. Use "
137+
"Non FIC elements instead"
138+
<< this->Id() << std::endl;
131139

132140
return ierr;
133141

0 commit comments

Comments
 (0)