Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
c788bbdb
Commit
c788bbdb
authored
May 01, 2021
by
hanchuan
Committed by
Timo Koch
May 05, 2021
Browse files
[examples] Use Dumux::NumEqVector in examples and update documentation
parent
28cac626
Changes
9
Hide whitespace changes
Inline
Side-by-side
examples/1ptracer/doc/tracer.md
View file @
c788bbdb
...
...
@@ -246,6 +246,12 @@ Include the `BoundaryTypes` class which specifies the boundary types set in this
#include <dumux/common/boundarytypes.hh>
```
Include the
`NumEqVector`
class which specifies a field vector with size number of equations in this problem.
```
cpp
#include <dumux/common/numeqvector.hh>
```
### The problem class
We enter the problem class where all necessary boundary conditions and initial
...
...
@@ -270,7 +276,7 @@ class TracerTestProblem : public PorousMediumFlowProblem<TypeTag>
using
SpatialParams
=
GetPropType
<
TypeTag
,
Properties
::
SpatialParams
>
;
using
Element
=
typename
GridGeometry
::
GridView
::
template
Codim
<
0
>
::
Entity
;
using
GlobalPosition
=
typename
Element
::
Geometry
::
GlobalCoordinate
;
using
NumEqVector
=
GetPropType
<
TypeTag
,
Properties
::
NumEqVector
>
;
using
NumEqVector
=
Dumux
::
NumEqVector
<
PrimaryVariables
>
;
using
GridVariables
=
GetPropType
<
TypeTag
,
Properties
::
GridVariables
>
;
using
ElementVolumeVariables
=
typename
GridVariables
::
GridVolumeVariables
::
LocalView
;
using
ElementFluxVariablesCache
=
typename
GridVariables
::
GridFluxVariablesCache
::
LocalView
;
...
...
examples/1ptracer/problem_tracer.hh
View file @
c788bbdb
...
...
@@ -33,6 +33,7 @@
#include <dumux/porousmediumflow/problem.hh>
// Include the `BoundaryTypes` class which specifies the boundary types set in this problem.
#include <dumux/common/boundarytypes.hh>
// Include the `NumEqVector` class which specifies a field vector with size number of equations in this problem.
#include <dumux/common/numeqvector.hh>
// ### The problem class
...
...
examples/2pinfiltration/doc/2p.md
View file @
c788bbdb
...
...
@@ -151,13 +151,14 @@ struct Formulation<TypeTag, TTag::PointSourceExample>
### Includes
We start with includes for
`PorousMediumFlowProblem`
,
`readFileToContainer`
,
`BoundaryTypes`
and
`GetPropType`
(used below).
`BoundaryTypes`
,
`GetPropType`
and
`NumEqVector`
(used below).
```
cpp
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/io/container.hh>
#include <dumux/common/boundarytypes.hh>
#include <dumux/common/properties.hh>
#include <dumux/common/numeqvector.hh>
```
### Problem class
...
...
@@ -188,7 +189,7 @@ The class implementation starts with some alias declarations and index definitio
using
PointSource
=
GetPropType
<
TypeTag
,
Properties
::
PointSource
>
;
using
BoundaryTypes
=
Dumux
::
BoundaryTypes
<
PrimaryVariables
::
size
()
>
;
using
GlobalPosition
=
typename
Element
::
Geometry
::
GlobalCoordinate
;
using
NumEqVector
=
GetPropType
<
TypeTag
,
Properties
::
NumEqVector
>
;
using
NumEqVector
=
Dumux
::
NumEqVector
<
PrimaryVariables
>
;
using
Indices
=
typename
GetPropType
<
TypeTag
,
Properties
::
ModelTraits
>::
Indices
;
enum
{
...
...
examples/2pinfiltration/problem.hh
View file @
c788bbdb
...
...
@@ -25,7 +25,7 @@
//
// ### Includes
// We start with includes for `PorousMediumFlowProblem`, `readFileToContainer`,
// `BoundaryTypes`
and
`GetPropType` (used below).
// `BoundaryTypes`
,
`GetPropType`
and `NumEqVector`
(used below).
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/io/container.hh>
#include <dumux/common/boundarytypes.hh>
...
...
examples/biomineralization/doc/setup.md
View file @
c788bbdb
...
...
@@ -40,6 +40,7 @@ conditions for the biominearalization example.
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/common/boundarytypes.hh> // for `BoundaryTypes`
#include <dumux/common/properties.hh> // GetPropType
#include <dumux/common/numeqvector.hh> // for `NumEqVector`
#include <dumux/material/components/ammonia.hh>
#include <dumux/discretization/evalgradients.hh>
#include <dumux/io/container.hh>
...
...
@@ -101,7 +102,7 @@ class MICPColumnProblemSimpleChemistry : public PorousMediumFlowProblem<TypeTag>
};
using
PrimaryVariables
=
GetPropType
<
TypeTag
,
Properties
::
PrimaryVariables
>
;
using
NumEqVector
=
GetPropType
<
TypeTag
,
Properties
::
NumEqVector
>
;
using
NumEqVector
=
Dumux
::
NumEqVector
<
PrimaryVariables
>
;
using
BoundaryTypes
=
Dumux
::
BoundaryTypes
<
PrimaryVariables
::
size
()
>
;
using
ElementVolumeVariables
=
typename
GetPropType
<
TypeTag
,
Properties
::
GridVolumeVariables
>::
LocalView
;
using
GridGeometry
=
GetPropType
<
TypeTag
,
Properties
::
GridGeometry
>
;
...
...
examples/biomineralization/problem.hh
View file @
c788bbdb
...
...
@@ -32,7 +32,7 @@
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/common/boundarytypes.hh> // for `BoundaryTypes`
#include <dumux/common/properties.hh> // GetPropType
#include <dumux/common/numeqvector.hh>
#include <dumux/common/numeqvector.hh>
// for `NumEqVector`
#include <dumux/material/components/ammonia.hh>
#include <dumux/discretization/evalgradients.hh>
#include <dumux/io/container.hh>
...
...
examples/liddrivencavity/doc/problem.md
View file @
c788bbdb
...
...
@@ -147,6 +147,7 @@ conditions for the Navier-Stokes single-phase flow simulation.
```
cpp
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
#include <dumux/common/numeqvector.hh>
```
Include the
`NavierStokesProblem`
class, the base
...
...
@@ -178,8 +179,8 @@ class LidDrivenCavityExampleProblem : public NavierStokesProblem<TypeTag>
using
FVElementGeometry
=
typename
GridGeometry
::
LocalView
;
using
SubControlVolume
=
typename
GridGeometry
::
SubControlVolume
;
using
Indices
=
typename
GetPropType
<
TypeTag
,
Properties
::
ModelTraits
>::
Indices
;
using
NumEqVector
=
GetPropType
<
TypeTag
,
Properties
::
NumEqVector
>
;
using
PrimaryVariables
=
GetPropType
<
TypeTag
,
Properties
::
PrimaryVariables
>
;
using
NumEqVector
=
Dumux
::
NumEqVector
<
PrimaryVariables
>
;
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
Element
=
typename
GridGeometry
::
GridView
::
template
Codim
<
0
>
::
Entity
;
...
...
examples/shallowwaterfriction/doc/swe.md
View file @
c788bbdb
...
...
@@ -168,6 +168,12 @@ Include the `BoundaryTypes` class which specifies the boundary types set in this
#include <dumux/common/boundarytypes.hh>
```
Include the
`NumEqVector`
class which specifies a field vector with size number of equations in this problem.
```
cpp
#include <dumux/common/numeqvector.hh>
```
### The problem class
We enter the problem class where all necessary boundary conditions and initial conditions are set for our simulation.
In addition the analytical solution of the problem is calculated.
...
...
@@ -186,7 +192,6 @@ class RoughChannelProblem : public ShallowWaterProblem<TypeTag>
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
Indices
=
typename
GetPropType
<
TypeTag
,
Properties
::
ModelTraits
>::
Indices
;
using
GridGeometry
=
GetPropType
<
TypeTag
,
Properties
::
GridGeometry
>
;
using
NeumannFluxes
=
GetPropType
<
TypeTag
,
Properties
::
NumEqVector
>
;
using
ElementVolumeVariables
=
typename
GetPropType
<
TypeTag
,
Properties
::
GridVolumeVariables
>::
LocalView
;
using
GridVariables
=
GetPropType
<
TypeTag
,
Properties
::
GridVariables
>
;
using
ElementFluxVariablesCache
=
typename
GridVariables
::
GridFluxVariablesCache
::
LocalView
;
...
...
@@ -195,7 +200,8 @@ class RoughChannelProblem : public ShallowWaterProblem<TypeTag>
using
GridView
=
typename
GetPropType
<
TypeTag
,
Properties
::
GridGeometry
>::
GridView
;
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
GlobalPosition
=
typename
Element
::
Geometry
::
GlobalCoordinate
;
using
NumEqVector
=
GetPropType
<
TypeTag
,
Properties
::
NumEqVector
>
;
using
NumEqVector
=
Dumux
::
NumEqVector
<
PrimaryVariables
>
;
using
NeumannFluxes
=
NumEqVector
;
using
SubControlVolume
=
typename
FVElementGeometry
::
SubControlVolume
;
public:
...
...
examples/shallowwaterfriction/problem.hh
View file @
c788bbdb
...
...
@@ -38,6 +38,7 @@
#include <dumux/freeflow/shallowwater/boundaryfluxes.hh>
// Include the `BoundaryTypes` class which specifies the boundary types set in this problem.
#include <dumux/common/boundarytypes.hh>
// Include the `NumEqVector` class which specifies a field vector with size number of equations in this problem.
#include <dumux/common/numeqvector.hh>
// ### The problem class
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment