KASKADE 7 development version
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
Kaskade::UniformScalarMapper< Implementation, SFData > Class Template Reference

Base class for uniform scalar local to global mappers. More...

#include <scalarspace.hh>

Detailed Description

template<class Implementation, class SFData = ScalarSpaceDetail::Empty>
class Kaskade::UniformScalarMapper< Implementation, SFData >

Base class for uniform scalar local to global mappers.

It manages degrees of freedom for ansatz spaces where to each type of entity of the grid the same number of global degrees of freedom is associated and on each cell live the same number of shape functions.

We call a degree of freedom associated to an entity e of the grid

With each shape function on each cell, we associate its global degree of freedom and additional data the type of is specified as template parameter SFData.

Template Parameters
Implementation
SFDatatype of (optional) additional data associated to global degrees of freedom. This is used, e.g., for associating a sign to shape functions in hiearchic spaces.

Definition at line 204 of file scalarspace.hh.

Public Types

typedef Implementation::Grid Grid
 
using Cell = Kaskade::Cell< Grid >
 
typedef Implementation::ShapeFunctionSet ShapeFunctionSet
 
typedef Implementation::Converter Converter
 
typedef Implementation::Combiner Combiner
 
typedef Implementation::Scalar Scalar
 
typedef Implementation::GridView GridView
 
typedef GridView::IndexSet IndexSet
 
typedef std::pair< size_t, int > IndexPair
 
typedef RangeView< GlobalIndexIterator > GlobalIndexRange
 
typedef RangeView< SortedIndexIterator > SortedIndexRange
 

Public Member Functions

 UniformScalarMapper (Implementation const &impl)
 
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...
 
ShapeFunctionSetshapefunctions_non_const (Cell const &cell)
 
ShapeFunctionSet const & shapefunctions (size_t n) const
 Returns the set of shape functions defined on this cell. More...
 
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 bool const globalSupport = false
 Whether the ansatz functions have global support (i.e. lead to dense matrices). More...
 

Protected Attributes

Implementation implementation
 

Member Typedef Documentation

◆ Cell

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
using Kaskade::UniformScalarMapper< Implementation, SFData >::Cell = Kaskade::Cell<Grid>

Definition at line 208 of file scalarspace.hh.

◆ Combiner

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
typedef Implementation::Combiner Kaskade::UniformScalarMapper< Implementation, SFData >::Combiner

Definition at line 211 of file scalarspace.hh.

◆ Converter

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
typedef Implementation::Converter Kaskade::UniformScalarMapper< Implementation, SFData >::Converter

Definition at line 210 of file scalarspace.hh.

◆ GlobalIndexRange

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
typedef RangeView<GlobalIndexIterator> Kaskade::UniformScalarMapper< Implementation, SFData >::GlobalIndexRange

Definition at line 228 of file scalarspace.hh.

◆ Grid

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
typedef Implementation::Grid Kaskade::UniformScalarMapper< Implementation, SFData >::Grid

Definition at line 207 of file scalarspace.hh.

◆ GridView

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
typedef Implementation::GridView Kaskade::UniformScalarMapper< Implementation, SFData >::GridView

Definition at line 213 of file scalarspace.hh.

◆ IndexPair

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
typedef std::pair<size_t,int> Kaskade::UniformScalarMapper< Implementation, SFData >::IndexPair

Definition at line 215 of file scalarspace.hh.

◆ IndexSet

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
typedef GridView::IndexSet Kaskade::UniformScalarMapper< Implementation, SFData >::IndexSet

Definition at line 214 of file scalarspace.hh.

◆ Scalar

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
typedef Implementation::Scalar Kaskade::UniformScalarMapper< Implementation, SFData >::Scalar

Definition at line 212 of file scalarspace.hh.

◆ ShapeFunctionSet

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
typedef Implementation::ShapeFunctionSet Kaskade::UniformScalarMapper< Implementation, SFData >::ShapeFunctionSet

Definition at line 209 of file scalarspace.hh.

◆ SortedIndexRange

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
typedef RangeView<SortedIndexIterator> Kaskade::UniformScalarMapper< Implementation, SFData >::SortedIndexRange

Definition at line 229 of file scalarspace.hh.

Constructor & Destructor Documentation

◆ UniformScalarMapper()

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
Kaskade::UniformScalarMapper< Implementation, SFData >::UniformScalarMapper ( Implementation const &  impl)
inline

Definition at line 236 of file scalarspace.hh.

Member Function Documentation

