Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
jonathan.drechsel_at_mailbox.tu-dresden.de
dune-elasticity
Commits
dc71f420
Commit
dc71f420
authored
Mar 25, 2020
by
lisa_julia.nebel_at_tu-dresden.de
Browse files
Add timer to print the overall time and the time used for one trustregion step
parent
4b6c0e43
Changes
2
Hide whitespace changes
Inline
Side-by-side
dune/elasticity/common/trustregionsolver.cc
View file @
dc71f420
...
...
@@ -383,6 +383,8 @@ void TrustRegionSolver<BasisType,VectorType>::solve()
CorrectionType
rhs
;
MatrixType
stiffnessMatrix
;
Dune
::
Timer
problemTimer
;
for
(
int
i
=
0
;
i
<
maxTrustRegionSteps_
;
i
++
)
{
Dune
::
Timer
totalTimer
;
...
...
@@ -642,5 +644,7 @@ void TrustRegionSolver<BasisType,VectorType>::solve()
std
::
cout
<<
"iteration took "
<<
totalTimer
.
elapsed
()
<<
" sec."
<<
std
::
endl
;
}
if
(
rank
==
0
)
std
::
cout
<<
"The whole trust-region step took "
<<
problemTimer
.
elapsed
()
<<
" sec."
<<
std
::
endl
;
}
src/finite-strain-elasticity.cc
View file @
dc71f420
...
...
@@ -223,6 +223,7 @@ int main (int argc, char *argv[]) try
vtkWriter
.
addVertexData
(
localDisplacementFunction
,
VTK
::
FieldInfo
(
"displacement"
,
VTK
::
FieldInfo
::
Type
::
vector
,
dim
));
vtkWriter
.
write
(
resultPath
+
"finite-strain_homotopy_0"
);
Dune
::
Timer
homotopyTimer
;
for
(
int
i
=
0
;
i
<
numHomotopySteps
;
i
++
)
{
double
homotopyParameter
=
(
i
+
1
)
*
(
1.0
/
numHomotopySteps
);
...
...
@@ -354,6 +355,9 @@ int main (int argc, char *argv[]) try
vtkWriter
.
write
(
resultPath
+
"finite-strain_homotopy_"
+
std
::
to_string
(
i
+
1
));
}
if
(
mpiHelper
.
rank
()
==
0
)
std
::
cout
<<
"Complete duration: "
<<
homotopyTimer
.
elapsed
()
<<
" sec."
<<
std
::
endl
;
}
catch
(
Exception
&
e
)
{
std
::
cout
<<
e
.
what
()
<<
std
::
endl
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment