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
932ef34d
Commit
932ef34d
authored
6 years ago
by
Robert K
Browse files
Options
Downloads
Patches
Plain Diff
Some cleanup.
parent
052452da
No related branches found
No related tags found
1 merge request
!4
Latest features added to dune-fem-dg.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/fem-dg/models/modelwrapper.hh
+15
-37
15 additions, 37 deletions
dune/fem-dg/models/modelwrapper.hh
dune/fem-dg/solver/dg.hh
+4
-2
4 additions, 2 deletions
dune/fem-dg/solver/dg.hh
with
19 additions
and
39 deletions
dune/fem-dg/models/modelwrapper.hh
+
15
−
37
View file @
932ef34d
...
...
@@ -12,17 +12,10 @@
#include
<dune/fem/misc/boundaryidprovider.hh>
#include
<dune/fem/space/common/functionspace.hh>
//
#include <dune/fem-dg/operator/fluxes/analyticaleulerflux.hh>
//
fem-dg includes
#include
<dune/fem-dg/models/defaultmodel.hh>
#include
<dune/fem-dg/models/defaultprobleminterfaces.hh>
#include
<dune/fem-dg/misc/error/l2eocerror.hh>
#include
<dune/fem-dg/misc/error/l1eocerror.hh>
#if HAVE_DUNE_FEMPY
#include
<dune/fem/schemes/diffusionmodel.hh>
#endif
namespace
Dune
{
namespace
Fem
...
...
@@ -75,19 +68,10 @@ namespace Fem
void
evaluate
(
const
DomainType
&
x
,
const
double
time
,
RangeType
&
res
)
const
{
res
=
0
;
if
(
x
[
0
]
<
0.5
)
{
// default is sod's rp
res
[
0
]
=
1.0
;
res
[
dimDomain
+
1
]
=
1.0
;
}
else
{
res
[
0
]
=
0.125
;
res
[
dimDomain
+
1
]
=
0.1
;
}
std
::
abort
();
}
double
gamma
()
const
{
return
1.4
;
}
};
}
// end namespace detail
...
...
@@ -154,11 +138,6 @@ namespace Fem
using
BaseType
::
time
;
using
BaseType
::
hasMass
;
void
setTime
(
double
t
)
{
BaseType
::
setTime
(
t
);
}
ModelWrapper
(
const
AdvectionModelType
&
advModel
,
const
DiffusionModelType
&
diffModel
)
:
advection_
(
advModel
),
diffusion_
(
diffModel
),
...
...
@@ -169,6 +148,13 @@ namespace Fem
modified_
[
1
]
=
dimRange
-
1
;
}
void
setTime
(
const
double
t
)
{
BaseType
::
setTime
(
t
);
}
double
gamma
()
const
{
return
problem_
.
gamma
();
}
template
<
class
Entity
>
void
setEntity
(
const
Entity
&
entity
)
const
{
...
...
@@ -219,15 +205,6 @@ namespace Fem
return
0
;
}
inline
void
conservativeToPrimitive
(
const
double
time
,
const
DomainType
&
xgl
,
const
RangeType
&
cons
,
RangeType
&
prim
,
const
bool
)
const
{
// impl_.evaluate( xgl, time, prim )
;
}
template
<
class
LocalEvaluation
>
inline
void
advection
(
const
LocalEvaluation
&
local
,
const
RangeType
&
u
,
...
...
@@ -288,6 +265,7 @@ namespace Fem
template
<
class
LocalEvaluation
>
inline
bool
hasBoundaryValue
(
const
LocalEvaluation
&
local
)
const
{
return
true
;
RangeType
u
;
int
id
=
getBoundaryId
(
local
);
return
AdditionalType
::
boundaryValue
(
id
,
time
(),
local
.
entity
(),
local
.
quadraturePoint
(),
u
,
u
);
...
...
@@ -299,6 +277,8 @@ namespace Fem
const
RangeType
&
uLeft
,
RangeType
&
uRight
)
const
{
uRight
=
uLeft
;
return
;
int
id
=
getBoundaryId
(
local
);
#ifndef NDEBUG
const
bool
isDirichlet
=
...
...
@@ -354,7 +334,6 @@ namespace Fem
return
0
;
}
// here x is in global coordinates
template
<
class
LocalEvaluation
>
inline
void
maxSpeed
(
const
LocalEvaluation
&
local
,
const
DomainType
&
normal
,
...
...
@@ -431,11 +410,10 @@ namespace Fem
indicator
=
AdditionalType
::
jump
(
it
,
x
,
uLeft
,
uRight
);
}
// misc for eoc calculation
template
<
class
DiscreteFunction
>
void
eocErrors
(
const
DiscreteFunction
&
df
)
const
{
EOCErrorList
::
setErrors
<
L2EOCError
>
(
*
this
,
df
);
EOCErrorList
::
setErrors
<
L1EOCError
>
(
*
this
,
df
);
}
protected
:
...
...
This diff is collapsed.
Click to expand it.
dune/fem-dg/solver/dg.hh
+
4
−
2
View file @
932ef34d
...
...
@@ -33,7 +33,8 @@ namespace Fem
public:
static
const
Solver
::
Enum
solverId
=
Additional
::
solverId
;
static
const
Formulation
::
Enum
formId
=
Additional
::
formId
;
static
const
AdvectionLimiter
::
Enum
limiterId
=
Additional
::
limiterId
;
static
const
AdvectionLimiter
::
Enum
limiterId
=
AdvectionLimiter
::
Enum
::
limited
;
// Additional::limiterId;
// for valid advection fluxes see dune/fem-dg/operator/fluxes/advection/parameters.hh
static
const
AdvectionFlux
::
Enum
advFluxId
=
Additional
::
advFluxId
;
// for valid diffusion fluxes see dune/fem-dg/operator/fluxes/diffusion/parameters.hh
...
...
@@ -59,10 +60,11 @@ namespace Fem
typedef
DefaultOperatorTraits
<
ModelType
,
DestinationType
,
AdvectionFluxType
,
DiffusionFluxType
>
OpTraits
;
typedef
DGLimitedAdvectionOperator
<
OpTraits
,
Additional
::
hasAdvection
,
Additional
::
hasDiffusion
>
DGOperatorType
;
//typedef typename AdvectionDiffusionOperatorSelector< OpTraits, formId, limiterId > :: FullOperatorType
// DGOperatorType ;
typedef
typename
AdvectionDiffusionOperatorSelector
<
OpTraits
,
formId
,
limiterId
>
::
ExplicitOperatorType
DGOperatorType
;
//
typedef typename AdvectionDiffusionOperatorSelector< OpTraits, formId, limiterId > :: ExplicitOperatorType DGOperatorType ;
// solver selection, available fem, istl, petsc, ...
typedef
typename
MatrixFreeSolverSelector
<
solverId
,
symmetric
>
::
template
LinearInverseOperatorType
<
DiscreteFunctionSpaceType
,
DiscreteFunctionSpaceType
>
LinearSolverType
;
...
...
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