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

Run standard tests also with YaspGrid

This makes sure at least one grid implementation is always available.
parent 9347863f
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,8 @@
#include <dune/localfunctions/lagrange/pqkfactory.hh>
#include <dune/grid/yaspgrid.hh>
#include <dune/grid/utility/structuredgridfactory.hh>
#if HAVE_UG
......@@ -371,7 +373,12 @@ bool checkWithGrid(TestSuite& suite, int uniformRefinements, std::string name)
std::array<unsigned int,dim> elements;
std::fill(elements.begin(), elements.end(), 1);
std::shared_ptr<GridType> grid = Dune::StructuredGridFactory<GridType>::createSimplexGrid(lower,upper,elements);
std::shared_ptr<GridType> grid;
if (std::is_same<GridType,Dune::YaspGrid<dim, Dune::EquidistantOffsetCoordinates<double,dim> > >::value)
grid = Dune::StructuredGridFactory<GridType>::createCubeGrid(lower,upper,elements);
else
grid = Dune::StructuredGridFactory<GridType>::createSimplexGrid(lower,upper,elements);
grid->globalRefine(uniformRefinements);
......@@ -389,6 +396,8 @@ bool checkWithStandardGrids(TestSuite& suite)
{
bool passed = true;
passed = passed and checkWithGrid<Dune::YaspGrid<2, Dune::EquidistantOffsetCoordinates<double,2> > >(suite, 2, "YaspGrid<2>");
#if HAVE_UG
passed = passed and checkWithGrid<Dune::UGGrid<2> >(suite, 5, "UGGrid<2>");
passed = passed and checkWithGrid<Dune::UGGrid<3> >(suite, 3, "UGGrid<3>");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment