Skip to content
Snippets Groups Projects
Commit 3aa2dff5 authored by Ivan Buntic's avatar Ivan Buntic
Browse files

[slides][grid] Add file paths for code blocks.

parent 77992217
No related branches found
No related tags found
1 merge request!296Slides update
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment