Commit 1416f798 authored by GILLES Sebastien's avatar GILLES Sebastien

#1303 Fix a bug I introduced myself in non linear membrane operator...

#1303 Fix a bug I introduced myself in non linear membrane operator (pretension was never applied). There is currently an issue with the matrix test with pretension which doesn't pass.
parent 2d309240
......@@ -50,7 +50,7 @@ namespace MoReFEM::Advanced::LocalVariationalOperatorNS
const auto& test_unknown_ref_felt = elementary_data.GetTestRefFElt(GetNthTestUnknown(0));
const int Nnode_test = static_cast<int>(test_unknown_ref_felt.Nnode());
#ifndef NDEBUG
#ifndef NDEBUG
{
const unsigned int ref_felt_space_dimension = unknown_ref_felt.GetFEltSpaceDimension();
......@@ -59,7 +59,7 @@ namespace MoReFEM::Advanced::LocalVariationalOperatorNS
assert(ref_felt_space_dimension < euclidean_dimension && "This operator is a surfacic operator.");
assert((ref_felt_space_dimension + 1) == euclidean_dimension && "This operator is a surfacic operator.");
}
#endif // NDEBUG
#endif // NDEBUG
former_local_displacement_.resize(elementary_data.NdofCol());
......@@ -153,6 +153,8 @@ namespace MoReFEM::Advanced::LocalVariationalOperatorNS
const auto pretension_value = pretension.GetValue(quad_pt, geom_elt);
std::cout << "PRETENSION VALUE = " << pretension_value << std::endl;
ComputeContravariantBasis(quad_pt_unknown_list_data, determinant);
ComputeDisplacementGradient(quad_pt_unknown_list_data);
ComputeGreenLagrange(pretension_value);
......@@ -390,7 +392,7 @@ namespace MoReFEM::Advanced::LocalVariationalOperatorNS
// PRETENSION
if (NumericNS::IsZero(pretension))
if (!NumericNS::IsZero(pretension))
{
const auto& covariant_metric_tensor =
GetLocalMatrix<EnumUnderlyingType(LocalMatrixIndex::covariant_metric_tensor)>();
......
......@@ -47,7 +47,7 @@ namespace MoReFEM
return thickness_;
}
inline const NonlinearMembrane::scalar_parameter& NonlinearMembrane
inline const NonlinearMembrane::scalar_parameter& NonlinearMembrane
::GetPretension() const noexcept
{
return pretension_;
......
......@@ -86,6 +86,31 @@ BOOST_FIXTURE_TEST_SUITE(no_pretension, fixture_type)
BOOST_AUTO_TEST_SUITE_END()
BOOST_FIXTURE_TEST_SUITE(pretension, fixture_type)
BOOST_AUTO_TEST_CASE(matrix_only)
{
GetModel().TestP1P1(TestNS::NonLinearMembraneOperatorNS::pretension::yes,
assemble_into_matrix::yes, assemble_into_vector::no);
}
BOOST_AUTO_TEST_CASE(vector_only)
{
GetModel().TestP1P1(TestNS::NonLinearMembraneOperatorNS::pretension::yes,
assemble_into_matrix::no, assemble_into_vector::yes);
}
BOOST_AUTO_TEST_CASE(matrix_and_vector)
{
GetModel().TestP1P1(TestNS::NonLinearMembraneOperatorNS::pretension::yes,
assemble_into_matrix::yes, assemble_into_vector::yes);
}
BOOST_AUTO_TEST_SUITE_END()
namespace // anonymous
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment