diff --git a/src/elasticity/assemble/LagrangeElasticity.cpp b/src/elasticity/assemble/LagrangeElasticity.cpp index 0544f5f118e661f0807f559dc9676c3e07c7b31c..dd57bbf49ef4bb552cf2c73ee060b61f59012ce6 100644 --- a/src/elasticity/assemble/LagrangeElasticity.cpp +++ b/src/elasticity/assemble/LagrangeElasticity.cpp @@ -7,6 +7,7 @@ LagrangeElasticity::LagrangeElasticity(ElasticityProblem &eP, int degree, bool isStatic) : IElasticity(eP), disc(eP.GetMeshes(), degree, dim()) { this->degree = degree; + Config::Get("activeDeformation", name); } double LagrangeElasticity::Energy(const Vector &u) const { @@ -904,8 +905,6 @@ void LagrangeElasticity::SetDisplacement(Vector &u) const { } void LagrangeElasticity::UpdateStretch(const Vector &gamma_f) const { - std::string name; - Config::Get("activeDeformation", name); //Quarteroni if ((name == "Quarteroni") || name == "Quarteroni2") { for (row r = gamma->rows(); r != gamma->rows_end(); ++r) { diff --git a/src/elasticity/assemble/LagrangeElasticity.hpp b/src/elasticity/assemble/LagrangeElasticity.hpp index 36184c8642b0ffbffeb0bb961a81f92c81767b30..9fee74afbc3ca39838ba3641cc07f36c2e42427c 100644 --- a/src/elasticity/assemble/LagrangeElasticity.hpp +++ b/src/elasticity/assemble/LagrangeElasticity.hpp @@ -7,6 +7,7 @@ class LagrangeElasticity : public IElasticity { int size{3}; const LagrangeDiscretization disc; + std::string name; void fixationBnd(const cell &c, const Vector &U, RowBndValues &u_c, int face) const; diff --git a/test/elasticity/CMakeLists.txt b/test/elasticity/CMakeLists.txt index 00dd1f587221b624f8490ce2af3c15033c1bfb4c..4a9249b18412e75a416556f60fb2fb684f04f9a9 100644 --- a/test/elasticity/CMakeLists.txt +++ b/test/elasticity/CMakeLists.txt @@ -19,7 +19,7 @@ add_mpp_test(TestLaplaceElasticity ELASTICITY) #add_mpp_test(TestDynamicBoundary ELASTICITY) add_mpp_test(TestOscillation ELASTICITY) add_mpp_test(TestCFLCondition ELASTICITY) -#add_mpp_test(TestPrestress ELASTICITY)#TODO should be included again +add_mpp_test(TestPrestress ELASTICITY) add_mpp_test(TestVolume ELASTICITY) #add_mpp_test(TestVolumePenalty ELASTICITY) @@ -35,7 +35,7 @@ add_mpi_test(TestQuadraticBeamProblem ELASTICITY) #add_mpi_test(TestElasticityBlock ELASTICITY) add_mpi_test(TestDynamicBoundary ELASTICITY) #add_mpi_test(TestCFLCondition ELASTICITY) -#add_mpi_test(TestPrestress ELASTICITY) #TODO should be included again +add_mpi_test(TestPrestress ELASTICITY) add_mpi_test(TestVolume ELASTICITY) #add_mpi_test(TestOscillation ELASTICITY) diff --git a/test/elasticity/TestPrestress.cpp b/test/elasticity/TestPrestress.cpp index 3f06cb63eb0c2e94a2aa6562ece59feab65483b7..2f06244d274f21f10c0aca4870ad4b50109d5fe3 100644 --- a/test/elasticity/TestPrestress.cpp +++ b/test/elasticity/TestPrestress.cpp @@ -30,6 +30,11 @@ protected: testConfig["PrestressSteps"] = "5"; testConfig["WithPrestress"] = "true"; + testConfig["MechEpsilon"] = "1e-12"; + testConfig["NewtonEpsilon"] = "1e-11"; + testConfig["NewtonReduction"] = "1e-12"; + testConfig["WithPrestress"] = "true"; + //testConfig["Mesh"] = GetParam().meshName; testConfig["Mechlevel"] = std::to_string(GetParam().level); @@ -61,7 +66,8 @@ protected: TEST_P(PrestressTest, TestInitialValue) { Vector &solution = cmMain->Run(); - mout << solution << endl; + mout << "solution " << solution << endl; + mout << "num " << cmMain->EvaluateQuantity(solution, "L2") << endl << endl; for (row r = solution.rows(); r != solution.rows_end(); ++r) { for (int i = 0; i < r.n(); ++i) { EXPECT_NEAR(solution(r, i), 0.0, NEWTON_TOLERANCE); @@ -109,6 +115,6 @@ INSTANTIATE_TEST_SUITE_P(OnEllipsoid, PrestressTest, Values( */ int main(int argc, char **argv) { - MppTest mppTest = MppTestBuilder(argc, argv).WithPPM().WithoutDefaultConfig().WithScreenLogging(); + MppTest mppTest = MppTestBuilder(argc, argv).WithPPM().WithoutDefaultConfig().WithScreenLogging().WithFileLogging(); return mppTest.RUN_ALL_MPP_TESTS(); } \ No newline at end of file