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
b64b0b9e
Commit
b64b0b9e
authored
6 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[timeloop] Adjust timeStepSize on setMaxTimeStepSize
parent
d9287728
No related branches found
No related tags found
1 merge request
!1160
Fix/checkpoint timeloop
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/common/timeloop.hh
+5
-3
5 additions, 3 deletions
dumux/common/timeloop.hh
with
5 additions
and
3 deletions
dumux/common/timeloop.hh
+
5
−
3
View file @
b64b0b9e
...
@@ -221,7 +221,11 @@ public:
...
@@ -221,7 +221,11 @@ public:
* \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$
*/
*/
void
setMaxTimeStepSize
(
Scalar
maxDt
)
void
setMaxTimeStepSize
(
Scalar
maxDt
)
{
maxTimeStepSize_
=
maxDt
;
}
{
using
std
::
min
;
maxTimeStepSize_
=
maxDt
;
timeStepSize_
=
min
(
timeStepSize_
,
maxDt
);
}
/*!
/*!
* \brief Returns the suggested time step length \f$\mathrm{[s]}\f$ so that we
* \brief Returns the suggested time step length \f$\mathrm{[s]}\f$ so that we
...
@@ -333,7 +337,6 @@ public:
...
@@ -333,7 +337,6 @@ public:
private
:
private
:
//! Computes the maximum timestep size respecting end time
//! Computes the maximum timestep size respecting end time
//! and possibly episodes (TODO)
void
computeMaxTimeStepSize_
()
void
computeMaxTimeStepSize_
()
{
{
if
(
finished
())
if
(
finished
())
...
@@ -345,7 +348,6 @@ private:
...
@@ -345,7 +348,6 @@ private:
using
std
::
max
;
using
std
::
max
;
using
std
::
min
;
using
std
::
min
;
// TODO check for episodes if there is an episode manager
maxTimeStepSize_
=
min
(
maxTimeStepSize_
,
max
<
Scalar
>
(
0.0
,
endTime_
-
time_
));
maxTimeStepSize_
=
min
(
maxTimeStepSize_
,
max
<
Scalar
>
(
0.0
,
endTime_
-
time_
));
}
}
...
...
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