diff --git a/slides/grid.md b/slides/grid.md index 4477b84597554ec2a9153d35366907ec43644282..f7788368655f18350a9ea4b935a218973fd66a4a 100644 --- a/slides/grid.md +++ b/slides/grid.md @@ -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