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
11af5c95
Commit
11af5c95
authored
6 years ago
by
Robert K
Browse files
Options
Downloads
Patches
Plain Diff
[feature][Additional] added methods adjustAverageValue and
diffusionTimeStep.
parent
a8872f90
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4
Latest features added to dune-fem-dg.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/dune/femdg/_operators.py
+25
-1
25 additions, 1 deletion
python/dune/femdg/_operators.py
with
25 additions
and
1 deletion
python/dune/femdg/_operators.py
+
25
−
1
View file @
11af5c95
...
...
@@ -157,6 +157,12 @@ def createFemDGSolver(Model, space,
limiter
=
"
minmod
"
,
diffusionScheme
=
"
cdg2
"
):
import
dune.create
as
create
if
limiter
is
None
or
limiter
is
False
:
limiter
=
"
unlimited
"
if
diffusionScheme
is
None
or
diffusionScheme
is
False
:
diffusionScheme
=
"
none
"
u
=
TrialFunction
(
space
)
v
=
TestFunction
(
space
)
n
=
FacetNormal
(
space
.
cell
())
...
...
@@ -248,6 +254,17 @@ def createFemDGSolver(Model, space,
targs
=
[
'
class Entity, class Point
'
],
static
=
True
,
predefined
=
predefined
)
# TODO: fill in diffusion time step from Model
diffusionTimeStep
=
getattr
(
Model
,
"
maxDiffusion
"
,
None
)
if
diffusionTimeStep
is
not
None
:
diffusionTimeStep
=
diffusionTimeStep
(
t
,
x
,
u
)
generateMethod
(
struct
,
diffusionTimeStep
,
'
double
'
,
'
diffusionTimeStep
'
,
args
=
[
'
const Entity& entity
'
,
'
const Point &x
'
,
'
const T& circumEstimate
'
,
'
const RangeType &u
'
],
targs
=
[
'
class Entity, class Point, class T
'
],
static
=
True
,
predefined
=
None
)
#advFlux2 = getattr(Model,"F_c",None)
#advFlux2 = advFlux2(t,x,u)
#generateMethod(struct, advFlux2,
...
...
@@ -286,6 +303,13 @@ def createFemDGSolver(Model, space,
targs
=
[
'
class Intersection, class Point
'
],
static
=
True
,
predefined
=
predefined
)
adjustAverageValue
=
{}
generateMethod
(
struct
,
adjustAverageValue
,
'
void
'
,
'
adjustAverageValue
'
,
args
=
[
'
const Entity& entity
'
,
'
const Point &x
'
,
'
RangeType &u
'
],
targs
=
[
'
class Entity, class Point
'
],
static
=
True
,
evalSwitch
=
False
,
predefined
=
None
)
#####################
## boundary treatment
...
...
@@ -404,7 +428,7 @@ def createFemDGSolver(Model, space,
diffFluxId
=
"
Dune::Fem::DiffusionFlux::Enum::
"
+
diffusionScheme
if
hasAdvFlux
:
advFluxId
=
"
Dune::Fem::AdvectionFlux::Enum::llf
"
if
limiter
==
None
or
limiter
==
False
or
limiter
.
lower
()
==
"
unlimited
"
:
if
limiter
.
lower
()
==
"
unlimited
"
:
limiterId
=
"
Dune::Fem::AdvectionLimiter::Enum::unlimited
"
# check for different limiter functions (default is minmod)
if
limiter
.
lower
()
==
"
superbee
"
:
...
...
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