Dune Core Modules (2.8.0)

Function space basis implementations

Implementations of the GlobalBasis concept. More...

Classes

class  Dune::Functions::BSplineLocalBasis< GV, R, MI >
 LocalBasis class in the sense of dune-localfunctions, presenting the restriction of a B-spline patch to a knot span. More...
 
class  Dune::Functions::BSplineLocalCoefficients< dim >
 Attaches a shape function to an entity. More...
 
class  Dune::Functions::BSplineLocalInterpolation< dim, LB >
 Local interpolation in the sense of dune-localfunctions, for the B-spline basis on tensor-product grids. More...
 
class  Dune::Functions::BSplineLocalFiniteElement< GV, R, MI >
 LocalFiniteElement in the sense of dune-localfunctions, for the B-spline basis on tensor-product grids. More...
 
class  Dune::Functions::BSplinePreBasis< GV, MI >
 Pre-basis for B-spline basis. More...
 
class  Dune::Functions::CompositePreBasis< MI, IMS, SPB >
 A pre-basis for composite bases. More...
 
class  Dune::Functions::HierarchicalLagrangePreBasis< GV, k, MI, R >
 A pre-basis for a hierarchical basis. More...
 
class  Dune::Functions::LagrangePreBasis< GV, k, MI, R >
 A pre-basis for a PQ-lagrange bases with given order. More...
 
class  Dune::Functions::RannacherTurekPreBasis< GV, MI >
 Pre-basis for a Rannacher-Turek basis. More...
 
class  Dune::Functions::TaylorHoodPreBasis< GV, MI, HI >
 Pre-basis for lowest order Taylor-Hood basis. More...
 
class  Dune::Functions::Experimental::TransformedIndexPreBasis< MI, RPB, T >
 A pre-basis transforming multi-indices. More...
 

Typedefs

template<typename GV >
using Dune::Functions::BSplineBasis = DefaultGlobalBasis< BSplinePreBasis< GV, FlatMultiIndex< std::size_t > > >
 A global B-spline basis. More...
 
template<typename GV , int k, typename R = double>
using Dune::Functions::HierarchicalLagrangeBasis = DefaultGlobalBasis< HierarchicalLagrangePreBasis< GV, k, FlatMultiIndex< std::size_t >, R > >
 Basis of a scalar Hierarchical Lagrange finite element space. More...
 
template<typename GV , int k = -1, typename R = double>
using Dune::Functions::LagrangeBasis = DefaultGlobalBasis< LagrangePreBasis< GV, k, FlatMultiIndex< std::size_t >, R > >
 Nodal basis of a scalar k-th-order Lagrangean finite element space. More...
 
template<typename GV , int k>
using Dune::Functions::LagrangeDGBasis = DefaultGlobalBasis< LagrangeDGPreBasis< GV, k, FlatMultiIndex< std::size_t > > >
 Basis of a scalar k-th-order Lagrangean-DG finite element space. More...
 
template<typename GV >
using Dune::Functions::RannacherTurekBasis = DefaultGlobalBasis< RannacherTurekPreBasis< GV, FlatMultiIndex< std::size_t > > >
 Rannacher-Turek basis. More...
 
template<typename GV >
using Dune::Functions::TaylorHoodBasis = DefaultGlobalBasis< TaylorHoodPreBasis< GV, Dune::ReservedVector< std::size_t, 2 > > >
 Nodal basis for a lowest order Taylor-Hood Lagrangean finite element space. More...
 

Functions

template<std::size_t k>
auto Dune::Functions::BasisFactory::brezziDouglasMarini ()
 Create a pre-basis factory that can create a Brezzi-Douglas-Marini pre-basis. More...
 
auto Dune::Functions::BasisFactory::bSpline (const std::vector< double > &knotVector, unsigned int order, bool makeOpen=true)
 Create a pre-basis factory that can create a B-spline pre-basis.
 
template<typename... Args, std::enable_if_t< Concept::isIndexMergingStrategy< typename LastType< Args... >::type >(), int > = 0>
auto Dune::Functions::BasisFactory::composite (Args &&... args)
 Create a factory builder that can build a CompositePreBasis. More...
 
template<std::size_t k, typename R = double>
auto Dune::Functions::BasisFactory::hierarchicalLagrange ()
 Create a pre-basis factory that can create a HierarchicalLagrange pre-basis. More...
 
template<std::size_t k, typename R = double>
auto Dune::Functions::BasisFactory::lagrange ()
 Create a pre-basis factory that can create a Lagrange pre-basis. More...
 
template<typename R = double>
auto Dune::Functions::BasisFactory::lagrange (int order)
 Create a pre-basis factory that can create a Lagrange pre-basis with a run-time order. More...
 
template<std::size_t k>
auto Dune::Functions::BasisFactory::lagrangeDG ()
 Create a pre-basis factory that can create a LagrangeDG pre-basis. More...
 
template<std::size_t kind, std::size_t order, typename Range = double>
auto Dune::Functions::BasisFactory::nedelec ()
 Create a pre-basis factory that can create a Nédélec pre-basis. More...
 
