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
4283d5f8
Commit
4283d5f8
authored
4 years ago
by
Robert K
Browse files
Options
Downloads
Patches
Plain Diff
[feature][DGPyOp] added flag for defaultQuadrature or fempy quadratures.
parent
798c9c82
No related branches found
No related tags found
1 merge request
!15
Exchange troubled cell
Pipeline
#29305
failed
4 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/fem-dg/operator/dg/dgpyoperator.hh
+43
-9
43 additions, 9 deletions
dune/fem-dg/operator/dg/dgpyoperator.hh
python/dune/femdg/_operators.py
+4
-0
4 additions, 0 deletions
python/dune/femdg/_operators.py
with
47 additions
and
9 deletions
dune/fem-dg/operator/dg/dgpyoperator.hh
+
43
−
9
View file @
4283d5f8
...
...
@@ -8,6 +8,10 @@
#include
<dune/fem/solver/timeprovider.hh>
#include
<dune/fem/operator/common/spaceoperatorif.hh>
#include
<dune/fem/space/lagrange.hh>
#include
<dune/fem/quadrature/interpolationquadrature.hh>
#include
<dune/fem-dg/algorithm/evolution.hh>
// dune-fem-dg includes
...
...
@@ -19,9 +23,8 @@
#include
<dune/fem-dg/misc/algorithmcreatorselector.hh>
#include
<dune/fem-dg/operator/adaptation/estimator.hh>
#if HAVE_DUNE_FEMPY
// this is part of dune-fem now
#include
<dune/fempy/quadrature/fempyquadratures.hh>
#endif
namespace
Dune
{
...
...
@@ -79,14 +82,45 @@ namespace Fem
typedef
typename
DiffusionFluxSelector
<
ModelType
,
DiscreteFunctionSpaceType
,
diffFluxId
,
formId
>::
type
DiffusionFluxType
;
typedef
DefaultOperatorTraits
<
ModelType
,
DestinationType
,
AdvectionFluxType
,
DiffusionFluxType
,
std
::
tuple
<>
,
typename
DiscreteFunctionSpaceType
::
FunctionSpaceType
,
#if HAVE_DUNE_FEMPY
Dune
::
FemPy
::
FempyQuadratureTraits
,
// use quadratures from dune-fempy
#else
Dune
::
Fem
::
DefaultQuadratureTraits
,
template
<
int
d
,
class
Space
>
struct
OperatorTraitsSelector
{
// default quadratures for normal spaces
typedef
DefaultOperatorTraits
<
ModelType
,
DestinationType
,
AdvectionFluxType
,
DiffusionFluxType
,
std
::
tuple
<>
,
typename
Space
::
FunctionSpaceType
,
Dune
::
Fem
::
DefaultQuadratureTraits
,
threading
>
type
;
};
#if HAVE_DUNE_LOCALFUNCTIONS
template
<
int
d
,
class
FunctionSpace
,
class
GridPart
,
unsigned
int
order
,
template
<
class
>
class
Storage
>
struct
OperatorTraitsSelector
<
d
,
Dune
::
Fem
::
FixedOrderDGLagrangeSpace
<
FunctionSpace
,
GridPart
,
order
,
Dune
::
GaussLobattoPointSet
,
Storage
>
>
{
// default quadratures for normal spaces
typedef
DefaultOperatorTraits
<
ModelType
,
DestinationType
,
AdvectionFluxType
,
DiffusionFluxType
,
std
::
tuple
<>
,
FunctionSpace
,
Dune
::
Fem
::
GaussLobattoQuadratureTraits
,
threading
>
type
;
};
template
<
int
d
,
class
FunctionSpace
,
class
GridPart
,
unsigned
int
order
,
template
<
class
>
class
Storage
>
struct
OperatorTraitsSelector
<
d
,
Dune
::
Fem
::
FixedOrderDGLagrangeSpace
<
FunctionSpace
,
GridPart
,
order
,
Dune
::
GaussLegendrePointSet
,
Storage
>
>
{
// default quadratures for normal spaces
typedef
DefaultOperatorTraits
<
ModelType
,
DestinationType
,
AdvectionFluxType
,
DiffusionFluxType
,
std
::
tuple
<>
,
FunctionSpace
,
Dune
::
Fem
::
GaussLegendreQuadratureTraits
,
threading
>
type
;
};
#endif
threading
>
OpTraits
;
typedef
typename
std
::
conditional
<
Additional
::
defaultQuadrature
,
typename
OperatorTraitsSelector
<
0
,
DiscreteFunctionSpaceType
>
::
type
,
// fempy quadratures
DefaultOperatorTraits
<
ModelType
,
DestinationType
,
AdvectionFluxType
,
DiffusionFluxType
,
std
::
tuple
<>
,
typename
DiscreteFunctionSpaceType
::
FunctionSpaceType
,
Dune
::
FemPy
::
FempyQuadratureTraits
,
threading
>
>
::
type
OpTraits
;
typedef
AdvectionDiffusionOperatorSelector
<
OpTraits
,
formId
,
limiterId
>
OperatorSelectorType
;
...
...
This diff is collapsed.
Click to expand it.
python/dune/femdg/_operators.py
+
4
−
0
View file @
4283d5f8
...
...
@@ -149,6 +149,7 @@ def femDGOperator(Model, space,
limiter
=
"
minmod
"
,
advectionFlux
=
"
default
"
,
diffusionScheme
=
"
cdg2
"
,
threading
=
False
,
defaultQuadrature
=
True
,
initialTime
=
0.0
,
parameters
=
None
):
if
type
(
Model
)
==
list
or
type
(
Model
)
==
tuple
:
...
...
@@ -334,6 +335,9 @@ def femDGOperator(Model, space,
struct
.
append
([
Declaration
(
Variable
(
"
const Dune::Fem::DiffusionFlux::Enum
"
,
"
diffFluxId =
"
+
diffFluxId
),
static
=
True
)])
struct
.
append
([
Declaration
(
Variable
(
"
const bool
"
,
"
defaultQuadrature
"
),
initializer
=
defaultQuadrature
,
static
=
True
)])
writer
=
SourceWriter
(
StringWriter
())
writer
.
emit
([
struct
])
...
...
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