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
5139b52a
Commit
5139b52a
authored
4 years ago
by
Andreas Dedner
Browse files
Options
Downloads
Patches
Plain Diff
return a global minimized dt in steppers
parent
53d17f20
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!15
Exchange troubled cell
Pipeline
#29626
failed
4 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/dune/femdg/rk.py
+10
-11
10 additions, 11 deletions
python/dune/femdg/rk.py
with
10 additions
and
11 deletions
python/dune/femdg/rk.py
+
10
−
11
View file @
5139b52a
...
...
@@ -19,11 +19,10 @@ class FemDGStepper:
def
deltaT
(
self
,
dt
):
self
.
rkScheme
.
setTimeStepSize
(
dt
)
def
femdgStepper
(
*
,
order
=
None
,
rkType
=
None
,
operator
=
None
,
cfl
=
None
,
parameters
=
True
):
if
parameters
is
True
:
parameters
=
{}
elif
parameters
is
False
:
parameters
=
None
def
femdgStepper
(
*
,
order
=
None
,
rkType
=
None
,
operator
=
None
,
cfl
=
0.45
,
parameters
=
True
):
if
parameters
is
True
:
parameters
=
{}
elif
parameters
is
False
:
parameters
=
None
if
rkType
==
"
default
"
:
rkType
=
None
def
_femdgStepper
(
op
,
cfl
=
None
):
if
parameters
is
not
None
:
if
not
"
fem.timeprovider.factor
"
in
parameters
:
...
...
@@ -188,7 +187,7 @@ class RungeKutta:
u
.
axpy
(
dt
*
self
.
b
[
i
],
self
.
k
[
i
])
self
.
op
.
applyLimiter
(
u
)
self
.
op
.
stepTime
(
0
,
0
)
return
dt
return
self
.
op
.
space
.
grid
.
comm
.
min
(
dt
)
class
Heun
(
RungeKutta
):
def
__init__
(
self
,
op
,
cfl
=
None
):
A
=
[[
0
,
0
],
...
...
@@ -255,7 +254,7 @@ class ImplSSP2: # with stages=1 same as above - increasing stages does not impro
u
.
axpy
(
dt
*
self
.
musps
,
self
.
tmp
)
self
.
op
.
applyLimiter
(
u
)
self
.
op
.
stepTime
(
0
,
0
)
return
dt
return
self
.
op
.
space
.
grid
.
comm
.
min
(
dt
)
class
ExplSSP2
:
def
__init__
(
self
,
stages
,
op
,
cfl
=
None
):
self
.
op
=
op
...
...
@@ -289,7 +288,7 @@ class ExplSSP2:
u
.
axpy
(
1
/
self
.
stages
,
self
.
q2
)
self
.
op
.
applyLimiter
(
u
)
self
.
op
.
stepTime
(
0
,
0
)
return
dt
return
self
.
op
.
space
.
grid
.
comm
.
min
(
dt
)
def
ssp2
(
stages
,
explicit
=
True
):
if
explicit
:
return
lambda
op
,
cfl
=
None
:
ExplSSP2
(
stages
,
op
,
cfl
)
...
...
@@ -349,7 +348,7 @@ class ExplSSP3:
i
+=
1
self
.
op
.
applyLimiter
(
u
)
self
.
op
.
stepTime
(
0
,
0
)
return
dt
return
self
.
op
.
space
.
grid
.
comm
.
min
(
dt
)
class
ImplSSP3
:
def
__init__
(
self
,
stages
,
op
,
cfl
=
None
):
self
.
stages
=
stages
...
...
@@ -401,7 +400,7 @@ class ImplSSP3:
u
.
axpy
(
dt
*
self
.
musps
,
self
.
tmp
)
self
.
op
.
applyLimiter
(
u
)
self
.
op
.
stepTime
(
0
,
0
)
return
dt
return
self
.
op
.
space
.
grid
.
comm
.
min
(
dt
)
def
ssp3
(
stages
,
explicit
=
True
):
if
explicit
:
return
lambda
op
,
cfl
=
None
:
ExplSSP3
(
stages
,
op
,
cfl
)
...
...
@@ -456,4 +455,4 @@ class ExplSSP4_10:
u
.
axpy
(
dt
/
10
,
self
.
tmp
)
self
.
op
.
applyLimiter
(
u
)
self
.
op
.
stepTime
(
0
,
0
)
return
dt
return
self
.
op
.
space
.
grid
.
comm
.
min
(
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