Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dune-fem-dg
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
Service Desk
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
dune-fem
dune-fem-dg
Commits
3ac21f05
Commit
3ac21f05
authored
6 years ago
by
Robert K
Browse files
Options
Downloads
Patches
Plain Diff
[bugfix][TP] initialize time provider with obtained dt estimate.
parent
d0a729f0
No related branches found
No related tags found
1 merge request
!4
Latest features added to dune-fem-dg.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/fem-dg/solver/dg.hh
+12
-13
12 additions, 13 deletions
dune/fem-dg/solver/dg.hh
with
12 additions
and
13 deletions
dune/fem-dg/solver/dg.hh
+
12
−
13
View file @
3ac21f05
...
...
@@ -121,6 +121,7 @@ namespace Fem
{
const
double
maxTimeStep
=
param
.
maxTimeStep
();
fixedTimeStep_
=
param
.
fixedTimeStep
();
// start first time step with prescribed fixed time step
// if it is not 0 otherwise use the internal estimate
tp_
.
provideTimeStepEstimate
(
maxTimeStep
);
...
...
@@ -186,23 +187,23 @@ namespace Fem
{
if
(
!
initialized_
)
{
//const double dt = tp_.timeStepEstimate();
rkSolver_
.
initialize
(
dest
);
// initialize TimeProvider with the estimate obtained form operator
tp_
.
init
();
initialized_
=
true
;
// tp_.provideTimeStepEstimate( dt );
}
}
void
solve
(
DestinationType
&
dest
)
const
{
// check if initialization needs to be done
checkInitialize
(
dest
);
//std::cout << "Start operator solve!" << std::endl;
Dune
::
Timer
timer
;
// limit( dest );
rkSolver_
.
solve
(
dest
,
monitor_
);
// make sure the current time step is valid
assert
(
tp_
.
timeStepValid
()
);
//std::cout << "Operator solve called: " << timer.elapsed() << std::endl;
// solve ODE
rkSolver_
.
solve
(
dest
,
monitor_
);
if
(
tpPtr_
)
{
...
...
@@ -213,18 +214,16 @@ namespace Fem
tp_
.
next
();
}
// // reset time step estimate
// tp.provideTimeStepEstimate( maxTimeStep );
#ifndef EULER_WRAPPER_TEST
// return limited solution, to be discussed
limit
(
dest
);
// return limited solution, to be discussed
// this is only enabled when AdvectionLimiter is not unlimited
limit
(
dest
);
#endif
}
void
setTimeStepSize
(
const
double
dt
)
{
fixedTimeStep_
=
dt
;
fixedTimeStep_
=
dt
;
fixedTimeStep_
/=
tp_
.
factor
()
;
tp_
.
provideTimeStepEstimate
(
dt
);
}
...
...
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