◆ combiner()

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
Combiner Kaskade::UniformScalarMapper< Implementation, SFData >::combiner ( Cell const &  cell,
size_t  index 
) const
inline

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]

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
GlobalIndexRange Kaskade::UniformScalarMapper< Implementation, SFData >::globalIndices ( Cell const &  cell) const
inline

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.

Referenced by Kaskade::UniformScalarMapper< Implementation, SFData >::globalIndices(), and Kaskade::UniformScalarMapper< Implementation, SFData >::lowerShapeFunctions().

◆ globalIndices() [2/2]

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
GlobalIndexRange Kaskade::UniformScalarMapper< Implementation, SFData >::globalIndices ( size_t  n) const
inline

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()

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
GridView const & Kaskade::UniformScalarMapper< Implementation, SFData >::gridView ( ) const
inline

Returns the grid view used.

Definition at line 244 of file scalarspace.hh.

Referenced by Kaskade::UniformScalarMapper< Implementation, SFData >::update().

◆ initGlobalIndexRange()

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
GlobalIndexRange Kaskade::UniformScalarMapper< Implementation, SFData >::initGlobalIndexRange ( ) const
inline

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

Definition at line 261 of file scalarspace.hh.

◆ initSortedIndexRange()

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
static SortedIndexRange Kaskade::UniformScalarMapper< Implementation, SFData >::initSortedIndexRange ( )
inlinestatic

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

Definition at line 294 of file scalarspace.hh.

◆ lowerShapeFunctions()

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
ShapeFunctionSet const & Kaskade::UniformScalarMapper< Implementation, SFData >::lowerShapeFunctions ( Cell const &  cell) const
inline

Definition at line 357 of file scalarspace.hh.

◆ maxOrder()

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
int Kaskade::UniformScalarMapper< Implementation, SFData >::maxOrder ( ) const
inline

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

Definition at line 252 of file scalarspace.hh.

◆ shapefunctions() [1/2]

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
ShapeFunctionSet const & Kaskade::UniformScalarMapper< Implementation, SFData >::shapefunctions ( Cell const &  cell,
bool  contained = false 
) const
inline

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.

Referenced by Kaskade::UniformScalarMapper< Implementation, SFData >::combiner(), and Kaskade::UniformScalarMapper< Implementation, SFData >::shapefunctions().

◆ shapefunctions() [2/2]

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
ShapeFunctionSet const & Kaskade::UniformScalarMapper< Implementation, SFData >::shapefunctions ( size_t  n) const
inline

Returns the set of shape functions defined on this cell.

Definition at line 347 of file scalarspace.hh.

◆ shapefunctions_non_const() [1/2]

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
ShapeFunctionSet & Kaskade::UniformScalarMapper< Implementation, SFData >::shapefunctions_non_const ( Cell const &  cell)
inline

◆ shapefunctions_non_const() [2/2]

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
ShapeFunctionSet & Kaskade::UniformScalarMapper< Implementation, SFData >::shapefunctions_non_const ( size_t  n)
inline

Definition at line 352 of file scalarspace.hh.

◆ size()

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
size_t Kaskade::UniformScalarMapper< Implementation, SFData >::size ( ) const
inline

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.

Referenced by Kaskade::UniformScalarMapper< Implementation, SFData >::update().

◆ sortedIndices() [1/2]

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
SortedIndexRange Kaskade::UniformScalarMapper< Implementation, SFData >::sortedIndices ( Cell const &  cell) const
inline

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

Definition at line 303 of file scalarspace.hh.

Referenced by Kaskade::UniformScalarMapper< Implementation, SFData >::sortedIndices().

◆ sortedIndices() [2/2]

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
SortedIndexRange Kaskade::UniformScalarMapper< Implementation, SFData >::sortedIndices ( size_t  n) const
inline

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()

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
std::pair< bool, size_t > Kaskade::UniformScalarMapper< Implementation, SFData >::unrestrictedToRestrictedIndex ( size_t  unrestrictedIndex)
inline

◆ update()

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
void Kaskade::UniformScalarMapper< Implementation, SFData >::update ( )
inline

(Re)computes the internal data.

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

Definition at line 389 of file scalarspace.hh.

Referenced by Kaskade::UniformScalarMapper< Implementation, SFData >::UniformScalarMapper().

Member Data Documentation

◆ globalSupport

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
bool const Kaskade::UniformScalarMapper< Implementation, SFData >::globalSupport = false
static

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

Definition at line 234 of file scalarspace.hh.

◆ implementation

template<class Implementation , class SFData = ScalarSpaceDetail::Empty>
Implementation Kaskade::UniformScalarMapper< Implementation, SFData >::implementation
protected

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