KASKADE 7 development version
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
Kaskade::ContinuousLagrangeMapperSubdomain< GV, SupportOracle, ScalarType > Class Template Reference

A local-to-global mapper for continuous finite elements on a subdomain. More...

#include <lagrangespace.hh>

Detailed Description

template<class GV, class SupportOracle, class ScalarType = double>
class Kaskade::ContinuousLagrangeMapperSubdomain< GV, SupportOracle, ScalarType >

A local-to-global mapper for continuous finite elements on a subdomain.

Template Parameters
GVthe grid view on which the space is defined
SupportOraclea callable that for each cell specifies whether it is contained in the subdomain (maximal support of the functions) or not
ScalarType

Using this mapper is tricky, since the support oracle is usually defined as a lambda function, the type of which has to be provided as a template parameter. Here, class template deduction as of C++ 17 helps:

gridManager.grid().leafGridView(),order,
[](auto& cell) { return cell.geometry().center()[0]>0; }));
ContinuousLagrangeMapperSubdomain(GridView const &gridView, int order, SupportOracle &&supportOracle)
Constructor.
A representation of a finite element function space defined over a domain covered by a grid.

Definition at line 674 of file lagrangespace.hh.

Inheritance diagram for Kaskade::ContinuousLagrangeMapperSubdomain< GV, SupportOracle, ScalarType >:
Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > >

Classes

struct  Element
 

Public Types

typedef ScalarType Scalar
 
typedef GV GridView
 
typedef Base::ShapeFunctionSet ShapeFunctionSet
 
typedef int ConstructorArgument
 
template<int m>
using Element_t = FunctionSpaceElement< FEFunctionSpace< ContinuousLagrangeMapperSubdomain >, m >
 Type of the FunctionSpaceElement, associated to the FEFunctionSpace. More...
 
typedef Implementation::Grid Grid
 
using Cell = Kaskade::Cell< Grid >
 
typedef Implementation::Converter Converter
 
typedef Implementation::Combiner Combiner
 
typedef GridView::IndexSet IndexSet
 
typedef std::pair< size_t, int > IndexPair
 
typedef RangeView< GlobalIndexIterator > GlobalIndexRange
 
typedef RangeView< SortedIndexIterator > SortedIndexRange
 

Public Member Functions

 ContinuousLagrangeMapperSubdomain (GridView const &gridView, int order, SupportOracle &&supportOracle)
 Constructor. More...
 
GridView const & gridView () const
 Returns the grid view used. More...
 
int maxOrder () const
 Returns the maximal polynomial order of shape functions encountered in any cell. More...
 
GlobalIndexRange initGlobalIndexRange () const
 Returns an empty range just for initialization purposes, since RangeView is not default constructible. More...
 
GlobalIndexRange globalIndices (Cell const &cell) const
 Returns an immutable sequence containing the global indices of the shape functions associated to this cell. More...
 
GlobalIndexRange globalIndices (size_t n) const
 Returns an immutable sequence containing the global indices of the shape functions associated to this cell. More...
 
SortedIndexRange sortedIndices (Cell const &cell) const
 Returns an immutable sequence of (global index, local index) pairs sorted in ascending global index order. More...
 
SortedIndexRange sortedIndices (size_t n) const
 Returns an immutable sequence of (global index, local index) pairs sorted in ascending global index order. More...
 
size_t size () const
 Returns the number of global degrees of freedom managed. More...
 
ShapeFunctionSet const & shapefunctions (Cell const &cell, bool contained=false) const
 Returns the set of shape functions defined on this cell. More...
 
ShapeFunctionSet const & shapefunctions (size_t n) const
 Returns the set of shape functions defined on this cell. More...
 
ShapeFunctionSetshapefunctions_non_const (Cell const &cell)
 
ShapeFunctionSetshapefunctions_non_const (size_t n)
 
ShapeFunctionSet const & lowerShapeFunctions (Cell const &cell) const
 
Combiner combiner (Cell const &cell, size_t index) const
 Returns a combiner for the given leaf cell. More...
 
std::pair< bool, size_t > unrestrictedToRestrictedIndex (size_t unrestrictedIndex)
 
void update ()
 (Re)computes the internal data. More...
 

Static Public Member Functions

