Skip to content
Snippets Groups Projects
Commit 2df04981 authored by jonathan.froehlich's avatar jonathan.froehlich
Browse files

Added Penalty tests

parent 83ad96ad
No related branches found
No related tags found
3 merge requests!153Local add output info,!144Debug cardmech,!117Resolve "Fix volumetric derivatives"
......@@ -13,6 +13,7 @@ add_mpp_test(TestElasticityBlock ELASTICITY)
add_mpp_test(TestCFLCondition ELASTICITY)
add_mpp_test(TestPrestress ELASTICITY)
add_mpp_test(TestVolume ELASTICITY)
add_mpp_test(TestVolumePenalty ELASTICITY)
# === Parallel MPI tests ===
add_mpi_test(TestDirichletBeam ELASTICITY)
......@@ -22,4 +23,5 @@ add_mpi_test(TestElasticityBlock ELASTICITY)
#add_mpi_test(TestDynamicBoundary ELASTICITY)
add_mpi_test(TestCFLCondition ELASTICITY)
add_mpi_test(TestPrestress ELASTICITY)
add_mpi_test(TestVolume ELASTICITY)
\ No newline at end of file
add_mpi_test(TestVolume ELASTICITY)
add_mpi_test(TestVolumePenalty ELASTICITY)
\ No newline at end of file
#include "TestEnvironment.hpp"
#include "TestConfigurations.hpp"
#include "MainElasticity.hpp"
constexpr double BEAM_TEST_TOLERANCE = 1e-1;
class VolumePenaltyTest : public TestWithParam<std::string> {
protected:
MainElasticity *cmMain;
VolumePenaltyTest() {}
void SetUp() override {
std::map<std::string, std::string> testConfig = CARDIAC_TEST_CONFIG;
testConfig["Model"] = "ActiveStrainElasticity";
testConfig["MechModel"] = "Static";
testConfig["MechDiscretization"] = "Passive";
testConfig["PressureSteps"] = "10";
testConfig["WithPrestress"] = "0";
testConfig["MechProblem"] = "ConstantPressure";
testConfig["LVPressure"] = "10000";
testConfig["RVPressure"] = "0";
testConfig["RAPressure"] = "0";
testConfig["LAPressure"] = "0";
testConfig["ProblemDimension"] = "3";
testConfig["ProblemGeometry"] = "Tet";
testConfig["Mesh"] = "QuarterEllipsoid";
testConfig["MechLevel"] = "0";
testConfig["MechPolynomialDegree"] = "1";
testConfig["ActiveMaterial"] = "Bonet";
testConfig["GuccioneMat_C"] = "10000";
testConfig["GuccioneMat_bf"] = "10";
testConfig["GuccioneMat_bs"] = "10";
testConfig["GuccioneMat_bfs"] = "10";
testConfig["VolumetricSplit"] = "0";
testConfig["Incompressible"] = "false";
testConfig["QuasiCompressiblePenalty"] = GetParam();
testConfig["VolumetricPenalty"] = "20000";
testConfig["PermeabilityPenalty"] = "20000";
Config::initialize(testConfig);
cmMain = new MainElasticity();
cmMain->Initialize();
}
void TearDown() override {
Config::close();
}
~VolumePenaltyTest() override {
delete cmMain;
}
};
TEST_P(VolumePenaltyTest, Consistency) {
Vector &solution = cmMain->Run();
mout << norm(solution) << endl;
}
INSTANTIATE_TEST_SUITE_P(TestVolumeFunctions, VolumePenaltyTest, Values(
"None", "Ciarlet", "Logarithmic"
));
int main(int argc, char **argv) {
MppTest mppTest = MppTestBuilder(argc, argv).
WithPPM().
WithScreenLogging().
WithoutDefaultConfig();
return mppTest.RUN_ALL_MPP_TESTS();
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment