Commit b58abd1a authored by DIAZ Jerome's avatar DIAZ Jerome Committed by GILLES Sebastien

#1418 Clean up the test to use the bare minimum of operators to reproduce the...

#1418 Clean up the test to use the bare minimum of operators to reproduce the Matlab reference case.
parent 4a0521f0
......@@ -77,12 +77,11 @@ namespace MoReFEM
face4 = 5,
face5 = 6,
face6 = 7,
face456 = 8,
full_mesh = 9,
all_faces = 10,
edge1 = 11,
edge2 = 12,
edge3 = 13
full_mesh = 8,
all_faces = 9,
edge1 = 10,
edge2 = 11,
edge3 = 12
};
//! \copydoc doxygen_hide_boundary_condition_enum
......@@ -98,13 +97,12 @@ namespace MoReFEM
enum class FEltSpaceIndex
{
highest_dimension = 1,
surface_pressure = 2,
face1 = 3,
face2 = 4,
face3 = 5,
face4 = 6,
face5 = 7,
face6 = 8
face1 = 2,
face2 = 3,
face3 = 4,
face4 = 5,
face5 = 6,
face6 = 7
};
//! \copydoc doxygen_hide_solver_enum
......@@ -143,7 +141,6 @@ namespace MoReFEM
InputDataNS::Domain<EnumUnderlyingType(DomainIndex::face4)>,
InputDataNS::Domain<EnumUnderlyingType(DomainIndex::face5)>,
InputDataNS::Domain<EnumUnderlyingType(DomainIndex::face6)>,
InputDataNS::Domain<EnumUnderlyingType(DomainIndex::face456)>,
InputDataNS::Domain<EnumUnderlyingType(DomainIndex::highest_dimension)>,
InputDataNS::Domain<EnumUnderlyingType(DomainIndex::all_faces)>,
InputDataNS::Domain<EnumUnderlyingType(DomainIndex::edge1)>,
......@@ -155,7 +152,6 @@ namespace MoReFEM
InputDataNS::DirichletBoundaryCondition<EnumUnderlyingType(BoundaryConditionIndex::edge3)>,
InputDataNS::FEltSpace<EnumUnderlyingType(FEltSpaceIndex::highest_dimension)>,
InputDataNS::FEltSpace<EnumUnderlyingType(FEltSpaceIndex::surface_pressure)>,
InputDataNS::FEltSpace<EnumUnderlyingType(FEltSpaceIndex::face1)>,
InputDataNS::FEltSpace<EnumUnderlyingType(FEltSpaceIndex::face2)>,
InputDataNS::FEltSpace<EnumUnderlyingType(FEltSpaceIndex::face3)>,
......@@ -187,8 +183,6 @@ namespace MoReFEM
InputDataNS::Microsphere::OutOfPlaneFiberDispersionI6,
InputDataNS::Microsphere::FiberStiffnessDensityI6,
InputDataNS::Source::StaticPressure,
InputDataNS::Result
>;
......
......@@ -110,8 +110,6 @@ namespace MoReFEM
void Model::SupplFinalize()
{
auto& variational_formulation = GetNonCstVariationalFormulation();
variational_formulation.WasTangentQuadratic();
}
} // namespace TestNS::Microsphere
......
......@@ -24,13 +24,11 @@
# include "OperatorInstances/VariationalOperator/BilinearForm/Mass.hpp"
# include "OperatorInstances/VariationalOperator/LinearForm/TransientSource.hpp"
# include "OperatorInstances/VariationalOperator/NonlinearForm/FollowingPressure.hpp"
# include "OperatorInstances/VariationalOperator/NonlinearForm/SecondPiolaKirchhoffStressTensor.hpp"
# include "OperatorInstances/HyperelasticLaws/CiarletGeymonat.hpp"
# include "OperatorInstances/VariationalOperator/NonlinearForm/SecondPiolaKirchhoffStressTensor/ViscoelasticityPolicy/None.hpp"
# include "OperatorInstances/VariationalOperator/NonlinearForm/SecondPiolaKirchhoffStressTensor/InternalVariablePolicy/Microsphere.hpp"
# include "OperatorInstances/VariationalOperator/NonlinearForm/SecondPiolaKirchhoffStressTensor/ViscoelasticityPolicy/None.hpp"
# include "OperatorInstances/VariationalOperator/NonlinearForm/Local/SecondPiolaKirchhoffStressTensor/Internal/Helper.hpp"
......@@ -323,14 +321,6 @@ namespace MoReFEM
//! Compute the guess for next time step with the new velocity.
void ComputeGuessForNextTimeStep();
//! Check if the tangent is quadratic at each newton iteration.
//! \param[in] rhs Right-hand side vector.
void TangentCheck(GlobalVector& rhs);
public:
//! Indicates at the end of the simulation if the tangent was quadratic.
void WasTangentQuadratic();
private:
/*!
......@@ -375,9 +365,6 @@ namespace MoReFEM
const GlobalVariationalOperatorNS::TransientSource<ParameterNS::Type::vector>&
GetSurfacicForceOperatorFace6() const noexcept;
//! Get the static following pressure operator.
const GlobalVariationalOperatorNS::FollowingPressure<ParameterNS::TimeDependencyNS::None>& GetStaticFollowingPressureOperator() const noexcept;
private:
......@@ -408,9 +395,6 @@ namespace MoReFEM
//! Surfacic source operator on face6.
GlobalVariationalOperatorNS::TransientSource<ParameterNS::Type::vector>::const_unique_ptr surfacic_force_operator_face_6_ = nullptr;
// Static Following pressure operator.
GlobalVariationalOperatorNS::FollowingPressure<ParameterNS::TimeDependencyNS::None>::const_unique_ptr static_following_pressure_operator_ = nullptr;
///@}
private:
......@@ -478,18 +462,6 @@ namespace MoReFEM
GlobalVector& GetNonCstVectorDiffDisplacement() noexcept;
const GlobalMatrix& GetMatrixTangentStaticFollowingPressure() const noexcept;
GlobalMatrix& GetNonCstMatrixTangentStaticFollowingPressure() noexcept;
const GlobalVector& GetVectorStaticFollowingPressureResidual() const noexcept;
GlobalVector& GetNonCstVectorStaticFollowingPressureResidual() noexcept;
//! Applied pressure.
const ScalarParameter<>& GetStaticPressure() const noexcept;
///@}
//! Access to the solid.
......@@ -581,12 +553,6 @@ namespace MoReFEM
//! Midpoint velocity.
GlobalVector::unique_ptr vector_midpoint_velocity_ = nullptr;
//! Matrix tangent static following pressure.
GlobalMatrix::unique_ptr matrix_tangent_static_following_pressure_ = nullptr;
//! Static Following pressure residual vector.
GlobalVector::unique_ptr vector_static_following_pressure_residual_ = nullptr;
///@}
private:
......@@ -632,36 +598,7 @@ namespace MoReFEM
//! Force parameter for the static force on face6.
force_parameter_type::unique_ptr force_parameter_face_6_ = nullptr;
//! Static pressure.
ScalarParameter<>::unique_ptr static_pressure_ = nullptr;
private:
//! Needed to verify if tangent is quadratic.
double rhs_norm_previous_iter_;
//! Path to the directory that stores the energy file.
std::string tangent_quadratic_verification_file_;
//! Maximum string size of the time.
int stew_time_size_;
//! Maximum string size of the iterations.
int stew_iteration_size_;
//! Indicates if the tangent was quadratic over the static resolution.
bool tangent_not_quadratic_in_static_ = false;
//! Indicates if the tangent was not quadratic at another iteration than the first in the static resolution.
bool tangent_not_quadratic_at_other_than_first_iteration_in_static_ = false;
//! Enables to print in the console the warnings at each iterations.
bool print_tangent_warning_ = false;
private:
//! Constant accessor to the file in which the tangent quadratic verification is printed.
const std::string& GetTangentQuadraticVerificationFile() const noexcept;
};
......
......@@ -333,47 +333,6 @@ namespace MoReFEM
return displacement_numbering_subset_;
}
inline const GlobalVariationalOperatorNS::FollowingPressure<ParameterNS::TimeDependencyNS::None>&
VariationalFormulation::GetStaticFollowingPressureOperator() const noexcept
{
assert(!(!static_following_pressure_operator_));
return *static_following_pressure_operator_;
}
inline const GlobalVector& VariationalFormulation::GetVectorStaticFollowingPressureResidual() const noexcept
{
assert(!(!vector_static_following_pressure_residual_));
return *vector_static_following_pressure_residual_;
}
inline GlobalVector& VariationalFormulation::GetNonCstVectorStaticFollowingPressureResidual() noexcept
{
return const_cast<GlobalVector&>(GetVectorStaticFollowingPressureResidual());
}
inline const GlobalMatrix& VariationalFormulation::GetMatrixTangentStaticFollowingPressure() const noexcept
{
assert(!(!matrix_tangent_static_following_pressure_));
return *matrix_tangent_static_following_pressure_;
}
inline GlobalMatrix& VariationalFormulation::GetNonCstMatrixTangentStaticFollowingPressure() noexcept
{
return const_cast<GlobalMatrix&>(GetMatrixTangentStaticFollowingPressure());
}
inline const ScalarParameter<>& VariationalFormulation::GetStaticPressure() const noexcept
{
assert(!(!static_pressure_));
return *static_pressure_;
}
inline const std::string& VariationalFormulation::GetTangentQuadraticVerificationFile() const noexcept
{
return tangent_quadratic_verification_file_;
}
} // namespace TestNS::Microsphere
......
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