diff --git a/geo/NeumannBlock2DQuad.geo b/geo/NeumannBlock2DQuad.geo index 280c38e5e017a7912b56c174698fcbcb56b9f61e..be7f1ca078db1a200287a29d24c983d1e139813d 100644 --- a/geo/NeumannBlock2DQuad.geo +++ b/geo/NeumannBlock2DQuad.geo @@ -15,9 +15,9 @@ CELLS: 4 0 4 7 8 5 FACES: 2 1 0 1 -2 230 6 7 +2 231 6 7 2 1 1 2 -2 230 7 8 +2 231 7 8 2 230 2 5 2 1 0 3 2 230 5 8 diff --git a/geo/NeumannBlock2DTet.geo b/geo/NeumannBlock2DTet.geo index 9c7afe32fdc6b29b6d23b45055900108511ef77e..fbb9f3a86fe8f95db2c9a912379a53f37b843c00 100644 --- a/geo/NeumannBlock2DTet.geo +++ b/geo/NeumannBlock2DTet.geo @@ -19,9 +19,9 @@ CELLS: 3 0 4 8 5 FACES: 2 1 0 1 -2 230 6 7 +2 231 6 7 2 1 1 2 -2 230 7 8 +2 231 7 8 2 230 2 5 2 1 0 3 2 230 5 8 diff --git a/geo/NeumannBlock3DQuad.geo b/geo/NeumannBlock3DQuad.geo index 7469ad2bbe773d84ce5440cfcc5438b5065c32d4..896993d8a2612a52a7f875cd082e908032fbce04 100644 --- a/geo/NeumannBlock3DQuad.geo +++ b/geo/NeumannBlock3DQuad.geo @@ -45,21 +45,21 @@ FACES: 4 1 4 7 8 5 4 230 22 25 26 23 4 1 12 9 0 3 -4 230 14 11 2 5 +4 232 14 11 2 5 4 1 15 12 3 6 -4 230 17 14 5 8 +4 232 17 14 5 8 4 1 21 18 9 12 -4 230 23 20 11 14 +4 232 23 20 11 14 4 1 24 21 12 15 -4 230 26 23 14 17 +4 232 26 23 14 17 4 1 0 9 10 1 -4 230 6 15 16 7 +4 231 6 15 16 7 4 1 1 10 11 2 -4 230 7 16 17 8 +4 231 7 16 17 8 4 1 9 18 19 10 -4 230 15 24 25 16 +4 231 15 24 25 16 4 1 10 19 20 11 -4 230 16 25 26 17 +4 231 16 25 26 17 VDATA: 3 -10 0 0 3 -10 0 0 diff --git a/geo/NeumannBlock3DTet.geo b/geo/NeumannBlock3DTet.geo index fafaaa36ff2fc8732f32260a55fbaa37369e5dc7..693cb1b26ea62b4f9e81243da4de3d56c2400609 100644 --- a/geo/NeumannBlock3DTet.geo +++ b/geo/NeumannBlock3DTet.geo @@ -90,40 +90,40 @@ FACES: 3 230 21 25 22 3 1 4 7 8 3 1 4 8 5 -3 230 22 25 26 -3 230 22 26 23 -3 230 14 11 2 -3 230 14 2 5 +3 232 22 25 26 +3 232 22 26 23 +3 232 14 11 2 +3 232 14 2 5 3 1 12 9 0 3 1 12 0 3 -3 230 17 14 5 -3 230 17 5 8 +3 232 17 14 5 +3 232 17 5 8 3 1 15 12 3 3 1 15 3 6 -3 230 23 20 11 -3 230 23 11 14 +3 232 23 20 11 +3 232 23 11 14 3 1 21 18 9 3 1 21 9 12 -3 230 26 23 14 -3 230 26 14 17 +3 232 26 23 14 +3 232 26 14 17 3 1 24 21 12 3 1 24 12 15 3 1 0 9 10 3 1 0 10 1 -3 230 6 15 16 -3 230 6 16 7 +3 231 6 15 16 +3 231 6 16 7 3 1 1 10 11 3 1 1 11 2 -3 230 7 16 17 -3 230 7 17 8 +3 231 7 16 17 +3 231 7 17 8 3 1 9 18 19 3 1 9 19 10 -3 230 15 24 25 -3 230 15 25 16 +3 231 15 24 25 +3 231 15 25 16 3 1 10 19 20 3 1 10 20 11 -3 230 16 25 26 -3 230 16 26 17 +3 231 16 25 26 +3 231 16 26 17 VDATA: 3 -10 0 0 3 -10 0 0 diff --git a/src/elasticity/problem/DynamicBoundaryProblems.cpp b/src/elasticity/problem/DynamicBoundaryProblems.cpp index 9f4ffe77bb3e71ab8c969e74e00e8820767f603c..2e815fea833cf82d3729d60cf6d23613d156c126 100644 --- a/src/elasticity/problem/DynamicBoundaryProblems.cpp +++ b/src/elasticity/problem/DynamicBoundaryProblems.cpp @@ -1,129 +1,91 @@ #include "DynamicBoundaryProblems.hpp" -static double alphaexp(double a, double x) { - return exp(a * (x - 0.5) * (x - 0.5)); +VectorField DPolynomialViscosityProblem::Deformation(double time, const Point &x) const { + VectorField u( + time + 5 * x[0], + time + 5 * x[1], + spaceDim > 2 ? time + 5 * x[2] : 0.0 + ); + return u; } -static double expcos(double a, const Point &x, int i) { - return alphaexp(a, x[i]) * cos(2 * Pi * x[(i + 1) % 3]) * cos(2 * Pi * x[(i + 2) % 3]); +VectorField DPolynomialViscosityProblem::Velocity(double time, const Point &x) const { + VectorField v( + 1.0, 1.0, spaceDim > 2 ? 1.0 : 0.0 + ); + return v; } -static double expsin(double a, const Point &x, int i, int j) { - int k = 3 - (min(i, j) + max(i, j)); - //mout << "i: " << i << " - j: " << j << " - k: " << k << endl; - return alphaexp(a, x[i]) * 2 * Pi * sin(2 * Pi * x[j]) * cos(2 * Pi * x[k]); +VectorField DPolynomialViscosityProblem::Acceleration(double time, const Point &x) const { + return VectorField(0.0,0.0,0.0); } -VectorField DPolynomialTractionProblem::Deformation(double time, const Point &x) const { - VectorField u( - x[0] * (x[0] - 1.0) * x[1] * (spaceDim > 2 ? x[2] : 1.0), - x[0] * x[1] * (x[1] - 1.0) * (spaceDim > 2 ? x[2] : 1.0), - x[0] * x[1] * (spaceDim > 2 ? x[2] * (x[2] - 1.0) : 0.0) - ); - return time * time * u; +Tensor DPolynomialViscosityProblem::DeformationGradient(double time, const Point &x) const { + Tensor Du( + 5.0,0.0, 0.0, + 0.0,5.0, 0.0, + 0.0,0.0,spaceDim > 2 ? 5.0 : 0.0 + ); + return Du; } -VectorField DPolynomialTractionProblem::Velocity(double time, const Point &x) const { - VectorField u( - x[0] * (x[0] - 1.0) * x[1] * (spaceDim > 2 ? x[2] : 1.0), - x[0] * x[1] * (x[1] - 1.0) * (spaceDim > 2 ? x[2] : 1.0), - x[0] * x[1] * (spaceDim > 2 ? x[2] * (x[2] - 1.0) : 0.0) - ); - return 2.0 * time * u; -} -VectorField DPolynomialTractionProblem::Acceleration(double time, const Point &x) const { - VectorField u( - x[0] * (x[0] - 1.0) * x[1] * (spaceDim > 2 ? x[2] : 1.0), - x[0] * x[1] * (x[1] - 1.0) * (spaceDim > 2 ? x[2] : 1.0), - x[0] * x[1] * (spaceDim > 2 ? x[2] * (x[2] - 1.0) : 0.0) - ); - return 2.0 * u; +VectorField DPolynomialViscosityProblem::Load(double t, const Point &x, const Cell &c) const { + return VectorField(0.0,0.0,0.0); } -Tensor DPolynomialTractionProblem::DeformationGradient(double time, const Point &x) const { - Tensor Du( - (2*x[0] - 1) * x[1] * (spaceDim > 2 ? x[2] : 1.0), (x[0] - 1)*x[0]* (spaceDim > 2 ? x[2] : 1.0), spaceDim > 2 ? (x[0] - 1) * x[0]*x[1] : 0.0, - (x[1]-1)*x[1]* (spaceDim > 2 ?x[2] : 1.0), x[0]*(2*x[1]-1)*(spaceDim>2?x[2]:1.0), spaceDim > 2 ? x[0]*(x[1]-1)*x[1] : 0.0, - x[1]* (spaceDim > 2 ? (x[2]-1)*x[2] : 0.0), x[0]* (spaceDim > 2 ? (x[2]-1)*x[2] : 0.0), spaceDim > 2 ? x[0]*x[1]*(2*x[2]-1) : 0.0 - ); - return time * time * Du; +double DPolynomialViscosityProblem::TractionStiffness(double t, const Point &x, int sd) const { + return 0.0; } -VectorField DPolynomialTractionProblem::Load(double t, const Point &x, const Cell &c) const { - VectorField a = Acceleration(t, x); - - VectorField u(2.0 * x[1] * (spaceDim > 2 ? x[2] : 1.0), - 2.0 * x[0] * (spaceDim > 2 ? x[2] : 1.0), - x[0] * x[1] * (spaceDim > 2 ? 2.0 : 0.0)); - - return a - t * t * u; +double DPolynomialViscosityProblem::TractionViscosity(double t, const Point &x, int sd) const { + return 5.0; } -double DPolynomialTractionProblem::TractionStiffness(double t, const Point &x, int sd) const { - return 1.0; -} -double DPolynomialTractionProblem::TractionViscosity(double t, const Point &x, int sd) const { - return 1.0; +VectorField DExponentialStiffnessProblem::Deformation(double time, const Point &x) const { + VectorField u( + exp(x[0]), exp(x[1]), /*spaceDim > 2 ? exp(x[2]) :*/ 0.0 + ); + return time * time * u; } - -VectorField DExponentialTractionProblem::Deformation(double time, const Point &x) const { - VectorField u( - spaceDim > 2 ? expcos(factors, x, 0) : exp(factors*(x[0]-0.5)*(x[0]-0.5)) * cos(2*Pi*x[1]), - spaceDim > 2 ? expcos(factors, x, 1) : exp(factors*(x[1]-0.5)*(x[1]-0.5)) * cos(2*Pi*x[0]), - spaceDim > 2 ? expcos(factors, x, 2) : 0.0 - ); - return exp(omega * time) * u; +VectorField DExponentialStiffnessProblem::Velocity(double time, const Point &x) const { + return 2 * time * Deformation(time, x); } -VectorField DExponentialTractionProblem::Velocity(double time, const Point &x) const { - return omega * Deformation(time, x); +VectorField DExponentialStiffnessProblem::Acceleration(double time, const Point &x) const { + return 2 * Deformation(time, x); } -VectorField DExponentialTractionProblem::Acceleration(double time, const Point &x) const { - return omega * omega * Deformation(time, x); +Tensor DExponentialStiffnessProblem::DeformationGradient(double time, const Point &x) const { + Tensor Du( + exp(x[0]), 0.0, 0.0, + 0.0, exp(x[1]), 0.0, + 0.0, 0.0, /*spaceDim > 2 ? exp(x[2]) :*/ 0.0 + ); + return time * time * Du; } -Tensor DExponentialTractionProblem::DeformationGradient(double time, const Point &x) const { - Tensor Du( - spaceDim > 2 ? factors * 2.0 * (x[0] - 0.5) * expcos(factors, x, 0) : factors * (2*x[0] - 1)*exp(factors*(x[0]-0.5)*(x[0]-0.5))*cos(2*Pi*x[1]), - spaceDim > 2 ? -expsin(factors, x, 0, 1) : -2 * Pi * exp(factors*(x[0]-0.5)*(x[0]-0.5)) * sin(2*Pi*x[1]), - spaceDim > 2 ? -expsin(factors, x, 0, 2) : 0.0, - spaceDim > 2 ? -expsin(factors, x, 1, 0) : -2 * Pi * exp(factors*(x[1]-0.5)*(x[1]-0.5)) * sin(2*Pi*x[0]), - spaceDim > 2 ? factors * 2.0 * (x[1] - 0.5) * expcos(factors, x, 1) : factors * (2*x[1] - 1)*exp(factors*(x[1]-0.5)*(x[1]-0.5))*cos(2*Pi*x[0]), - spaceDim > 2 ? -expsin(factors, x, 1, 2) : 0.0, - spaceDim > 2 ? -expsin(factors, x, 2, 0) : 0.0, - spaceDim > 2 ? -expsin(factors, x, 2, 1) : 0.0, - spaceDim > 2 ? factors * 2.0 * (x[2] - 0.5) * expcos(factors, x, 2) : 0.0 - ); - return exp(omega * time) * Du; -} - - -VectorField DExponentialTractionProblem::Load(double t, const Point &x, const Cell &c) const { - VectorField a = Acceleration(t, x); - VectorField l( - spaceDim > 2 ? factors * (2.0 + 4.0 * factors * (x[0] - 0.5) * (x[0] - 0.5)) - 8 * pow(Pi,2) * expcos(factors, x, 0) : - (exp(factors*(x[0]-0.5)*(x[0]-0.5))*cos(2*Pi*x[1])*(pow(factors,2)-4*x[0]*factors*factors+4*x[0]*x[0]*factors*factors+2*factors-4*Pi*Pi)), - spaceDim > 2 ? factors * (2.0 + 4.0 * factors * (x[1] - 0.5) * (x[1] - 0.5)) - 8 * pow(Pi,2) * expcos(factors, x, 1) : - (exp(factors*(x[1]-0.5)*(x[1]-0.5))*cos(2*Pi*x[0])*(pow(factors,2)-4*x[1]*factors*factors+4*x[1]*x[1]*factors*factors+2*factors-4*Pi*Pi)), - spaceDim > 2 ? factors * (2.0 + 4.0 * factors * (x[2] - 0.5) * (x[2] - 0.5)) - 8 * pow(Pi,2) * expcos(factors, x, 2) : 0.0 - ); +VectorField DExponentialStiffnessProblem::Load(double t, const Point &x, const Cell &c) const { + VectorField a = Acceleration(t, x); - return a - exp(omega * t) * l; + VectorField l( + exp(x[0]), exp(x[1]), /*spaceDim > 2 ? exp(x[2]) :*/ 0.0 + ); + return a - t * t * l; } -double DExponentialTractionProblem::TractionStiffness(double t, const Point &x, int sd) const { - return alpha; +double DExponentialStiffnessProblem::TractionStiffness(double t, const Point &x, int sd) const { + return -1.0; } -double DExponentialTractionProblem::TractionViscosity(double t, const Point &x, int sd) const { - return beta; +double DExponentialStiffnessProblem::TractionViscosity(double t, const Point &x, int sd) const { + return 0.0; } + VectorField DZeroDirichletProblem::Deformation(double time, const Point &x) const { VectorField u( x[0] * (x[0] - 1.0) * x[1] * (spaceDim > 2 ? x[2] : 1.0), @@ -255,11 +217,12 @@ Tensor DExponentialDirichletProblem::DeformationGradient(double time, const Poin } VectorField DExponentialDirichletProblem::Load(double time, const Point &x, const Cell &c) const { - VectorField u(-3*Pi*Pi*cos(Pi * x[0]) * sin(Pi * x[1]) * (spaceDim > 2 ? sin(Pi * x[2]) : 1.0), - -3*Pi*Pi*sin(Pi * x[0]) * cos(Pi * x[1]) * (spaceDim > 2 ? sin(Pi * x[2]) : 1.0), - -3*Pi*Pi*sin(Pi * x[0]) * sin(Pi * x[1]) * (spaceDim > 2 ? cos(Pi * x[2]) : 0.0)); + VectorField a = Acceleration(time, x); + VectorField u(-spaceDim*Pi*Pi*cos(Pi * x[0]) * sin(Pi * x[1]) * (spaceDim > 2 ? sin(Pi * x[2]) : 1.0), + -spaceDim*Pi*Pi*sin(Pi * x[0]) * cos(Pi * x[1]) * (spaceDim > 2 ? sin(Pi * x[2]) : 1.0), + -spaceDim*Pi*Pi*sin(Pi * x[0]) * sin(Pi * x[1]) * (spaceDim > 2 ? cos(Pi * x[2]) : 0.0)); - return (time - sin(Pi * time)) * u; + return a - (time - sin(Pi * time)) * u; } @@ -292,7 +255,7 @@ VectorField DPolynomialNeumannProblem::Load(double time, const Point &x, const C } double DPolynomialNeumannProblem::pressure(double t, const Point &x, int bndCondition) const { - return t * t; + return -t*t*x[bndCondition%230]; } @@ -332,5 +295,5 @@ VectorField DExponentialNeumannProblem::Load(double time, const Point &x, const } double DExponentialNeumannProblem::pressure(double t, const Point &x, int bndCondition) const { - return sin(0.5 * Pi * t); + return -sin(0.5 * Pi * t) * sin(0.5 * Pi *x[bndCondition%230]); } diff --git a/src/elasticity/problem/DynamicBoundaryProblems.hpp b/src/elasticity/problem/DynamicBoundaryProblems.hpp index 1891bb014cbce5bd614f01e66b68775eb5e4409e..d52734610ec6e6d39a39ca78da55c50f9a726b89 100644 --- a/src/elasticity/problem/DynamicBoundaryProblems.hpp +++ b/src/elasticity/problem/DynamicBoundaryProblems.hpp @@ -143,64 +143,64 @@ public: } }; -class DPolynomialTractionProblem : public DynamicBoundaryProblem { +class DPolynomialViscosityProblem : public DynamicBoundaryProblem { public: - DPolynomialTractionProblem() : DynamicBoundaryProblem("TractionBlock") { - } + DPolynomialViscosityProblem() : DynamicBoundaryProblem("TractionBlock") { + } - VectorField Load(double t, const Point &x, const Cell &c) const override; + VectorField Load(double t, const Point &x, const Cell &c) const override; - double TractionStiffness(double t, const Point &x, int sd) const override; + double TractionStiffness(double t, const Point &x, int sd) const override; - double TractionViscosity(double t, const Point &x, int sd) const override; + double TractionViscosity(double t, const Point &x, int sd) const override; - VectorField Deformation(double time, const Point &x) const override; + VectorField Deformation(double time, const Point &x) const override; - VectorField Velocity(double time, const Point &x) const override; + VectorField Velocity(double time, const Point &x) const override; - VectorField Acceleration(double time, const Point &x) const override; + VectorField Acceleration(double time, const Point &x) const override; - Tensor DeformationGradient(double time, const Point &x) const override; + Tensor DeformationGradient(double time, const Point &x) const override; - bool HasExactSolution() const override { - return true; - } + bool HasExactSolution() const override { + return true; + } - std::string Name() const override { - return "Dynamic Polynomial Traction Problem"; - } + std::string Name() const override { + return "Dynamic Polynomial Viscosity Problem"; + } }; -class DExponentialTractionProblem : public DynamicBoundaryProblem { - double alpha{0.1}; - double beta{0.1}; - double omega{0.1}; +class DExponentialStiffnessProblem : public DynamicBoundaryProblem { + double alpha{0.1}; + double beta{0.1}; + double omega{0.1}; - double factors{0.11}; + double factors{0.11}; public: - DExponentialTractionProblem() : DynamicBoundaryProblem("TractionBlock") { - factors = alpha + beta * omega; - } + DExponentialStiffnessProblem() : DynamicBoundaryProblem("TractionBlock") { + factors = alpha + beta * omega; + } - VectorField Load(double t, const Point &x, const Cell &c) const override; + VectorField Load(double t, const Point &x, const Cell &c) const override; - double TractionStiffness(double t, const Point &x, int sd) const override; + double TractionStiffness(double t, const Point &x, int sd) const override; - double TractionViscosity(double t, const Point &x, int sd) const override; + double TractionViscosity(double t, const Point &x, int sd) const override; - VectorField Deformation(double time, const Point &x) const override; + VectorField Deformation(double time, const Point &x) const override; - VectorField Velocity(double time, const Point &x) const override; + VectorField Velocity(double time, const Point &x) const override; - VectorField Acceleration(double time, const Point &x) const override; + VectorField Acceleration(double time, const Point &x) const override; - Tensor DeformationGradient(double time, const Point &x) const override; + Tensor DeformationGradient(double time, const Point &x) const override; - std::string Name() const override { - return "Dynamic Exponential Traction Problem"; - } + std::string Name() const override { + return "Dynamic Exponential Stiffness Problem"; + } }; diff --git a/src/elasticity/problem/ElasticityProblem.cpp b/src/elasticity/problem/ElasticityProblem.cpp index a0a482c41cd70193a3a6038e5e72eec8722318fb..40222be414be3b32a7244ea9a7fd2d6a1fd46979 100644 --- a/src/elasticity/problem/ElasticityProblem.cpp +++ b/src/elasticity/problem/ElasticityProblem.cpp @@ -100,10 +100,10 @@ std::unique_ptr<ElasticityProblem> GetElasticityProblem(const string &problemNam "DynamicNeumannTestPol") { return std::make_unique<DPolynomialNeumannProblem>(); } if (problemName == "DynamicNeumannTestExp") { return std::make_unique<DExponentialNeumannProblem>(); } - if (problemName == - "DynamicTractionTestPol") { return std::make_unique<DPolynomialTractionProblem>(); } - if (problemName == - "DynamicTractionTestExp") { return std::make_unique<DExponentialTractionProblem>(); } + if (problemName == + "DynamicViscosityTestPol") { return std::make_unique<DPolynomialViscosityProblem>(); } + if (problemName == + "DynamicStiffnessTestExp") { return std::make_unique<DExponentialStiffnessProblem>(); } if (problemName == "VolumeBlockX") { return std::make_unique<VolumeBlockProblem>(1.0, 0.0, 0.0); } if (problemName == "VolumeBlockY") { return std::make_unique<VolumeBlockProblem>(0.0, 1.0, 0.0); } diff --git a/test/elasticity/CMakeLists.txt b/test/elasticity/CMakeLists.txt index 3eecfd5e1ed10c1597426b722589452f7aaeec88..a8d4617c1ea301e42519394e5ae72b26473501b8 100644 --- a/test/elasticity/CMakeLists.txt +++ b/test/elasticity/CMakeLists.txt @@ -30,6 +30,7 @@ add_mpi_test(TestDirichletBeam ELASTICITY) add_mpi_test(TestLaplaceElasticity ELASTICITY) add_mpi_test(TestLinearBeamProblem ELASTICITY) add_mpi_test(TestQuadraticBeamProblem ELASTICITY) +add_mpi_test(TestDynamicBoundary ELASTICITY) #add_mpi_test(TestElasticityBeam ELASTICITY) #add_mpi_test(TestElasticityBlock ELASTICITY) #add_mpi_test(TestDynamicBoundary ELASTICITY) diff --git a/test/elasticity/TestDynamicBoundary.cpp b/test/elasticity/TestDynamicBoundary.cpp index cd5d8de98000be5c2966d1e4645b8ecc47a485df..17bfe526909329c6601da239184d08edfd4a936c 100644 --- a/test/elasticity/TestDynamicBoundary.cpp +++ b/test/elasticity/TestDynamicBoundary.cpp @@ -42,6 +42,8 @@ protected: testConfig["MechDiscretization"] = "Lagrange"; testConfig["PressureSteps"] = "1"; testConfig["WithPrestress"] = "0"; + testConfig["MechVerbose"] = "1"; + testConfig["ConfigVerbose"] = "1"; testConfig["MechProblem"] = GetParam().problemName(); @@ -54,18 +56,24 @@ protected: testConfig["NewmarkBeta"] = "0.25"; testConfig["NewmarkGamma"] = "0.5"; - testConfig["MechLevel"] = "1"; - testConfig["MechPolynomialDegree"] = "2"; + if (GetParam().problemDimension == 2){ + testConfig["MechLevel"] = "5"; // 5 + } + else { + testConfig["MechLevel"] = "3"; // 3 + } + + testConfig["MechPolynomialDegree"] = "1"; // 1 testConfig["StartTime"] = "0.0"; testConfig["EndTime"] = std::to_string(GetParam().endTime); - testConfig["DeltaTime"] = "0.01"; + testConfig["DeltaTime"] = "0.02"; testConfig["MeshVerbose"] = "10"; testConfig["Density"] = "1.0"; Config::Initialize(testConfig); cmMain = new MainElasticity(); - cmMain->Initialize(); + //cmMain->Initialize(); } @@ -82,101 +90,124 @@ protected: TEST_P(DBoundaryTest, L2ErrorTest) { cmMain->Initialize(); Vector exactSolution(cmMain->GetDisplacement()); - Vector &solution = cmMain->Run(); cmMain->SetDisplacement(true, exactSolution); + Vector &solution = cmMain->Run(); - //ASSERT_NEAR(cmMain->EvaluateQuantity(exactSolution, "L2"), 0.0, GetParam().tolerance()); + mout << cmMain->EvaluateQuantity(solution, "L2") << endl << endl; + mout << cmMain->EvaluateQuantity(exactSolution, "L2") << endl << endl; +// ASSERT_NEAR(cmMain->EvaluateQuantity(exactSolution, "L2"), 0.0, GetParam().tolerance()); ASSERT_NEAR(cmMain->EvaluateQuantity(solution, "L2"), 0.0, GetParam().tolerance()); } INSTANTIATE_TEST_SUITE_P(DynamicTestOneStep, DBoundaryTest, Values( - BoundaryTestParam({2, 0.01, "Quad", "Dirichlet", "Pol"}), - BoundaryTestParam({2, 0.01, "Quad", "Dirichlet", "Exp"}), - BoundaryTestParam({2, 0.01, "Quad", "Traction", "Pol"}), - BoundaryTestParam({2, 0.01, "Quad", "Traction", "Exp"}), - BoundaryTestParam({2, 0.01, "Quad", "Neumann", "Pol"}), - BoundaryTestParam({2, 0.01, "Quad", "Neumann", "Exp"}), - - BoundaryTestParam({2, 0.01, "Tet", "Dirichlet", "Pol"}), - BoundaryTestParam({2, 0.01, "Tet", "Dirichlet", "Exp"}), - BoundaryTestParam({2, 0.01, "Tet", "Traction", "Pol"}), - BoundaryTestParam({2, 0.01, "Tet", "Traction", "Exp"}), - BoundaryTestParam({2, 0.01, "Tet", "Neumann", "Pol"}), - BoundaryTestParam({2, 0.01, "Tet", "Neumann", "Exp"}), - - BoundaryTestParam({3, 0.01, "Quad", "Dirichlet", "Pol"}), - BoundaryTestParam({3, 0.01, "Quad", "Dirichlet", "Exp"}), - BoundaryTestParam({3, 0.01, "Quad", "Traction", "Pol"}), - BoundaryTestParam({3, 0.01, "Quad", "Traction", "Exp"}), - BoundaryTestParam({3, 0.01, "Quad", "Neumann", "Pol"}), - BoundaryTestParam({3, 0.01, "Quad", "Neumann", "Exp"}), - - BoundaryTestParam({3, 0.01, "Tet", "Dirichlet", "Pol"}), - BoundaryTestParam({3, 0.01, "Tet", "Dirichlet", "Exp"}), - BoundaryTestParam({3, 0.01, "Tet", "Traction", "Pol"}), - BoundaryTestParam({3, 0.01, "Tet", "Traction", "Exp"}), - BoundaryTestParam({3, 0.01, "Tet", "Neumann", "Pol"}), - BoundaryTestParam({3, 0.01, "Tet", "Neumann", "Exp"}) -), testing::PrintToStringParamName()); - -INSTANTIATE_TEST_SUITE_P(DynamicTestTwoStep, DBoundaryTest, Values( BoundaryTestParam({2, 0.02, "Quad", "Dirichlet", "Pol"}), BoundaryTestParam({2, 0.02, "Quad", "Dirichlet", "Exp"}), - BoundaryTestParam({2, 0.02, "Quad", "Traction", "Pol"}), - BoundaryTestParam({2, 0.02, "Quad", "Traction", "Exp"}), +// BoundaryTestParam({2, 0.01, "Quad", "Traction", "Pol"}), +// BoundaryTestParam({2, 0.01, "Quad", "Traction", "Exp"}), +// BoundaryTestParam({2, 0.02, "Quad", "Viscosity", "Pol"}), + BoundaryTestParam({2, 0.02, "Quad", "Stiffness", "Exp"}), BoundaryTestParam({2, 0.02, "Quad", "Neumann", "Pol"}), BoundaryTestParam({2, 0.02, "Quad", "Neumann", "Exp"}), - +// BoundaryTestParam({2, 0.02, "Tet", "Dirichlet", "Pol"}), BoundaryTestParam({2, 0.02, "Tet", "Dirichlet", "Exp"}), - BoundaryTestParam({2, 0.02, "Tet", "Traction", "Pol"}), - BoundaryTestParam({2, 0.02, "Tet", "Traction", "Exp"}), +// BoundaryTestParam({2, 0.01, "Tet", "Traction", "Pol"}), +// BoundaryTestParam({2, 0.01, "Tet", "Traction", "Exp"}), +// BoundaryTestParam({2, 0.02, "Tet", "Viscosity", "Pol"}), + BoundaryTestParam({2, 0.02, "Tet", "Stiffness", "Exp"}), BoundaryTestParam({2, 0.02, "Tet", "Neumann", "Pol"}), BoundaryTestParam({2, 0.02, "Tet", "Neumann", "Exp"}), BoundaryTestParam({3, 0.02, "Quad", "Dirichlet", "Pol"}), BoundaryTestParam({3, 0.02, "Quad", "Dirichlet", "Exp"}), - BoundaryTestParam({3, 0.02, "Quad", "Traction", "Pol"}), - BoundaryTestParam({3, 0.02, "Quad", "Traction", "Exp"}), +// BoundaryTestParam({3, 0.01, "Quad", "Traction", "Pol"}), +// BoundaryTestParam({3, 0.01, "Quad", "Traction", "Exp"}), +// BoundaryTestParam({3, 0.02, "Quad", "Viscosity", "Pol"}), + BoundaryTestParam({3, 0.02, "Quad", "Stiffness", "Exp"}), BoundaryTestParam({3, 0.02, "Quad", "Neumann", "Pol"}), BoundaryTestParam({3, 0.02, "Quad", "Neumann", "Exp"}), - +// BoundaryTestParam({3, 0.02, "Tet", "Dirichlet", "Pol"}), BoundaryTestParam({3, 0.02, "Tet", "Dirichlet", "Exp"}), - BoundaryTestParam({3, 0.02, "Tet", "Traction", "Pol"}), - BoundaryTestParam({3, 0.02, "Tet", "Traction", "Exp"}), +// BoundaryTestParam({3, 0.01, "Tet", "Traction", "Pol"}), +// BoundaryTestParam({3, 0.01, "Tet", "Traction", "Exp"}), +// BoundaryTestParam({3, 0.02, "Tet", "Viscosity", "Pol"}), + BoundaryTestParam({3, 0.02, "Tet", "Stiffness", "Exp"}), BoundaryTestParam({3, 0.02, "Tet", "Neumann", "Pol"}), BoundaryTestParam({3, 0.02, "Tet", "Neumann", "Exp"}) ), testing::PrintToStringParamName()); +INSTANTIATE_TEST_SUITE_P(DynamicTestTwoStep, DBoundaryTest, Values( + BoundaryTestParam({2, 0.04, "Quad", "Dirichlet", "Pol"}), + BoundaryTestParam({2, 0.04, "Quad", "Dirichlet", "Exp"}), +// BoundaryTestParam({2, 0.02, "Quad", "Traction", "Pol"}), +// BoundaryTestParam({2, 0.02, "Quad", "Traction", "Exp"}), +// BoundaryTestParam({2, 0.04, "Quad", "Viscosity", "Pol"}), + BoundaryTestParam({2, 0.04, "Quad", "Stiffness", "Exp"}), + BoundaryTestParam({2, 0.04, "Quad", "Neumann", "Pol"}), + BoundaryTestParam({2, 0.04, "Quad", "Neumann", "Exp"}), +// + BoundaryTestParam({2, 0.04, "Tet", "Dirichlet", "Pol"}), + BoundaryTestParam({2, 0.04, "Tet", "Dirichlet", "Exp"}), +// BoundaryTestParam({2, 0.02, "Tet", "Traction", "Pol"}), +// BoundaryTestParam({2, 0.02, "Tet", "Traction", "Exp"}), +// BoundaryTestParam({2, 0.04, "Tet", "Viscosity", "Pol"}), + BoundaryTestParam({2, 0.04, "Tet", "Stiffness", "Exp"}), + BoundaryTestParam({2, 0.04, "Tet", "Neumann", "Pol"}), + BoundaryTestParam({2, 0.04, "Tet", "Neumann", "Exp"}), +// + BoundaryTestParam({3, 0.04, "Quad", "Dirichlet", "Pol"}), + BoundaryTestParam({3, 0.04, "Quad", "Dirichlet", "Exp"}), +// BoundaryTestParam({3, 0.02, "Quad", "Traction", "Pol"}), +// BoundaryTestParam({3, 0.02, "Quad", "Traction", "Exp"}), +// BoundaryTestParam({3, 0.04, "Quad", "Viscosity", "Pol"}), + BoundaryTestParam({3, 0.04, "Quad", "Stiffness", "Exp"}), + BoundaryTestParam({3, 0.04, "Quad", "Neumann", "Pol"}), + BoundaryTestParam({3, 0.04, "Quad", "Neumann", "Exp"}), + + BoundaryTestParam({3, 0.04, "Tet", "Dirichlet", "Pol"}), + BoundaryTestParam({3, 0.04, "Tet", "Dirichlet", "Exp"}), +// BoundaryTestParam({3, 0.02, "Tet", "Traction", "Pol"}), +// BoundaryTestParam({3, 0.02, "Tet", "Traction", "Exp"}), +// BoundaryTestParam({3, 0.04, "Tet", "Viscosity", "Pol"}), + BoundaryTestParam({3, 0.04, "Tet", "Stiffness", "Exp"}), + BoundaryTestParam({3, 0.04, "Tet", "Neumann", "Pol"}), + BoundaryTestParam({3, 0.04, "Tet", "Neumann", "Exp"}) +), testing::PrintToStringParamName()); + + INSTANTIATE_TEST_SUITE_P(DynamicTestFullTime, DBoundaryTest, Values( BoundaryTestParam({2, 1.0, "Quad", "Dirichlet", "Pol"}), BoundaryTestParam({2, 1.0, "Quad", "Dirichlet", "Exp"}), - BoundaryTestParam({2, 1.0, "Quad", "Traction", "Pol"}), - BoundaryTestParam({2, 1.0, "Quad", "Traction", "Exp"}), +// BoundaryTestParam({2, 1.0, "Quad", "Traction", "Pol"}), +// BoundaryTestParam({2, 1.0, "Quad", "Traction", "Exp"}), +// BoundaryTestParam({2, 1.0, "Quad", "Stiffness", "Exp"}), BoundaryTestParam({2, 1.0, "Quad", "Neumann", "Pol"}), BoundaryTestParam({2, 1.0, "Quad", "Neumann", "Exp"}), BoundaryTestParam({2, 1.0, "Tet", "Dirichlet", "Pol"}), BoundaryTestParam({2, 1.0, "Tet", "Dirichlet", "Exp"}), - BoundaryTestParam({2, 1.0, "Tet", "Traction", "Pol"}), +// BoundaryTestParam({2, 1.0, "Tet", "Traction", "Pol"}), //BoundaryTestParam({2, 1.0, "Tet", "Traction", "Exp"}), +// BoundaryTestParam({2, 1.0, "Tet", "Stiffness", "Exp"}), BoundaryTestParam({2, 1.0, "Tet", "Neumann", "Pol"}), BoundaryTestParam({2, 1.0, "Tet", "Neumann", "Exp"}), - +// BoundaryTestParam({3, 1.0, "Quad", "Dirichlet", "Pol"}), BoundaryTestParam({3, 1.0, "Quad", "Dirichlet", "Exp"}), - BoundaryTestParam({3, 1.0, "Quad", "Traction", "Pol"}), - BoundaryTestParam({3, 1.0, "Quad", "Traction", "Exp"}), +// BoundaryTestParam({3, 1.0, "Quad", "Traction", "Pol"}), +// BoundaryTestParam({3, 1.0, "Quad", "Traction", "Exp"}), +// BoundaryTestParam({3, 1.0, "Quad", "Stiffness", "Exp"}), BoundaryTestParam({3, 1.0, "Quad", "Neumann", "Pol"}), BoundaryTestParam({3, 1.0, "Quad", "Neumann", "Exp"}), - +// BoundaryTestParam({3, 1.0, "Tet", "Dirichlet", "Pol"}), BoundaryTestParam({3, 1.0, "Tet", "Dirichlet", "Exp"}), - BoundaryTestParam({3, 1.0, "Tet", "Traction", "Pol"}), - BoundaryTestParam({3, 1.0, "Tet", "Traction", "Exp"}), +// BoundaryTestParam({3, 1.0, "Tet", "Traction", "Pol"}), +// BoundaryTestParam({3, 1.0, "Tet", "Traction", "Exp"}), +// BoundaryTestParam({3, 1.0, "Tet", "Stiffness", "Exp"}), BoundaryTestParam({3, 1.0, "Tet", "Neumann", "Pol"}), BoundaryTestParam({3, 1.0, "Tet", "Neumann", "Exp"}) ), testing::PrintToStringParamName());