Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-tectonic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
podlesny
dune-tectonic
Commits
d0eca03e
Commit
d0eca03e
authored
13 years ago
by
Elias Pipping
Committed by
Elias Pipping
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove benchmarking code
parent
14eda0a0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/one-body-sample.cc
+2
-54
2 additions, 54 deletions
src/one-body-sample.cc
src/one-body-sample.parset
+0
-4
0 additions, 4 deletions
src/one-body-sample.parset
with
2 additions
and
58 deletions
src/one-body-sample.cc
+
2
−
54
View file @
d0eca03e
...
...
@@ -187,25 +187,19 @@ int main(int argc, char *argv[]) {
VectorType
u4
(
finestSize
);
u4
=
0.0
;
// Has to be zero!
VectorType
u5
=
u4
;
SingletonVectorType
s4_old
(
finestSize
);
s4_old
=
parset
.
get
<
double
>
(
"boundary.friction.state.initial"
);
SingletonVectorType
s5_old
=
s4_old
;
VectorType
u4_diff
(
finestSize
);
u4_diff
=
0.0
;
// Has to be zero!
VectorType
u5_diff
=
u4_diff
;
auto
s4_new
=
Dune
::
make_shared
<
SingletonVectorType
>
(
finestSize
);
*
s4_new
=
s4_old
;
auto
s5_new
=
Dune
::
make_shared
<
SingletonVectorType
>
(
finestSize
);
*
s5_new
=
s5_old
;
SingletonVectorType
vonMisesStress
;
VectorType
b4
;
VectorType
b5
;
auto
const
nodalIntegrals
=
assemble_frictional
<
GridType
,
GridView
,
SmallVector
,
P1Basis
>
(
...
...
@@ -306,50 +300,6 @@ int main(int argc, char *argv[]) {
u4
+=
u4_diff
;
s4_old
=
*
s4_new
;
if
(
parset
.
get
<
bool
>
(
"benchmarks.fpi.enable"
))
{
assemble_neumann
<
GridType
,
GridView
,
SmallVector
,
P1Basis
>
(
leafView
,
p1Basis
,
neumannNodes
,
b5
,
functions
.
get
(
"neumannCondition"
),
h
*
run
);
stiffnessMatrix
.
mmv
(
u5
,
b5
);
for
(
int
state_fpi
=
0
;
state_fpi
<
parset
.
get
<
int
>
(
"benchmarks.fpi.iterations"
);
++
state_fpi
)
{
auto
myGlobalNonlinearity
=
assemble_nonlinearity
<
VectorType
,
OperatorType
>
(
finestSize
,
parset
,
nodalIntegrals
,
s5_new
,
h
);
MyConvexProblemType
const
myConvexProblem
(
stiffnessMatrix
,
*
myGlobalNonlinearity
,
b5
);
MyBlockProblemType
myBlockProblem
(
parset
,
myConvexProblem
);
auto
multigridStep
=
mySolver
.
getSolver
();
multigridStep
->
setProblem
(
u5_diff
,
myBlockProblem
);
LoopSolver
<
VectorType
>
overallSolver
(
multigridStep
,
parset
.
get
<
size_t
>
(
"solver.tnnmg.maxiterations"
),
solver_tolerance
,
&
energyNorm
,
verbosity
,
false
);
// absolute error
overallSolver
.
solve
();
if
(
!
parset
.
get
<
bool
>
(
"boundary.friction.state.evolve"
))
continue
;
for
(
size_t
i
=
0
;
i
<
frictionalNodes
.
size
();
++
i
)
{
if
(
frictionalNodes
[
i
][
0
])
{
double
const
L
=
parset
.
get
<
double
>
(
"boundary.friction.ruina.L"
);
double
const
unorm
=
u5_diff
[
i
].
two_norm
();
(
*
s5_new
)[
i
]
=
compute_state_update
(
h
,
unorm
,
L
,
s5_old
[
i
]);
}
}
}
}
u5
+=
u5_diff
;
s5_old
=
*
s5_new
;
if
(
parset
.
get
<
bool
>
(
"benchmarks.fpi.enable"
))
std
::
cout
<<
energyNorm
.
diff
(
u5
,
u4
)
/
energyNorm
(
u5
)
<<
std
::
endl
;
// Compute von Mises stress and write everything to a file
if
(
parset
.
get
<
bool
>
(
"writeVTK"
))
{
// Compute von Mises stress
...
...
@@ -373,12 +323,10 @@ int main(int argc, char *argv[]) {
if
(
parset
.
get
<
bool
>
(
"printFrictionalBoundary"
))
{
// Print displacement on frictional boundary
boost
::
format
const
formatter
(
"u4[%02d] = %+3e, "
"%|40t|u5[%02d] = %+3e"
);
boost
::
format
const
formatter
(
"u4[%02d] = %+3e"
);
for
(
size_t
i
=
0
;
i
<
frictionalNodes
.
size
();
++
i
)
if
(
frictionalNodes
[
i
][
0
])
std
::
cout
<<
boost
::
format
(
formatter
)
%
i
%
u4
[
i
]
%
i
%
u5
[
i
]
<<
std
::
endl
;
std
::
cout
<<
boost
::
format
(
formatter
)
%
i
%
u4
[
i
]
<<
std
::
endl
;
}
Python
::
stop
();
}
...
...
This diff is collapsed.
Click to expand it.
src/one-body-sample.parset
+
0
−
4
View file @
d0eca03e
...
...
@@ -9,10 +9,6 @@ printProgress = false
writeVTK
=
true
[
benchmarks
.
fpi
]
enable
=
false
iterations
=
50
[
grid
]
refinements
=
4
...
...
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