Skip to content
Snippets Groups Projects
Commit ef1333fc authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[grids] add some more available grid tuples

parent e5bac69b
No related branches found
No related tags found
No related merge requests found
......@@ -65,13 +65,62 @@ typedef Dune::AlbertaGrid<3, 3> ALBERTA_3D;
namespace Dune {
namespace XT {
namespace Grid {
namespace internal {
// To give better error messages, required below.
template <size_t d>
class ThereIsNoSimplexGridAvailableInDimension
{};
} // namespace internal
/**
* \note Alberta grids are missing here on purpose, these cannot be handled automatically very well.
*/
using Available1dGridTypes = boost::tuple<ONED_1D, YASP_1D_EQUIDISTANT_OFFSET>;
/**
* \note Alberta grids are missing here on purpose, these cannot be handled automatically very well.
*/
using Available2dGridTypes = boost::tuple<YASP_2D_EQUIDISTANT_OFFSET
#if HAVE_DUNE_ALUGRID
,
ALU_2D_SIMPLEX_CONFORMING,
ALU_2D_SIMPLEX_NONCONFORMING,
ALU_2D_CUBE
#endif
#if HAVE_DUNE_UGGRID || HAVE_UG
,
UG_2D
#endif
>;
/**
* \note Alberta grids are missing here on purpose, these cannot be handled automatically very well.
*/
using Available3dGridTypes = boost::tuple<YASP_3D_EQUIDISTANT_OFFSET
#if HAVE_DUNE_ALUGRID
,
ALU_3D_SIMPLEX_CONFORMING,
ALU_3D_SIMPLEX_NONCONFORMING,
ALU_3D_CUBE
#endif
#if HAVE_DUNE_UGGRID || HAVE_UG
,
UG_3D
#endif
>;
/**
* \note Alberta grids are missing here on purpose, these cannot be handled automatically very well.
*/
using AvailableGridTypes = boost::tuple<ONED_1D,
YASP_1D_EQUIDISTANT_OFFSET,
YASP_2D_EQUIDISTANT_OFFSET,
YASP_3D_EQUIDISTANT_OFFSET,
YASP_4D_EQUIDISTANT_OFFSET
YASP_3D_EQUIDISTANT_OFFSET
#if HAVE_DUNE_ALUGRID
,
ALU_2D_SIMPLEX_CONFORMING,
......@@ -94,4 +143,52 @@ using AvailableGridTypes = boost::tuple<ONED_1D,
} // namespace Dune
using SIMPLEXGRID_1D = ONED_1D;
using SIMPLEXGRID_2D =
#if HAVE_DUNE_ALUGRID
ALU_2D_SIMPLEX_CONFORMING;
#elif HAVE_DUNE_UGGRID || HAVE_UG
UG_2D;
#else
Dune::XT::Grid::internal::ThereIsNoSimplexGridAvailableInDimension<2>;
#endif
using SIMPLEXGRID_3D =
#if HAVE_DUNE_ALUGRID
ALU_3D_SIMPLEX_CONFORMING;
#elif HAVE_DUNE_UGGRID || HAVE_UG
UG_3D;
#else
Dune::XT::Grid::internal::ThereIsNoSimplexGridAvailableInDimension<3>;
#endif
using CUBEGRID_1D = ONED_1D;
using CUBEGRID_2D = YASP_2D_EQUIDISTANT_OFFSET;
using CUBEGRID_3D = YASP_3D_EQUIDISTANT_OFFSET;
#if HAVE_DUNE_ALUGRID || HAVE_DUNE_UGGRID || HAVE_UG
# define SIMPLEXGRID_2D_AVAILABLE 1
# define SIMPLEXGRID_3D_AVAILABLE 1
#else
# define SIMPLEXGRID_2D_AVAILABLE 0
# define SIMPLEXGRID_3D_AVAILABLE 0
#endif
using GRID_1D = ONED_1D;
using GRID_2D =
#if SIMPLEXGRID_2D_AVAILABLE
SIMPLEXGRID_2D;
#else
YASP_2D_EQUIDISTANT_OFFSET;
#endif
using GRID_3D =
#if SIMPLEXGRID_3D_AVAILABLE
SIMPLEXGRID_3D;
#else
YASP_3D_EQUIDISTANT_OFFSET;
#endif
#endif // DUNE_XT_GRID_GRIDS_HH
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