Commit 47282811 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'issue/neumann_example' into 'master'

reduct compile time in neumann example

See merge request !191
parents 991acbfc 4ae527b5
Pipeline #4512 failed with stage
in 14 seconds
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
#include <amdis/ProblemStat.hpp> #include <amdis/ProblemStat.hpp>
#include <amdis/LocalOperators.hpp> #include <amdis/LocalOperators.hpp>
#define GRID_ID 3
using namespace AMDiS; using namespace AMDiS;
template <class Grid> template <class Grid>
...@@ -51,18 +53,19 @@ int main(int argc, char** argv) ...@@ -51,18 +53,19 @@ int main(int argc, char** argv)
{ {
Environment env(argc, argv); Environment env(argc, argv);
#if GRID_ID == 0
// 2d grids // 2d grids
Dune::YaspGrid<2> grid0({1.0,1.0},{2,2}); Dune::YaspGrid<2> grid0({1.0,1.0},{2,2});
run(grid0); run(grid0);
#endif
#if HAVE_DUNE_SPGRID #if GRID_ID == 1 && HAVE_DUNE_SPGRID
Dune::SPDomain<double,2> domain({0.0,0.0}, {1.0,1.0}); Dune::SPDomain<double,2> domain({0.0,0.0}, {1.0,1.0});
Dune::SPGrid<double,2> grid1(domain, Dune::SPMultiIndex<2>({2,2})); Dune::SPGrid<double,2> grid1(domain, Dune::SPMultiIndex<2>({2,2}));
run(grid1); run(grid1);
#endif #endif
#if HAVE_DUNE_ALUGRID #if GRID_ID == 2 && HAVE_DUNE_ALUGRID
using Grid2 = Dune::ALUGrid<2,2,Dune::simplex,Dune::conforming>; using Grid2 = Dune::ALUGrid<2,2,Dune::simplex,Dune::conforming>;
using Factory2 = Dune::StructuredGridFactory<Grid2>; using Factory2 = Dune::StructuredGridFactory<Grid2>;
auto grid2 = Factory2::createSimplexGrid({0.0,0.0}, {1.0,1.0}, auto grid2 = Factory2::createSimplexGrid({0.0,0.0}, {1.0,1.0},
...@@ -70,7 +73,7 @@ int main(int argc, char** argv) ...@@ -70,7 +73,7 @@ int main(int argc, char** argv)
run(*grid2); run(*grid2);
#endif #endif
#if HAVE_DUNE_UGGRID #if GRID_ID == 3 && HAVE_DUNE_UGGRID
using Grid3 = Dune::UGGrid<2>; using Grid3 = Dune::UGGrid<2>;
using Factory3 = Dune::StructuredGridFactory<Grid3>; using Factory3 = Dune::StructuredGridFactory<Grid3>;
auto grid3 = Factory3::createSimplexGrid({0.0,0.0}, {1.0,1.0}, auto grid3 = Factory3::createSimplexGrid({0.0,0.0}, {1.0,1.0},
...@@ -78,10 +81,11 @@ int main(int argc, char** argv) ...@@ -78,10 +81,11 @@ int main(int argc, char** argv)
run(*grid3); run(*grid3);
#endif #endif
#if GRID_ID == 4
// 3d grids // 3d grids
Dune::YaspGrid<3> grid4({1.0,1.0,1.0},{2,2,2}); Dune::YaspGrid<3> grid4({1.0,1.0,1.0},{2,2,2});
run(grid4); run(grid4);
#endif
return 0; return 0;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment