Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux-course
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-course
Commits
df9b047a
Commit
df9b047a
authored
8 months ago
by
Martin Schneider
Committed by
Ivan Buntic
8 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[main] Correct readme
parent
920675db
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!266
Cleanup/ex main
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exercises/exercise-mainfile/README.md
+9
-16
9 additions, 16 deletions
exercises/exercise-mainfile/README.md
with
9 additions
and
16 deletions
exercises/exercise-mainfile/README.md
+
9
−
16
View file @
df9b047a
# Exercise Mainfiles (DuMuX course)
<br>
## Problem set-up
...
...
@@ -24,9 +23,7 @@ In the beginning, there is a uniform pressure of $1\cdot 10^5 Pa$ in the whole d
*
Navigate to the directory
`dumux-course/exercises/exercise-mainfile`
<br><br>
### Task 1: Getting familiar with the code
<hr>
## Task 1: Getting familiar with the code
Locate all the files you will need for this exercise
*
The __main file__ for the __incompressible, stationary__ problem :
`exercise1pamain.cc`
...
...
@@ -40,8 +37,8 @@ Locate all the files you will need for this exercise
*
The __input file__ for the __compressible, instationary__ problem:
`exercise_mainfile_c.input`
Please pay special attention to the similarities and differences in the three main files.
The first main file is solved linearly and does not need a
n
ewton solver or any other nonlinear solver method.
The second problem is a nonlinear problem and uses
n
ewton's method to solve the system.
The first main file is solved linearly and does not need a
N
ewton solver or any other nonlinear solver method.
The second problem is a nonlinear problem and uses
N
ewton's method to solve the system.
The third problem is nonlinear and additionally instationary.
Therefore, a time loop needs to be included in the main file.
...
...
@@ -72,15 +69,15 @@ auto gridGeometry = std::make_shared<GridGeometry>(leafGridView);
// the problem (initial and boundary conditions)
using
Problem
=
GetPropType
<
TypeTag
,
Properties
::
Problem
>
;
auto
problem
=
std
::
make_shared
<
Problem
>
(
fvG
ridGeometry
);
auto
problem
=
std
::
make_shared
<
Problem
>
(
g
ridGeometry
);
// the solution vector
using
SolutionVector
=
GetPropType
<
TypeTag
,
Properties
::
SolutionVector
>
;
SolutionVector
x
(
fvG
ridGeometry
->
numDofs
());
SolutionVector
x
(
g
ridGeometry
->
numDofs
());
// the grid variables
using
GridVariables
=
GetPropType
<
TypeTag
,
Properties
::
GridVariables
>
;
auto
gridVariables
=
std
::
make_shared
<
GridVariables
>
(
problem
,
fvG
ridGeometry
);
auto
gridVariables
=
std
::
make_shared
<
GridVariables
>
(
problem
,
g
ridGeometry
);
gridVariables
->
init
(
x
);
// initialize the vtk output module
...
...
@@ -108,7 +105,7 @@ timeLoop->setMaxTimeStepSize(maxDt);
// the assembler with time loop for instationary problem
using
Assembler
=
FVAssembler
<
TypeTag
,
DiffMethod
::
numeric
>
;
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
fvG
ridGeometry
,
gridVariables
,
timeLoop
);
auto
assembler
=
std
::
make_shared
<
Assembler
>
(
problem
,
g
ridGeometry
,
gridVariables
,
timeLoop
,
xOld
);
// the linear solver
using
LinearSolver
=
ILUBiCGSTABIstlSolver
<
LinearSolverTraits
<
GridGeometry
>
,
LinearAlgebraTraitsFromAssembler
<
Assembler
>>
;
...
...
@@ -149,9 +146,7 @@ timeLoop->start(); do
timeLoop
->
finalize
(
leafGridView
.
comm
());
```
<br><br><br>
### Task 2: Compiling and running an executable
<hr>
## Task 2: Compiling and running an executable
*
Change to the build-directory
...
...
@@ -179,9 +174,7 @@ make exercise_mainfile_a exercise_mainfile_b exercise_mainfile_c
paraview 1p_incompressible_stationary.pvd
```
<br><br><br>
### Task 3: Analytical differentiation
<hr>
## Task 3: Analytical differentiation
In the input file
`exercise_mainfile_a.input`
, you will see that there is a variable
`BaseEpsilon`
.
This defines the base value for the epsilon used in the numeric differentiation.
...
...
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