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
3aa2dff5
Commit
3aa2dff5
authored
1 month ago
by
Ivan Buntic
Browse files
Options
Downloads
Patches
Plain Diff
[slides][grid] Add file paths for code blocks.
parent
77992217
No related branches found
Branches containing commit
No related tags found
1 merge request
!296
Slides update
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
slides/grid.md
+9
-3
9 additions, 3 deletions
slides/grid.md
with
9 additions
and
3 deletions
slides/grid.md
+
9
−
3
View file @
3aa2dff5
...
...
@@ -32,10 +32,11 @@ Implementations of the Dune grid interface
#include
<dune/grid/yaspgrid.hh>
...
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
Injection2p
>
{
struct
Grid
<
TypeTag
,
TTag
::
TwoPIncompressible
>
{
using
type
=
Dune
::
YaspGrid
<
2
>
;
};
```
<span
style=
"font-size: 0.4em; position: relative; top: -38px; color: gray;"
>
File:
`dumux/test/porousmediumflow/2p/incompressible/properties.hh`
</span>
*
Include the matching grid manager header files in main file and create the grid via a grid manager instance
```
cpp
...
...
@@ -45,6 +46,7 @@ Implementations of the Dune grid interface
GridManager
<
Grid
>
gridManager
;
gridManager
.
init
();
```
<span
style=
"font-size: 0.4em; position: relative; top: -38px; color: gray;"
>
File:
`dumux/test/porousmediumflow/2p/incompressible/main.cc`
</span>
## Create grid
...
...
@@ -59,6 +61,7 @@ The grid manager looks for grid information in the runtime parameter tree
UpperRight
=
1 1
Cells
=
10 5
```
<span
style=
"font-size: 0.4em; position: relative; top: -38px; color: gray;"
>
File:
`dumux/test/porousmediumflow/2p/incompressible/params.input`
</span>
<img
src=
img/params_grid.png
width=
"200"
>
...
...
@@ -69,6 +72,7 @@ The grid manager looks for grid information in the runtime parameter tree
[Grid]
File
=
./grids/heterogeneousSmall.dgf
```
<span
style=
"font-size: 0.4em; position: relative; top: -38px; color: gray;"
>
File:
`dumux/test/io/gridmanager/test_gridmanager_dgf.input`
</span>
*
Supported grid file formats
*
DGF (Dune Grid Format)
...
...
@@ -82,11 +86,13 @@ constructing a `Dune::YaspGrid`:
```
cpp
constexpr
int
dim
=
2
;
using
Yasp
=
Dune
::
YaspGrid
<
dim
,
Dune
::
EquidistantOffsetCoordinates
<
double
,
dim
>>
;
std
::
array
<
int
,
dim
>
cells
;
cells
.
fill
(
30
);
Dune
::
FieldVector
<
double
,
dim
>
lowerLeft
(
1.0
),
upperRight
(
2.0
);
using
Yasp
=
Dune
::
YaspGrid
<
dim
,
Dune
::
EquidistantOffsetCoordinates
<
double
,
dim
>>
;
Dune
::
FieldVector
<
double
,
dim
>
lowerLeft
(
1.1
),
upperRight
(
2.2
);
Yasp
yasp
(
lowerLeft
,
upperRight
,
cells
);
```
<span
style=
"font-size: 0.4em; position: relative; top: -38px; color: gray;"
>
File:
`dumux/test/geometry/test_intersectingentity_cartesiangrid.cc`
</span>
# Exercise
## Exercise
...
...
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