Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
dumux-repositories
dumux
Commits
83eaa4f6
Commit
83eaa4f6
authored
1 year ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[test][timeloop] Improve terminal debug output
parent
5288a828
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3618
[TimeLoop] define base tolerance
Pipeline
#37032
passed
1 year ago
Stage: check-status
Stage: trigger dumux pipelines
+3
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/common/timeloop/test_timeloop.cc
+4
-4
4 additions, 4 deletions
test/common/timeloop/test_timeloop.cc
with
4 additions
and
4 deletions
test/common/timeloop/test_timeloop.cc
+
4
−
4
View file @
83eaa4f6
...
@@ -185,10 +185,10 @@ void testTimeLoops(double tStart,
...
@@ -185,10 +185,10 @@ void testTimeLoops(double tStart,
// get result and reset buffer
// get result and reset buffer
const
auto
result
=
cerrBuffer
.
str
();
const
auto
result
=
cerrBuffer
.
str
();
std
::
cerr
.
rdbuf
(
cerrOriginal
);
std
::
cerr
.
rdbuf
(
cerrOriginal
);
std
::
cout
<<
"Setting check point at the current time
p
rinted
'"
<<
result
<<
"' to std::cerr"
<<
std
::
endl
;
std
::
cout
<<
"Setting check point at the current time
. P
rinted
error message: "
<<
result
<<
std
::
endl
;
if
(
result
.
empty
())
if
(
result
.
empty
())
DUNE_THROW
(
Dune
::
Exception
,
"Setting a checkpoint at the current time should print a warning to
std::cerr
"
);
DUNE_THROW
(
Dune
::
Exception
,
"Setting a checkpoint at the current time should print a warning to
the error stream
"
);
if
(
Dune
::
FloatCmp
::
eq
(
timeLoop
.
timeStepSize
(),
0.0
,
1e-10
))
if
(
Dune
::
FloatCmp
::
eq
(
timeLoop
.
timeStepSize
(),
0.0
,
1e-10
))
DUNE_THROW
(
Dune
::
Exception
,
"Time Loop reduced time step size to 0!"
);
DUNE_THROW
(
Dune
::
Exception
,
"Time Loop reduced time step size to 0!"
);
}
}
...
@@ -205,10 +205,10 @@ void testTimeLoops(double tStart,
...
@@ -205,10 +205,10 @@ void testTimeLoops(double tStart,
// get result and reset buffer
// get result and reset buffer
const
auto
result
=
cerrBuffer
.
str
();
const
auto
result
=
cerrBuffer
.
str
();
std
::
cerr
.
rdbuf
(
cerrOriginal
);
std
::
cerr
.
rdbuf
(
cerrOriginal
);
std
::
cout
<<
"Setting zero time step
p
rinted
'"
<<
result
<<
"' to std::cerr"
<<
std
::
endl
;
std
::
cout
<<
"Setting zero time step
. P
rinted
error message: "
<<
result
<<
std
::
endl
;
if
(
result
.
empty
())
if
(
result
.
empty
())
DUNE_THROW
(
Dune
::
Exception
,
"Setting a zero timeStepSize should print a warning to
std::cerr
"
);
DUNE_THROW
(
Dune
::
Exception
,
"Setting a zero timeStepSize should print a warning to
the error stream
"
);
}
}
}
}
...
...
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