Skip to content
Snippets Groups Projects
Commit d957c7b7 authored by Elias Pipping's avatar Elias Pipping
Browse files

[Cleanup] Control grid selection through a header

parent 63fd316a
No related branches found
No related tags found
No related merge requests found
#ifndef SRC_EXPLICITGRID_HH #ifndef SRC_EXPLICITGRID_HH
#define SRC_EXPLICITGRID_HH #define SRC_EXPLICITGRID_HH
#if !HAVE_ALUGRID #include "gridselector.hh"
#error ALUGRID is required
#endif
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wignored-qualifiers"
#include <dune/grid/alugrid.hh>
#pragma clang diagnostic pop
using Grid = Dune::ALUGrid<MY_DIM, MY_DIM, Dune::simplex, Dune::nonconforming>;
using GridView = Grid::LeafGridView; using GridView = Grid::LeafGridView;
#endif #endif
#ifndef MY_DIM
#error MY_DIM unset
#endif
#define WANT_ALUGRID 0
#define WANT_GRID WANT_ALUGRID
#if WANT_GRID == WANT_ALUGRID
#if !HAVE_ALUGRID
#error ALUGRID was requested but not found
#endif
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wignored-qualifiers"
#include <dune/grid/alugrid.hh>
#pragma clang diagnostic pop
using Grid = Dune::ALUGrid<MY_DIM, MY_DIM, Dune::simplex, Dune::nonconforming>;
#else
#error requested a grid that does not exist
#endif
...@@ -16,14 +16,6 @@ ...@@ -16,14 +16,6 @@
#error datadir unset #error datadir unset
#endif #endif
#ifndef MY_DIM
#error MY_DIM unset
#endif
#if !HAVE_ALUGRID
#error ALUGRID is required
#endif
#include <cmath> #include <cmath>
#include <exception> #include <exception>
#include <fstream> #include <fstream>
...@@ -38,11 +30,6 @@ ...@@ -38,11 +30,6 @@
#include <dune/common/parametertree.hh> #include <dune/common/parametertree.hh>
#include <dune/common/parametertreeparser.hh> #include <dune/common/parametertreeparser.hh>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wignored-qualifiers"
#include <dune/grid/alugrid.hh>
#pragma clang diagnostic pop
#include <dune/grid/common/mcmgmapper.hh> #include <dune/grid/common/mcmgmapper.hh>
#include <dune/istl/bcrsmatrix.hh> #include <dune/istl/bcrsmatrix.hh>
#include <dune/istl/bvector.hh> #include <dune/istl/bvector.hh>
...@@ -74,6 +61,7 @@ ...@@ -74,6 +61,7 @@
#include "enums.hh" #include "enums.hh"
#include "fixedpointiterator.hh" #include "fixedpointiterator.hh"
#include "friction_writer.hh" #include "friction_writer.hh"
#include "gridselector.hh"
#include "sand-wedge-data/mybody.hh" #include "sand-wedge-data/mybody.hh"
#include "sand-wedge-data/mygeometry.hh" #include "sand-wedge-data/mygeometry.hh"
#include "sand-wedge-data/myglobalfrictiondata.hh" #include "sand-wedge-data/myglobalfrictiondata.hh"
...@@ -103,7 +91,6 @@ int main(int argc, char *argv[]) { ...@@ -103,7 +91,6 @@ int main(int argc, char *argv[]) {
MyGeometry::write(); MyGeometry::write();
// {{{ Set up grid // {{{ Set up grid
using Grid = Dune::ALUGrid<dims, dims, Dune::simplex, Dune::nonconforming>;
GridConstructor<Grid> gridConstructor; GridConstructor<Grid> gridConstructor;
auto grid = gridConstructor.getGrid(); auto grid = gridConstructor.getGrid();
......
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