26#ifndef DUMUX_DISCRETIZATION_FUNCTION_SPACE_BASIS_HH
27#define DUMUX_DISCRETIZATION_FUNCTION_SPACE_BASIS_HH
29#if HAVE_DUNE_FUNCTIONS
32#include <dune/functions/functionspacebases/lagrangebasis.hh>
43template<
class Gr
idGeometry,
class DiscretizationMethod =
typename Gr
idGeometry::DiscretizationMethod >
44struct FunctionSpaceBasisTraits;
51template<
class Gr
idGeometry, std::enable_if_t<Gr
idGeometry::discMethod != DiscretizationMethods::fem,
int> = 0>
52typename FunctionSpaceBasisTraits<GridGeometry>::GlobalBasis
53getFunctionSpaceBasis(
const GridGeometry& gridGeometry)
54{
return {gridGeometry.gridView()}; }
60template<
class Gr
idGeometry, std::enable_if_t<Gr
idGeometry::discMethod == DiscretizationMethods::fem,
int> = 0>
61const typename FunctionSpaceBasisTraits<GridGeometry>::GlobalBasis&
62getFunctionSpaceBasis(
const GridGeometry& gridGeometry)
63{
return gridGeometry.feBasis(); }
71template<
class Gr
idGeometry >
72struct FunctionSpaceBasisTraits<GridGeometry, DiscretizationMethods::Box>
73{
using GlobalBasis = Dune::Functions::LagrangeBasis<
typename GridGeometry::GridView, 1>; };
76template<
class Gr
idGeometry >
77struct FunctionSpaceBasisTraits<GridGeometry, DiscretizationMethods::CCTpfa>
78{
using GlobalBasis = Dune::Functions::LagrangeBasis<
typename GridGeometry::GridView, 0>; };
81template<
class Gr
idGeometry >
82struct FunctionSpaceBasisTraits<GridGeometry, DiscretizationMethods::CCMpfa>
83{
using GlobalBasis = Dune::Functions::LagrangeBasis<
typename GridGeometry::GridView, 0>; };
86template<
class Gr
idGeometry >
87struct FunctionSpaceBasisTraits<GridGeometry, DiscretizationMethods::FEM>
88{
using GlobalBasis =
typename GridGeometry::FEBasis; };
The available discretization methods in Dumux.