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
19740dbb
Commit
19740dbb
authored
6 years ago
by
Sina Ackermann
Committed by
Katharina Heck
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[examples] Update README.md - adaptive grid
parent
e30509bd
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
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/examples/2pinfiltration/README.md
+45
-1
45 additions, 1 deletion
test/examples/2pinfiltration/README.md
with
45 additions
and
1 deletion
test/examples/2pinfiltration/README.md
+
45
−
1
View file @
19740dbb
This tutorial was copied from tests/porousmediumflow/2p/adaptive and restricted to the cell-centered finite volume TPFA discretization scheme.
You need ALUGrid[0] in order to compile and run it.
You need
[
ALUGrid
]
[
0
]
in order to compile and run it.
# Two-phase flow with infiltration and adaptive grid
...
...
@@ -11,7 +11,51 @@ Soil contamination problem where DNAPL infiltrates a fully water saturated mediu
## Infiltration (point source)
## Adaptive grid
### main.cc
The following headers need to be included in the main file:
```
C++
#include <dumux/adaptive/adapt.hh>
#include <dumux/adaptive/markelements.hh>
#include <dumux/adaptive/initializationindicator.hh>
#include <dumux/porousmediumflow/2p/griddatatransfer.hh>
#include <dumux/porousmediumflow/2p/gridadaptindicator.hh>
```
The grid adaptation is prepared during the initialization by the following steps:
*
instantiate indicator & data transfer, read parameters for indicator (ll. 111-115)
*
do initial refinement around sources/BCs (l. 118)
*
refine up to the maximum level (ll. 121-137)
*
do refinement for the initial conditions using the indicator (ll. 140-144)
*
update grid data after adaption (ll. 147-152)
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).
In case of grid adaptation, the following updates are necessary (ll. 201-205):
```
C++
xOld = x; //!< Overwrite the old solution with the new (resized & interpolated) one
ssembler->setJacobianPattern(); //!< Tell the assembler to resize the matrix and set pattern
assembler->setResidualSize(); //!< Tell the assembler to resize the residual
gridVariables->updateAfterGridAdaption(x); //!< Initialize the secondary variables to the new (and "new old") solution
problem->computePointSourceMap(); //!< Update the point source map
```
### problem.hh
...
### params.input
The following parameters in the
`[Adaptive]`
parameter group determine the grid adaptation behavior:
*
`RefineAtDirichletBC`
: ...
*
`RefineAtFluxBC`
: ...
*
`MinLevel`
: ...
*
`MaxLevel`
: ...
*
`CoarsenTolerance`
: ...
*
`RefineTolerance`
: ...
...
...
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