Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
6c353008
There was an error fetching the commit references. Please try again later.
Commit
6c353008
authored
6 years ago
by
Tomáš Oberhuber
Browse files
Options
Downloads
Patches
Plain Diff
Fixed MLUPS printing out.
parent
ac2693cf
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/TNL/Solvers/IterativeSolverMonitor.h
+2
-1
2 additions, 1 deletion
src/TNL/Solvers/IterativeSolverMonitor.h
src/TNL/Solvers/IterativeSolverMonitor_impl.h
+10
-2
10 additions, 2 deletions
src/TNL/Solvers/IterativeSolverMonitor_impl.h
with
12 additions
and
3 deletions
src/TNL/Solvers/IterativeSolverMonitor.h
+
2
−
1
View file @
6c353008
...
...
@@ -47,7 +47,8 @@ protected:
std
::
atomic_bool
saved
;
RealType
time
,
saved_time
,
timeStep
,
saved_timeStep
,
residue
,
saved_residue
,
elapsed_time_before_refresh
;
RealType
time
,
saved_time
,
timeStep
,
saved_timeStep
,
residue
,
saved_residue
,
elapsed_time_before_refresh
,
last_mlups
;
//TODO: Move MLUPS to LBM solver only i.e create solver monitor for LBM
IndexType
iterations
,
saved_iterations
,
iterations_before_refresh
;
...
...
This diff is collapsed.
Click to expand it.
src/TNL/Solvers/IterativeSolverMonitor_impl.h
+
10
−
2
View file @
6c353008
...
...
@@ -168,10 +168,18 @@ void IterativeSolverMonitor< Real, Index > :: refresh()
print_item
(
real_to_string
(
(
saved
)
?
saved_residue
:
residue
,
5
),
12
);
}
if
(
nodesPerIteration
)
{
if
(
nodesPerIteration
)
// otherwise MLUPS: 0 is printed
{
const
RealType
mlups
=
nodesPerIteration
*
(
iterations
-
iterations_before_refresh
)
/
(
getElapsedTime
()
-
elapsed_time_before_refresh
)
*
1e-6
;
//std::cerr << std::endl << " iterations - iterations_before_refresh = " << iterations - iterations_before_refresh
// << " getElapsedTime() - elapsed_time_before_refresh = " << getElapsedTime() - elapsed_time_before_refresh << std::endl;
print_item
(
" MLUPS:"
,
0
);
print_item
(
real_to_string
(
mlups
,
5
),
7
);
if
(
mlups
>
0
)
{
print_item
(
real_to_string
(
mlups
,
5
),
7
);
last_mlups
=
mlups
;
}
else
print_item
(
real_to_string
(
last_mlups
,
5
),
7
);
}
iterations_before_refresh
=
iterations
;
elapsed_time_before_refresh
=
getElapsedTime
();
...
...
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