14#ifndef DUMUX_DISCRETIZATION_FUNCTION_SPACE_BASIS_HH
15#define DUMUX_DISCRETIZATION_FUNCTION_SPACE_BASIS_HH
17#if HAVE_DUNE_FUNCTIONS
20#include <dune/functions/functionspacebases/lagrangebasis.hh>
31template<
class Gr
idGeometry,
class DiscretizationMethod =
typename Gr
idGeometry::DiscretizationMethod >
32struct FunctionSpaceBasisTraits;
39template<
class Gr
idGeometry, std::enable_if_t<Gr
idGeometry::discMethod != DiscretizationMethods::fem,
int> = 0>
40typename FunctionSpaceBasisTraits<GridGeometry>::GlobalBasis
41getFunctionSpaceBasis(
const GridGeometry& gridGeometry)
42{
return {gridGeometry.gridView()}; }
48template<
class Gr
idGeometry, std::enable_if_t<Gr
idGeometry::discMethod == DiscretizationMethods::fem,
int> = 0>
49const typename FunctionSpaceBasisTraits<GridGeometry>::GlobalBasis&
50getFunctionSpaceBasis(
const GridGeometry& gridGeometry)
51{
return gridGeometry.feBasis(); }
59template<
class Gr
idGeometry >
60struct FunctionSpaceBasisTraits<GridGeometry, DiscretizationMethods::
Box>
61{
using GlobalBasis = Dune::Functions::LagrangeBasis<
typename GridGeometry::GridView, 1>; };
64template<
class Gr
idGeometry >
65struct FunctionSpaceBasisTraits<GridGeometry, DiscretizationMethods::CCTpfa>
66{
using GlobalBasis = Dune::Functions::LagrangeBasis<
typename GridGeometry::GridView, 0>; };
69template<
class Gr
idGeometry >
70struct FunctionSpaceBasisTraits<GridGeometry, DiscretizationMethods::CCMpfa>
71{
using GlobalBasis = Dune::Functions::LagrangeBasis<
typename GridGeometry::GridView, 0>; };
74template<
class Gr
idGeometry >
75struct FunctionSpaceBasisTraits<GridGeometry, DiscretizationMethods::FEM>
76{
using GlobalBasis =
typename GridGeometry::FEBasis; };
The available discretization methods in Dumux.
CVFE< CVFEMethods::PQ1 > Box
Definition: method.hh:94