Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
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
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
dumux-repositories
dumux
Commits
b94dfa12
Commit
b94dfa12
authored
5 years ago
by
Sina Ackermann
Committed by
Katharina Heck
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[2pinfiltration] Update README.md
parent
00bba52d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1547
[examples] Set up problem for documentation (2p, adaptive, point source)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/2pinfiltration/README.md
+33
-13
33 additions, 13 deletions
examples/2pinfiltration/README.md
examples/2pinfiltration/problem.hh
+0
-5
0 additions, 5 deletions
examples/2pinfiltration/problem.hh
with
33 additions
and
18 deletions
examples/2pinfiltration/README.md
+
33
−
13
View file @
b94dfa12
...
@@ -48,13 +48,27 @@ The following headers need to be included in the main file:
...
@@ -48,13 +48,27 @@ The following headers need to be included in the main file:
```
```
The grid adaptation is prepared during the initialization by the following steps:
The grid adaptation is prepared during the initialization by the following steps:
*
instantiate indicator & data transfer, read parameters for indicator (ll. 111-115)
1.
**Instantiate indicator (l. 114):**
*
do initial refinement around sources/BCs (l. 118)
The indicator is saturation-dependent and defined in the file dumux/porousmediumflow/2p/gridadaptindicator.hh.
*
refine up to the maximum level (ll. 121-137)
It allows to set the minimum and maximum allowed refinement levels via the input parameters
*
do refinement for the initial conditions using the indicator (ll. 140-144)
`Adaptive.MinLevel`
and
`Adaptive.MaxLevel`
.
*
update grid data after adaption (ll. 147-152)
2.
**Instantiate data transfer (l. 154):**
The data transfer performs the transfer of data on a grid from before to after adaptation and is defined in the
file dumux/porousmediumflow/2p/griddatatransfer.hh.
Its main functions are to store and reconstruct the primary variables.
3.
**Set the indicator for the initial refinement around sources/BCs (l. 118):**
We use the GridAdaptInitializationIndicator defined in dumux/adaptive/initializationindicator.hh.
4.
**Refine up to the maximum level (ll. 121-137):**
For every level, the indicator used for the refinement/coarsening is calculated.
If any grid cells have to be adapted, the gridvariables and the pointsourcemap are updated.
5.
**Do refinement for the initial conditions using the indicator (ll. 140-144):**
Depending on the initial conditions, another grid adaptation might be necessary.
The gridadaptindicator uses the input parameters
`Adaptive.RefineTolerance`
and
`Adaptive.CoarsenTolerance`
for this step.
For further details on the indicator calculations see dumux/porousmediumflow/2p/gridadaptindicator.hh, ll. 116.
Afterwards, the marked elements are adapted.
6.
**Update grid data after adaption (ll. 147-152):**
In case of a grid adaptation, the gridvariables and the pointsourcemap are updated.
The indicator ...
During the time loop, the refinement indicator is computed (l. 191) and the respective elements to be refined are marked (ll. 194-196).
During the time loop, the refinement indicator is computed (l. 191) and the respective elements to be refined are marked (ll. 194-196).
...
@@ -68,16 +82,22 @@ In case of grid adaptation, the following updates are necessary (ll. 201-205):
...
@@ -68,16 +82,22 @@ In case of grid adaptation, the following updates are necessary (ll. 201-205):
```
```
### problem.hh
### problem.hh
...
A non-conforming grid such as ALUGrid has to be chosen in the problem file:
```
C++
//! Use non-conforming refinement
template<class TypeTag>
struct Grid<TypeTag, TTag::TwoPAdaptivePointSource> { using type = Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>; };
```
### params.input
### params.input
The following parameters in the
`[Adaptive]`
parameter group determine the grid adaptation behavior:
The following parameters in the
`[Adaptive]`
parameter group determine the grid adaptation behavior:
*
`RefineAtDirichletBC`
:
...
*
`RefineAtDirichletBC`
:
If to refine at Dirichlet boundaries
*
`RefineAtFluxBC`
:
...
*
`RefineAtFluxBC`
:
If to refine at Neumann/Robin boundaries
*
`MinLevel`
:
...
*
`MinLevel`
:
Minimum allowed refinement level, used by the indicators
*
`MaxLevel`
:
...
*
`MaxLevel`
:
Maximum allowed refinement level, used by the indicators
*
`CoarsenTolerance`
: ...
*
`CoarsenTolerance`
*
`RefineTolerance`
: ...
*
`RefineTolerance`
## Solution
## Solution


...
...
This diff is collapsed.
Click to expand it.
examples/2pinfiltration/problem.hh
+
0
−
5
View file @
b94dfa12
...
@@ -54,13 +54,8 @@ namespace Dumux {
...
@@ -54,13 +54,8 @@ namespace Dumux {
}
// end namespace TTag
}
// end namespace TTag
//! Use non-conforming refinement
//! Use non-conforming refinement
#if HAVE_DUNE_ALUGRID
template
<
class
TypeTag
>
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
TwoPAdaptivePointSource
>
{
using
type
=
Dune
::
ALUGrid
<
2
,
2
,
Dune
::
cube
,
Dune
::
nonconforming
>
;
};
struct
Grid
<
TypeTag
,
TTag
::
TwoPAdaptivePointSource
>
{
using
type
=
Dune
::
ALUGrid
<
2
,
2
,
Dune
::
cube
,
Dune
::
nonconforming
>
;
};
#else
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
TwoPAdaptivePointSource
>
{
using
type
=
Dune
::
YaspGrid
<
2
>
;
};
#endif
template
<
class
TypeTag
>
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
TwoPAdaptivePointSource
>
{
using
type
=
PointSourceTestProblem
<
TypeTag
>
;
};
struct
Problem
<
TypeTag
,
TTag
::
TwoPAdaptivePointSource
>
{
using
type
=
PointSourceTestProblem
<
TypeTag
>
;
};
...
...
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