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
4bacf9fe
Commit
4bacf9fe
authored
6 days ago
by
Christian Wieners
Browse files
Options
Downloads
Patches
Plain Diff
i..
Z
parent
313020fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!276
i..
Pipeline
#422643
failed
6 days ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/elasticity/MainElasticity.cpp
+1
-0
1 addition, 0 deletions
src/elasticity/MainElasticity.cpp
src/elasticity/solvers/StaticSolver.cpp
+10
-0
10 additions, 0 deletions
src/elasticity/solvers/StaticSolver.cpp
test/elasticity/TestPrestress.cpp
+14
-12
14 additions, 12 deletions
test/elasticity/TestPrestress.cpp
with
25 additions
and
12 deletions
src/elasticity/MainElasticity.cpp
+
1
−
0
View file @
4bacf9fe
...
...
@@ -99,6 +99,7 @@ Vector &MainElasticity::Run() {
elasticityProblem
->
EvaluationResults
(
*
displacement
);
// Generate IterativePressureSolver in src/elasticity/solvers/IterativePressureSolver.hpp
IterativePressureSolver
mSolver
(
*
elasticityProblem
,
pressureSteps
);
*
displacement
=
0
;
mSolver
.
Method
(
*
mechA
,
*
displacement
);
}
else
{
// Generate ElastodynamicTimeIntegrator in src/elasticity/solvers/DynamicMechanicsSolver.hpp
...
...
This diff is collapsed.
Click to expand it.
src/elasticity/solvers/StaticSolver.cpp
+
10
−
0
View file @
4bacf9fe
...
...
@@ -9,9 +9,19 @@ void StaticSolver::Initialize(const IElasticity &assemble, Vector &u) {
double
StaticSolver
::
calculateResidualUpdate
(
const
IElasticity
&
assemble
,
const
Vector
&
u
,
Vector
&
defect
)
const
{
defect
=
0
;
assemble
.
Residual
(
u
,
defect
);
mout
<<
"Residual u "
<<
endl
<<
u
<<
endl
;
mout
<<
"Residual d "
<<
endl
<<
defect
<<
endl
;
mout
<<
"Residual d1 "
<<
endl
<<
defect
.
norm
()
<<
endl
;
defect
+=
*
residualMatrix
*
u
;
mout
<<
"Residual d2 "
<<
endl
<<
defect
.
norm
()
<<
endl
;
defect
.
ClearDirichletValues
();
defect
.
Collect
();
...
...
This diff is collapsed.
Click to expand it.
test/elasticity/TestPrestress.cpp
+
14
−
12
View file @
4bacf9fe
...
...
@@ -29,7 +29,7 @@ protected:
testConfig
[
"PressureSteps"
]
=
"1"
;
testConfig
[
"DGSign"
]
=
"-1"
;
testConfig
[
"DGPenalty"
]
=
"73"
;
testConfig
[
"PrestressSteps"
]
=
"
5
"
;
testConfig
[
"PrestressSteps"
]
=
"
1
"
;
testConfig
[
"WithPrestress"
]
=
"true"
;
testConfig
[
"MechEpsilon"
]
=
"1e-12"
;
...
...
@@ -83,11 +83,12 @@ TEST_P(PrestressTest, TestInitialValue) {
INSTANTIATE_TEST_SUITE_P
(
ConformingBeam
,
PrestressTest
,
Values
(
//TestPrestressParameter({0, 0, {0.0, 0.0,-0.0005,0.0}, "BenchmarkBeam3DTet"}),
TestPrestressParameter
({
0
,
1
,
{
10.0
,
0.0
,
1.0
,
0.0
},
"PrestressBeam"
,
"Conforming"
}),
TestPrestressParameter
({
1
,
1
,
{
10.0
,
0.0
,
1.0
,
0.0
},
"PrestressBeam"
,
"Conforming"
}),
TestPrestressParameter
({
2
,
1
,
{
10.0
,
0.0
,
1.0
,
0.0
},
"PrestressBeam"
,
"Conforming"
}),
TestPrestressParameter
({
0
,
2
,
{
10.0
,
0.0
,
1.0
,
0.0
},
"PrestressBeam"
,
"Conforming"
}),
TestPrestressParameter
({
1
,
2
,
{
10.0
,
0.0
,
1.0
,
0.0
},
"PrestressBeam"
,
"Conforming"
})
TestPrestressParameter
({
0
,
1
,
{
10.0
,
0.0
,
1.0
,
0.0
},
"PrestressBeam"
,
"Conforming"
})
//,
//TestPrestressParameter({1, 1, {10.0, 0.0, 1.0, 0.0}, "PrestressBeam", "Conforming"}),
//TestPrestressParameter({2, 1, {10.0, 0.0, 1.0, 0.0}, "PrestressBeam", "Conforming"}),
//TestPrestressParameter({0, 2, {10.0, 0.0, 1.0, 0.0}, "PrestressBeam", "Conforming"}),
//TestPrestressParameter({1, 2, {10.0, 0.0, 1.0, 0.0}, "PrestressBeam", "Conforming"})
));
/*
INSTANTIATE_TEST_SUITE_P(DGBeam, PrestressTest, Values(
...
...
@@ -101,11 +102,12 @@ INSTANTIATE_TEST_SUITE_P(DGBeam, PrestressTest, Values(
*/
INSTANTIATE_TEST_SUITE_P
(
EGBeam
,
PrestressTest
,
Values
(
//TestPrestressParameter({0, 0, {0.0, 0.0,-0.0005,0.0}, "BenchmarkBeam3DTet"}),
TestPrestressParameter
({
0
,
1
,
{
10.0
,
0.0
,
1.0
,
0.0
},
"PrestressBeam"
,
"EG"
}),
TestPrestressParameter
({
1
,
1
,
{
10.0
,
0.0
,
1.0
,
0.0
},
"PrestressBeam"
,
"EG"
}),
TestPrestressParameter
({
2
,
1
,
{
10.0
,
0.0
,
1.0
,
0.0
},
"PrestressBeam"
,
"EG"
}),
TestPrestressParameter
({
0
,
2
,
{
10.0
,
0.0
,
1.0
,
0.0
},
"PrestressBeam"
,
"EG"
}),
TestPrestressParameter
({
1
,
2
,
{
10.0
,
0.0
,
1.0
,
0.0
},
"PrestressBeam"
,
"EG"
})
TestPrestressParameter
({
0
,
1
,
{
10.0
,
0.0
,
1.0
,
0.0
},
"PrestressBeam"
,
"EG"
})
//,
//TestPrestressParameter({1, 1, {10.0, 0.0, 1.0, 0.0}, "PrestressBeam", "EG"}),
//TestPrestressParameter({2, 1, {10.0, 0.0, 1.0, 0.0}, "PrestressBeam", "EG"}),
//TestPrestressParameter({0, 2, {10.0, 0.0, 1.0, 0.0}, "PrestressBeam", "EG"}),
//TestPrestressParameter({1, 2, {10.0, 0.0, 1.0, 0.0}, "PrestressBeam", "EG"})
));
...
...
@@ -122,4 +124,4 @@ INSTANTIATE_TEST_SUITE_P(OnEllipsoid, PrestressTest, Values(
int
main
(
int
argc
,
char
**
argv
)
{
MppTest
mppTest
=
MppTestBuilder
(
argc
,
argv
).
WithPPM
().
WithoutDefaultConfig
().
WithScreenLogging
().
WithFileLogging
();
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