Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CardMech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KIT
Mpp
CardMech
Commits
2df04981
Commit
2df04981
authored
3 years ago
by
jonathan.froehlich
Browse files
Options
Downloads
Patches
Plain Diff
Added Penalty tests
parent
83ad96ad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!153
Local add output info
,
!144
Debug cardmech
,
!117
Resolve "Fix volumetric derivatives"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cardmech/test/elasticity/CMakeLists.txt
+3
-1
3 additions, 1 deletion
cardmech/test/elasticity/CMakeLists.txt
cardmech/test/elasticity/TestVolumePenalty.cpp
+81
-0
81 additions, 0 deletions
cardmech/test/elasticity/TestVolumePenalty.cpp
with
84 additions
and
1 deletion
cardmech/test/elasticity/CMakeLists.txt
+
3
−
1
View file @
2df04981
...
...
@@ -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
This diff is collapsed.
Click to expand it.
cardmech/test/elasticity/TestVolumePenalty.cpp
0 → 100644
+
81
−
0
View file @
2df04981
#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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment