Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
ag-ohlberger
dune-community
dune-xt
Commits
b4d161b3
Commit
b4d161b3
authored
11 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[common.convergence-study] added timing information
parent
cfde3ba4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/stuff/common/convergence-study.hh
+12
-2
12 additions, 2 deletions
dune/stuff/common/convergence-study.hh
with
12 additions
and
2 deletions
dune/stuff/common/convergence-study.hh
+
12
−
2
View file @
b4d161b3
...
@@ -40,7 +40,10 @@ public:
...
@@ -40,7 +40,10 @@ public:
virtual
double
current_grid_width
()
const
=
0
;
virtual
double
current_grid_width
()
const
=
0
;
virtual
void
compute_on_current_refinement
()
=
0
;
/**
* \return The time it took to solve on this refinement.
*/
virtual
double
compute_on_current_refinement
()
=
0
;
virtual
double
current_error_norm
(
const
std
::
string
type
)
=
0
;
virtual
double
current_error_norm
(
const
std
::
string
type
)
=
0
;
...
@@ -143,6 +146,9 @@ public:
...
@@ -143,6 +146,9 @@ public:
// print grid with
// print grid with
out
<<
" | "
<<
std
::
setw
(
8
)
<<
std
::
setprecision
(
2
)
<<
std
::
scientific
<<
current_grid_width
()
<<
std
::
flush
;
out
<<
" | "
<<
std
::
setw
(
8
)
<<
std
::
setprecision
(
2
)
<<
std
::
scientific
<<
current_grid_width
()
<<
std
::
flush
;
// do the computation
const
double
elapsed
=
compute_on_current_refinement
();
// loop over all norms/columns
// loop over all norms/columns
for
(
const
auto
&
norm
:
provided_norms
())
{
for
(
const
auto
&
norm
:
provided_norms
())
{
// compute and print relative error
// compute and print relative error
...
@@ -170,7 +176,11 @@ public:
...
@@ -170,7 +176,11 @@ public:
// update
// update
last_relative_error
[
norm
]
=
relative_error
;
last_relative_error
[
norm
]
=
relative_error
;
}
// loop over all norms/columns
}
// loop over all norms/columns
out
<<
std
::
endl
;
// print time
if
(
elapsed
<
1.0
)
out
<<
" (solve took "
<<
int
(
1000
*
elapsed
)
<<
"ms)"
<<
std
::
endl
;
else
out
<<
" (solve took "
<<
std
::
setprecision
(
2
)
<<
std
::
fixed
<<
elapsed
<<
"s)"
<<
std
::
endl
;
// update
// update
last_grid_width
=
current_grid_width
();
last_grid_width
=
current_grid_width
();
if
(
ii
<
num_refinements
())
if
(
ii
<
num_refinements
())
...
...
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