static SortedIndexRange initSortedIndexRange ()
 Returns an empty range just for initialization, since RangeView is not default constructible. More...
 

Static Public Attributes

static int const continuity = -1
 Continuity of the functions in this space. If the support is restricted to a proper subdomain, the functions are discontinuous across the inner boundary - hence the low continuity even though inside the subdomain the functions are \( C^0 \). More...
 
static bool const globalSupport
 Whether the ansatz functions have global support (i.e. lead to dense matrices). More...
 

Protected Attributes

ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > implementation
 

Member Typedef Documentation

◆ Cell

Definition at line 208 of file scalarspace.hh.

◆ Combiner

typedef Implementation::Combiner Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::Combiner
inherited

Definition at line 211 of file scalarspace.hh.

◆ ConstructorArgument

template<class GV , class SupportOracle , class ScalarType = double>
typedef int Kaskade::ContinuousLagrangeMapperSubdomain< GV, SupportOracle, ScalarType >::ConstructorArgument

Definition at line 684 of file lagrangespace.hh.

◆ Converter

Definition at line 210 of file scalarspace.hh.

◆ GlobalIndexRange

typedef RangeView<GlobalIndexIterator> Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::GlobalIndexRange
inherited

Definition at line 228 of file scalarspace.hh.

◆ Grid

Definition at line 207 of file scalarspace.hh.

◆ GridView

template<class GV , class SupportOracle , class ScalarType = double>
typedef GV Kaskade::ContinuousLagrangeMapperSubdomain< GV, SupportOracle, ScalarType >::GridView

Definition at line 682 of file lagrangespace.hh.

◆ IndexPair

typedef std::pair<size_t,int> Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::IndexPair
inherited

Definition at line 215 of file scalarspace.hh.

◆ IndexSet

typedef GridView::IndexSet Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::IndexSet
inherited

Definition at line 214 of file scalarspace.hh.

◆ Scalar

template<class GV , class SupportOracle , class ScalarType = double>
typedef ScalarType Kaskade::ContinuousLagrangeMapperSubdomain< GV, SupportOracle, ScalarType >::Scalar

Definition at line 681 of file lagrangespace.hh.

◆ ShapeFunctionSet

template<class GV , class SupportOracle , class ScalarType = double>
typedef Base::ShapeFunctionSet Kaskade::ContinuousLagrangeMapperSubdomain< GV, SupportOracle, ScalarType >::ShapeFunctionSet

Definition at line 683 of file lagrangespace.hh.

◆ SortedIndexRange

typedef RangeView<SortedIndexIterator> Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::SortedIndexRange
inherited

Definition at line 229 of file scalarspace.hh.

Constructor & Destructor Documentation

◆ ContinuousLagrangeMapperSubdomain()

template<class GV , class SupportOracle , class ScalarType = double>
Kaskade::ContinuousLagrangeMapperSubdomain< GV, SupportOracle, ScalarType >::ContinuousLagrangeMapperSubdomain ( GridView const &  gridView,
int  order,
SupportOracle &&  supportOracle 
)
inline

Constructor.

Parameters
gridViewthe grid view on which to define the space, usually a leaf grid view
orderpolynomial ansatz order of shape functions (> 0)
supportOraclea callable that for any cell

Definition at line 715 of file lagrangespace.hh.

Member Function Documentation

◆ combiner()

Combiner Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::combiner ( Cell const &  cell,
size_t  index 
) const
inlineinherited

Returns a combiner for the given leaf cell.

Parameters
cellthe grid cell for which the combiner is requested
indexthe index of the cell

Definition at line 370 of file scalarspace.hh.

◆ globalIndices() [1/2]

GlobalIndexRange Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::globalIndices ( Cell const &  cell) const
inlineinherited

Returns an immutable sequence containing the global indices of the shape functions associated to this cell.

Global indices start at 0 and are consecutive - in the range returned here, an unordered subset is contained.

Definition at line 274 of file scalarspace.hh.

◆ globalIndices() [2/2]

GlobalIndexRange Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::globalIndices ( size_t  n) const
inlineinherited

Returns an immutable sequence containing the global indices of the shape functions associated to this cell.

Global indices start at 0 and are consecutive - in the range returned here, an unordered subset is contained.

Definition at line 285 of file scalarspace.hh.

◆ gridView()

