Skip to content

Commit

Permalink
changed error text
Browse files Browse the repository at this point in the history
  • Loading branch information
markelov208 committed Feb 19, 2025
1 parent 56bb627 commit 7257c59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class KRATOS_API(GEO_MECHANICS_APPLICATION) TransientPwLineElement : public Elem
void CheckProperty(const Kratos::Variable<double>& rVariable, double MaxValue = 1.0e+100) const
{
KRATOS_ERROR_IF_NOT(GetProperties().Has(rVariable))
<< rVariable.Name() << " does not exist in the pressure element's properties" << std::endl;
<< rVariable.Name() << " does not exist in the material properties at element " << Id() << std::endl;
KRATOS_ERROR_IF(GetProperties()[rVariable] < 0.0 || GetProperties()[rVariable] > MaxValue)
<< rVariable.Name() << " has an invalid value at element " << Id() << std::endl;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ KRATOS_TEST_CASE_IN_SUITE(TransientPwLineElementCheckThrowsOnFaultyInput, Kratos
}
KRATOS_EXPECT_EXCEPTION_IS_THROWN(
p_element->Check(dummy_process_info),
"DENSITY_WATER does not exist in the pressure element's properties")
"DENSITY_WATER does not exist in the material properties at element 4")

p_element->GetProperties().SetValue(DENSITY_WATER, -1.0E3);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(p_element->Check(dummy_process_info),
Expand All @@ -207,7 +207,7 @@ KRATOS_TEST_CASE_IN_SUITE(TransientPwLineElementCheckThrowsOnFaultyInput, Kratos
p_element->GetProperties().SetValue(DENSITY_WATER, 1.0E3);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(
p_element->Check(dummy_process_info),
"Error: DENSITY_SOLID does not exist in the pressure element's properties")
"Error: DENSITY_SOLID does not exist in the material properties at element 4")

p_element->GetProperties().SetValue(DENSITY_SOLID, -1.0E3);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(p_element->Check(dummy_process_info),
Expand All @@ -216,7 +216,7 @@ KRATOS_TEST_CASE_IN_SUITE(TransientPwLineElementCheckThrowsOnFaultyInput, Kratos
p_element->GetProperties().SetValue(DENSITY_SOLID, 1.0E3);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(
p_element->Check(dummy_process_info),
"Error: POROSITY does not exist in the pressure element's properties")
"Error: POROSITY does not exist in the material properties at element 4")

p_element->GetProperties().SetValue(POROSITY, -1.0);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(p_element->Check(dummy_process_info),
Expand All @@ -229,7 +229,7 @@ KRATOS_TEST_CASE_IN_SUITE(TransientPwLineElementCheckThrowsOnFaultyInput, Kratos
p_element->GetProperties().SetValue(POROSITY, 0.5);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(
p_element->Check(dummy_process_info),
"Error: BULK_MODULUS_SOLID does not exist in the pressure element's properties")
"Error: BULK_MODULUS_SOLID does not exist in the material properties at element 4")

p_element->GetProperties().SetValue(BULK_MODULUS_SOLID, -1.0E6);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(p_element->Check(dummy_process_info),
Expand All @@ -238,7 +238,7 @@ KRATOS_TEST_CASE_IN_SUITE(TransientPwLineElementCheckThrowsOnFaultyInput, Kratos
p_element->GetProperties().SetValue(BULK_MODULUS_SOLID, 1.0E6);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(
p_element->Check(dummy_process_info),
"Error: BULK_MODULUS_FLUID does not exist in the pressure element's properties")
"Error: BULK_MODULUS_FLUID does not exist in the material properties at element 4")

p_element->GetProperties().SetValue(BULK_MODULUS_FLUID, -1.0E6);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(p_element->Check(dummy_process_info),
Expand All @@ -247,7 +247,7 @@ KRATOS_TEST_CASE_IN_SUITE(TransientPwLineElementCheckThrowsOnFaultyInput, Kratos
p_element->GetProperties().SetValue(BULK_MODULUS_FLUID, 1.0E6);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(
p_element->Check(dummy_process_info),
"Error: DYNAMIC_VISCOSITY does not exist in the pressure element's properties")
"Error: DYNAMIC_VISCOSITY does not exist in the material properties at element 4")

p_element->GetProperties().SetValue(DYNAMIC_VISCOSITY, -1.0E6);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(p_element->Check(dummy_process_info),
Expand All @@ -256,7 +256,7 @@ KRATOS_TEST_CASE_IN_SUITE(TransientPwLineElementCheckThrowsOnFaultyInput, Kratos
p_element->GetProperties().SetValue(DYNAMIC_VISCOSITY, 1.0E6);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(
p_element->Check(dummy_process_info),
"Error: BIOT_COEFFICIENT does not exist in the pressure element's properties")
"Error: BIOT_COEFFICIENT does not exist in the material properties at element 4")

p_element->GetProperties().SetValue(BIOT_COEFFICIENT, -1.0);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(p_element->Check(dummy_process_info),
Expand All @@ -265,7 +265,7 @@ KRATOS_TEST_CASE_IN_SUITE(TransientPwLineElementCheckThrowsOnFaultyInput, Kratos
p_element->GetProperties().SetValue(BIOT_COEFFICIENT, 1.0);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(
p_element->Check(dummy_process_info),
"Error: PERMEABILITY_XX does not exist in the pressure element's properties")
"Error: PERMEABILITY_XX does not exist in the material properties at element 4")

p_element->GetProperties().SetValue(PERMEABILITY_XX, -1.0);
KRATOS_EXPECT_EXCEPTION_IS_THROWN(p_element->Check(dummy_process_info),
Expand Down

0 comments on commit 7257c59

Please sign in to comment.