template<class RawPreBasisIndicator , class PIS >
auto Dune::Functions::BasisFactory::Experimental::periodic (RawPreBasisIndicator &&rawPreBasisIndicator, PIS &&periodicIndexSet)
 Create a pre-basis factory that can create a periodic pre-basis. More...
 
template<std::size_t k, class ChildPreBasisFactory , class IndexMergingStrategy >
auto Dune::Functions::BasisFactory::power (ChildPreBasisFactory &&childPreBasisFactory, const IndexMergingStrategy &ims)
 Create a pre-basis factory that can build a PowerPreBasis. More...
 
template<std::size_t k, class ChildPreBasisFactory >
auto Dune::Functions::BasisFactory::power (ChildPreBasisFactory &&childPreBasisFactory)
 Create a factory builder that can build a PowerPreBasis. More...
 
template<class Dummy = void>
auto Dune::Functions::BasisFactory::rannacherTurek ()
 Create a pre-basis factory that can create a Rannacher-Turek pre-basis.
 
template<std::size_t k>
auto Dune::Functions::BasisFactory::raviartThomas ()
 Create a pre-basis factory that can create a Raviart-Thomas pre-basis. More...
 
auto Dune::Functions::BasisFactory::taylorHood ()
 Create a pre-basis factory that can create a Taylor-Hood pre-basis.
 

Detailed Description

Implementations of the GlobalBasis concept.

Typedef Documentation

◆ BSplineBasis

template<typename GV >
using Dune::Functions::BSplineBasis = typedef DefaultGlobalBasis<BSplinePreBasis<GV, FlatMultiIndex<std::size_t> > >

A global B-spline basis.

Template Parameters
GVThe GridView that the space is defined on

◆ HierarchicalLagrangeBasis

template<typename GV , int k, typename R = double>
using Dune::Functions::HierarchicalLagrangeBasis = typedef DefaultGlobalBasis<HierarchicalLagrangePreBasis<GV, k, FlatMultiIndex<std::size_t>, R> >

Basis of a scalar Hierarchical Lagrange finite element space.

Template Parameters
GVThe GridView that the space is defined on
kThe order of the basis (limited to second order till now)
RThe range type of the local basis

– currently only supports simplex grids –

◆ LagrangeBasis

template<typename GV , int k = -1, typename R = double>
using Dune::Functions::LagrangeBasis = typedef DefaultGlobalBasis<LagrangePreBasis<GV, k, FlatMultiIndex<std::size_t>, R> >

Nodal basis of a scalar k-th-order Lagrangean finite element space.

Note
This only works for certain grids. The following restrictions hold
  • If k is no larger than 2, then the grids can have any dimension
  • If k is larger than 3 then the grid must be two-dimensional
  • If k is 3, then the grid can be 3d if it is a simplex grid

All arguments passed to the constructor will be forwarded to the constructor of LagrangePreBasis.