GridView const & Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::gridView ( ) const
inlineinherited

Returns the grid view used.

Definition at line 244 of file scalarspace.hh.

◆ initGlobalIndexRange()

GlobalIndexRange Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::initGlobalIndexRange ( ) const
inlineinherited

Returns an empty range just for initialization purposes, since RangeView is not default constructible.

Definition at line 261 of file scalarspace.hh.

◆ initSortedIndexRange()

static SortedIndexRange Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::initSortedIndexRange ( )
inlinestaticinherited

Returns an empty range just for initialization, since RangeView is not default constructible.

Definition at line 294 of file scalarspace.hh.

◆ lowerShapeFunctions()

ShapeFunctionSet const & Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::lowerShapeFunctions ( Cell const &  cell) const
inlineinherited

Definition at line 357 of file scalarspace.hh.

◆ maxOrder()

int Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::maxOrder ( ) const
inlineinherited

Returns the maximal polynomial order of shape functions encountered in any cell.

Definition at line 252 of file scalarspace.hh.

◆ shapefunctions() [1/2]

ShapeFunctionSet const & Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::shapefunctions ( Cell const &  cell,
bool  contained = false 
) const
inlineinherited

Returns the set of shape functions defined on this cell.

Parameters
cellthe codim 0 entity of the grid for wich the shape functions are to be retrieved
containedif true, the method may assume that the cell is contained in the index set of the space. (The other case occurs during interpolation between different grids).

Definition at line 331 of file scalarspace.hh.

◆ shapefunctions() [2/2]

ShapeFunctionSet const & Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::shapefunctions ( size_t  n) const
inlineinherited

Returns the set of shape functions defined on this cell.

Definition at line 347 of file scalarspace.hh.

◆ shapefunctions_non_const() [1/2]

ShapeFunctionSet & Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::shapefunctions_non_const ( Cell const &  cell)
inlineinherited

Definition at line 339 of file scalarspace.hh.

◆ shapefunctions_non_const() [2/2]

ShapeFunctionSet & Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::shapefunctions_non_const ( size_t  n)
inlineinherited

Definition at line 352 of file scalarspace.hh.

◆ size()

size_t Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::size ( ) const
inlineinherited

Returns the number of global degrees of freedom managed.

Note that this does not correspond directly to the number of coefficients in a FE function (if the FE function has more than one component).

Definition at line 323 of file scalarspace.hh.

◆ sortedIndices() [1/2]

SortedIndexRange Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::sortedIndices ( Cell const &  cell) const
inlineinherited

Returns an immutable sequence of (global index, local index) pairs sorted in ascending global index order.

Definition at line 303 of file scalarspace.hh.

◆ sortedIndices() [2/2]

SortedIndexRange Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::sortedIndices ( size_t  n) const
inlineinherited

Returns an immutable sequence of (global index, local index) pairs sorted in ascending global index order.

Definition at line 311 of file scalarspace.hh.

◆ unrestrictedToRestrictedIndex()

std::pair< bool, size_t > Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::unrestrictedToRestrictedIndex ( size_t  unrestrictedIndex)
inlineinherited

Definition at line 379 of file scalarspace.hh.

◆ update()

void Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::update ( )
inlineinherited

(Re)computes the internal data.

This has to be called after grid modifications and on construction.

Definition at line 389 of file scalarspace.hh.

Member Data Documentation

◆ continuity

template<class GV , class SupportOracle , class ScalarType = double>
int const Kaskade::ContinuousLagrangeMapperSubdomain< GV, SupportOracle, ScalarType >::continuity = -1
static

Continuity of the functions in this space. If the support is restricted to a proper subdomain, the functions are discontinuous across the inner boundary - hence the low continuity even though inside the subdomain the functions are \( C^0 \).

Definition at line 692 of file lagrangespace.hh.

◆ globalSupport

bool const Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::globalSupport
staticinherited

Whether the ansatz functions have global support (i.e. lead to dense matrices).

Definition at line 234 of file scalarspace.hh.

◆ implementation

ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > Kaskade::UniformScalarMapper< ContinuousLagrangeMapperSubdomainImplementation< GV, SupportOracle, double > , ScalarSpaceDetail::Empty >::implementation
protectedinherited

Definition at line 528 of file scalarspace.hh.


The documentation for this class was generated from the following file: