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
ab80e586
Commit
ab80e586
authored
6 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[timeloop][doc] Improve documentation
parent
8b4ca54c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1160
Fix/checkpoint timeloop
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/common/timeloop.hh
+9
-3
9 additions, 3 deletions
dumux/common/timeloop.hh
with
9 additions
and
3 deletions
dumux/common/timeloop.hh
+
9
−
3
View file @
ab80e586
...
@@ -219,7 +219,7 @@ public:
...
@@ -219,7 +219,7 @@ public:
* episode, the timeStep() method will take care that the step
* episode, the timeStep() method will take care that the step
* size won't exceed the episode or the end of the simulation,
* size won't exceed the episode or the end of the simulation,
* though.
* though.
* \note Always call this after TimeLoop::advanceTimeStep()
* \note Always call this after TimeLoop::advanceTimeStep()
and TimeLoop::reportTimeStep()
*
*
* \param dt The new value for the time step size \f$\mathrm{[s]}\f$
* \param dt The new value for the time step size \f$\mathrm{[s]}\f$
*/
*/
...
@@ -234,6 +234,7 @@ public:
...
@@ -234,6 +234,7 @@ public:
* \brief Set the maximum time step size to a given value.
* \brief Set the maximum time step size to a given value.
*
*
* \param maxDt The new value for the maximum time step size \f$\mathrm{[s]}\f$
* \param maxDt The new value for the maximum time step size \f$\mathrm{[s]}\f$
* \note This also updates the time step size
*/
*/
void
setMaxTimeStepSize
(
Scalar
maxDt
)
void
setMaxTimeStepSize
(
Scalar
maxDt
)
{
{
...
@@ -489,8 +490,10 @@ public:
...
@@ -489,8 +490,10 @@ public:
checkPoints_
.
pop
();
checkPoints_
.
pop
();
}
}
//! Whether now is a time checkpoint
/*!
//! has to be called after TimeLoop::advanceTimeStep()
* \brief Whether now is a time checkpoint
* \note has to be called after TimeLoop::advanceTimeStep()
*/
bool
isCheckPoint
()
const
bool
isCheckPoint
()
const
{
return
isCheckPoint_
;
}
{
return
isCheckPoint_
;
}
...
@@ -498,6 +501,7 @@ public:
...
@@ -498,6 +501,7 @@ public:
* \brief add a checkpoint to the queue
* \brief add a checkpoint to the queue
* \note checkpoints have to be provided in ascending order
* \note checkpoints have to be provided in ascending order
* \param t the check point (in seconds)
* \param t the check point (in seconds)
* \note This also updates the time step size and potentially reduces the time step size to meet the next check point
*/
*/
void
setCheckPoint
(
Scalar
t
)
void
setCheckPoint
(
Scalar
t
)
{
{
...
@@ -512,6 +516,7 @@ public:
...
@@ -512,6 +516,7 @@ public:
* \brief add checkpoints to the queue from a vector of time points
* \brief add checkpoints to the queue from a vector of time points
* \note checkpoints have to be provided in ascending order
* \note checkpoints have to be provided in ascending order
* \param checkPoints the vector of check points
* \param checkPoints the vector of check points
* \note This also updates the time step size and potentially reduces the time step size to meet the next check point
*/
*/
void
setCheckPoint
(
const
std
::
vector
<
Scalar
>&
checkPoints
)
void
setCheckPoint
(
const
std
::
vector
<
Scalar
>&
checkPoints
)
{
setCheckPoint
(
checkPoints
.
begin
(),
checkPoints
.
end
());
}
{
setCheckPoint
(
checkPoints
.
begin
(),
checkPoints
.
end
());
}
...
@@ -521,6 +526,7 @@ public:
...
@@ -521,6 +526,7 @@ public:
* \note checkpoints have to be provided in ascending order
* \note checkpoints have to be provided in ascending order
* \param first iterator to the first element to be inserted
* \param first iterator to the first element to be inserted
* \param last iterator to the one-after-last element to be inserted
* \param last iterator to the one-after-last element to be inserted
* \note This also updates the time step size and potentially reduces the time step size to meet the next check point
*/
*/
template
<
class
ForwardIterator
>
template
<
class
ForwardIterator
>
void
setCheckPoint
(
ForwardIterator
first
,
ForwardIterator
last
)
void
setCheckPoint
(
ForwardIterator
first
,
ForwardIterator
last
)
...
...
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