Warning
The implementation of the basis with run-time order order uses the LagrangeFiniteElement implementation of dune-localfunctions, which is known to violate strict-aliasing rules (see https://gitlab.dune-project.org/core/dune-localfunctions/issues/14) Keep this in mind if ever you experience difficult-to-explain crashes or wrong results.
Template Parameters
GVThe GridView that the space is defined on
kThe order of the basis; -1 means 'order determined at run-time'
RThe range type of the local basis

◆ LagrangeDGBasis

template<typename GV , int k>
using Dune::Functions::LagrangeDGBasis = typedef DefaultGlobalBasis<LagrangeDGPreBasis<GV, k, FlatMultiIndex<std::size_t> > >

Basis of a scalar k-th-order Lagrangean-DG finite element space.

Template Parameters
GVThe GridView that the space is defined on
kThe order of the basis

◆ RannacherTurekBasis

template<typename GV >
using Dune::Functions::RannacherTurekBasis = typedef DefaultGlobalBasis<RannacherTurekPreBasis<GV, FlatMultiIndex<std::size_t> > >

Rannacher-Turek basis.

These are Crouzeix-Raviart-elements for quadrilateral elements. See Rolf Rannacher and Stefan Turek. Simple nonconforming quadrilateral Stokes element. Numerical Methods for Partial Differential Equations, 8:97–111, 1992.

Template Parameters
GVThe GridView that the space is defined on

◆ TaylorHoodBasis

template<typename GV >
using Dune::Functions::TaylorHoodBasis = typedef DefaultGlobalBasis<TaylorHoodPreBasis<GV, Dune::ReservedVector<std::size_t, 2> > >

Nodal basis for a lowest order Taylor-Hood Lagrangean finite element space.

Template Parameters
GVThe GridView that the space is defined on.
Note
This mainly serves as an example, since you can construct a basis with the same functionality manually using
static const int k = 1;
auto taylorHoodBasis = makeBasis(
gridView,
power<dim>(
lagrange<k+1>(),
lagrange<k>()
));
auto composite(Args &&... args)
Create a factory builder that can build a CompositePreBasis.
Definition: compositebasis.hh:381
constexpr FlatInterleaved flatInterleaved()
Creates an interleaved merging of direct children without blocking.
Definition: basistags.hh:198

Function Documentation

◆ brezziDouglasMarini()

template<std::size_t k>
auto Dune::Functions::BasisFactory::brezziDouglasMarini ( )

Create a pre-basis factory that can create a Brezzi-Douglas-Marini pre-basis.

Template Parameters
kOrder of the Brezzi-Douglas-Marini element

◆ composite()

template<typename... Args, std::enable_if_t< Concept::isIndexMergingStrategy< typename LastType< Args... >::type >(), int > = 0>
auto Dune::Functions::BasisFactory::composite ( Args &&...  args)

Create a factory builder that can build a CompositePreBasis.

Template Parameters
ArgsTypes of child factory builders and IndexMergingStrategy type
Parameters
argsChild factory builder objects and an IndexMergingStrategy

This is the overload used if the last argument is an IndexMergingStrategy.

Template Parameters
ArgsTypes of child factory builders
Parameters
argsChild factory builder objects

This is the overload used if no IndexMergingStrategy is supplied. In this case the BasisFactory::BlockedLexicographic strategy is used.

References Dune::applyPartial().

◆ hierarchicalLagrange()

template<std::size_t k, typename R = double>
auto Dune::Functions::BasisFactory::hierarchicalLagrange ( )

Create a pre-basis factory that can create a HierarchicalLagrange pre-basis.

Template Parameters
kThe polynomial order of the ansatz functions (limited to second order till now)
RThe range type of the local basis

◆ lagrange() [1/2]

template<std::size_t k, typename R = double>
auto Dune::Functions::BasisFactory::lagrange ( )

Create a pre-basis factory that can create a Lagrange pre-basis.

Template Parameters
kThe polynomial order of the ansatz functions; -1 means 'order determined at run-time'
RThe range type of the local basis

◆ lagrange() [2/2]

template<typename R = double>
auto Dune::Functions::BasisFactory::lagrange ( int  order)

Create a pre-basis factory that can create a Lagrange pre-basis with a run-time order.

Template Parameters
RThe range type of the local basis

◆ lagrangeDG()

template<std::size_t k>
auto Dune::Functions::BasisFactory::lagrangeDG ( )

Create a pre-basis factory that can create a LagrangeDG pre-basis.

Template Parameters
kThe polynomial order of the ansatz functions

◆ nedelec()

template<std::size_t kind, std::size_t order, typename Range = double>
auto Dune::Functions::BasisFactory::nedelec ( )

Create a pre-basis factory that can create a Nédélec pre-basis.

Template Parameters
kindKind of the Nédélec element (1 or 2)
orderOrder of the Nédélec element (lowest order is '1')
RangeNumber type used for shape function values

◆ periodic()

template<class RawPreBasisIndicator , class PIS >
auto Dune::Functions::BasisFactory::Experimental::periodic ( RawPreBasisIndicator &&  rawPreBasisIndicator,
PIS &&  periodicIndexSet 
)

Create a pre-basis factory that can create a periodic pre-basis.

Parameters
rawPreBasisIndicatorObject encoding the raw non-periodic basis
periodicIndexSetA PeriodicIndexSet containing the indices to be identified

The rawPreBasisIndicator can either be a PreBasisFactory, a PreBasis, or a GlobalBasis. In the latter two cases the multi index type of those bases and the periodic basis to be constructed, has to coincide. Both arguments will be copied. Currently only wrapped bases with flat indices are supported.

Referenced by Dune::Torus< CollectiveCommunication, d >::is_neighbor(), Dune::YaspGrid< dim, Coordinates >::makelevel(), Dune::BackupRestoreFacility< Dune::YaspGrid< dim, Coordinates > >::restore(), Dune::BackupRestoreFacility< YaspGrid< dim, TensorProductCoordinates< ctype, dim > > >::restore(), and Dune::YaspGrid< dim, Coordinates >::YaspGrid().

◆ power() [1/2]

template<std::size_t k, class ChildPreBasisFactory >
auto Dune::Functions::BasisFactory::power ( ChildPreBasisFactory &&  childPreBasisFactory)

Create a factory builder that can build a PowerPreBasis.

Template Parameters
ChildPreBasisFactoryTypes of child pre-basis factory
Parameters
childPreBasisFactoryChild pre-basis factory

This overload will select the BasisFactory::BlockedInterleaved strategy.

◆ power() [2/2]

template<std::size_t k, class ChildPreBasisFactory , class IndexMergingStrategy >
auto Dune::Functions::BasisFactory::power ( ChildPreBasisFactory &&  childPreBasisFactory,
const IndexMergingStrategy ims 
)

Create a pre-basis factory that can build a PowerPreBasis.

Template Parameters
ChildPreBasisFactoryTypes of child pre-basis factory
IndexMergingStrategyAn IndexMergingStrategy type
Parameters
childPreBasisFactoryChild pre-basis factory
imsIndexMergingStrategy to be used

This overload can be used to explicitly supply an IndexMergingStrategy.

◆ raviartThomas()

template<std::size_t k>
auto Dune::Functions::BasisFactory::raviartThomas ( )

Create a pre-basis factory that can create a Raviart-Thomas pre-basis.

Template Parameters
kOrder of the Raviart-Thomas element
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)