Skip to content
Snippets Groups Projects
Commit e3760a23 authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Use FoamGrid if dim < dimworld

parent ac1d01aa
Branches
No related tags found
No related merge requests found
Pipeline #
......@@ -15,11 +15,14 @@
#include <dune/common/parametertreeparser.hh>
#include <dune/grid/uggrid.hh>
#include <dune/grid/onedgrid.hh>
#include <dune/grid/utility/structuredgridfactory.hh>
#include <dune/grid/io/file/gmshreader.hh>
#if HAVE_DUNE_FOAMGRID
#include <dune/foamgrid/foamgrid.hh>
#endif
#include <dune/functions/functionspacebases/pqknodalbasis.hh>
#include <dune/fufem/boundarypatch.hh>
......@@ -120,7 +123,12 @@ int main (int argc, char *argv[]) try
// ///////////////////////////////////////
// Create the grid
// ///////////////////////////////////////
typedef std::conditional<dim==1,OneDGrid,UGGrid<dim> >::type GridType;
#if HAVE_DUNE_FOAMGRID
typedef std::conditional<dim==dimworld,UGGrid<dim>, FoamGrid<dim,dimworld> >::type GridType;
#else
static_assert(dim==dimworld, "FoamGrid needs to be installed to allow problems with dim != dimworld.");
typedef UGGrid<dim> GridType;
#endif
shared_ptr<GridType> grid;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment