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

Base class for piecewise continuous mappers. More...

#include <partitionedspace.hh>

Detailed Description

template<class Implementation, class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
class Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >

Base class for piecewise continuous mappers.

This class manages degrees of freedom for ansatz spaces that are piecewise continuous as given by a piece tag for each cell. To all entity-tag incidences with the same entity type there are the same number of global degrees of freedom associated. This means that on each cell there is the same number of global dofs, but on faces there can be nf or 2*nf dofs, on edges (in 3D) m*ne dofs with m>=1, and on vertices m*1 dofs with m>=1. On each cell live the same number of shape functions.

We call a degree of freedom associated to an incidence (e,t) of entity e of the grid and tag t

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
Implementationa policy class for specifying the actual shape function sets
Taggera policy class for providing tags of cells. Functions are supposed to be continuous on the subdomain given by a specific tag, but can be discontinuous across tag boundaries. The default is a single tag for all cells.ſ
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. The default is empty, i.e. no additional data.

Definition at line 234 of file partitionedspace.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
 Indexing information for localized ansatz functions. More...
 
typedef RangeView< GlobalIndexIterator > GlobalIndexRange
 
typedef RangeView< SortedIndexIterator > SortedIndexRange
 

Public Member Functions

 UniformPartitionedMapper (Implementation const &impl, Tagger const &tagger_)
 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 ansatz functions with support intersecting this cell. More...
 
GlobalIndexRange globalIndices (size_t n) const
 Returns an immutable sequence containing the global indices of the ansatz functions with support intersecting 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 scalar 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
 Returns a shape function set for a lower ansatz order (or an empty shape function set if there is no lower order). More...
 
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 Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
using Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::Cell = Kaskade::Cell<Grid>

Definition at line 238 of file partitionedspace.hh.

◆ Combiner

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
typedef Implementation::Combiner Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::Combiner

Definition at line 241 of file partitionedspace.hh.

◆ Converter

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
typedef Implementation::Converter Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::Converter

Definition at line 240 of file partitionedspace.hh.

◆ GlobalIndexRange

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
typedef RangeView<GlobalIndexIterator> Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::GlobalIndexRange

Definition at line 276 of file partitionedspace.hh.

◆ Grid

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
typedef Implementation::Grid Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::Grid

Definition at line 237 of file partitionedspace.hh.

◆ GridView

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
typedef Implementation::GridView Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::GridView

Definition at line 243 of file partitionedspace.hh.

◆ IndexPair

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
typedef std::pair<size_t,int> Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::IndexPair

Indexing information for localized ansatz functions.

Localized ansatz functions on a cell have global indices \( I \in {\bf N}^m \), compare the LocalToGlobalMapper concept. This index vector need not be sorted, in fact, as the extracted dofs are to be multiplied with the combiner matrix, their order matters. Consequently, there is a one-to-one mapping of cell-local indices (second component) and affected global indices (first component).

Definition at line 255 of file partitionedspace.hh.

◆ IndexSet

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
typedef GridView::IndexSet Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::IndexSet

Definition at line 244 of file partitionedspace.hh.

◆ Scalar

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
typedef Implementation::Scalar Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::Scalar

Definition at line 242 of file partitionedspace.hh.

◆ ShapeFunctionSet

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
typedef Implementation::ShapeFunctionSet Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::ShapeFunctionSet

Definition at line 239 of file partitionedspace.hh.

◆ SortedIndexRange

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
typedef RangeView<SortedIndexIterator> Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::SortedIndexRange

Definition at line 277 of file partitionedspace.hh.

Constructor & Destructor Documentation

◆ UniformPartitionedMapper()

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::UniformPartitionedMapper ( Implementation const &  impl,
Tagger const &  tagger_ 
)
inline

Constructor.

Parameters
impla policy object defining the actual shape function sets. It is copied to a member variable.
taggera policy object providing cell tags. It is copied to a member variable.

Definition at line 290 of file partitionedspace.hh.

Member Function Documentation

◆ combiner()

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
Combiner Kaskade::UniformPartitionedMapper< Implementation, Tagger, 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 444 of file partitionedspace.hh.

◆ globalIndices() [1/2]

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
GlobalIndexRange Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::globalIndices ( Cell const &  cell) const
inline

Returns an immutable sequence containing the global indices of the ansatz functions with support intersecting this cell.

Parameters
cellthe cell to inquire

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

Definition at line 334 of file partitionedspace.hh.

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

◆ globalIndices() [2/2]

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
GlobalIndexRange Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::globalIndices ( size_t  n) const
inline

Returns an immutable sequence containing the global indices of the ansatz functions with support intersecting this cell.

Parameters
nthe index of the cell in the grid view used.

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

Definition at line 348 of file partitionedspace.hh.

◆ gridView()

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
GridView const & Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::gridView ( ) const
inline

Returns the grid view used.

Definition at line 300 of file partitionedspace.hh.

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

◆ initGlobalIndexRange()

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
GlobalIndexRange Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::initGlobalIndexRange ( ) const
inline

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

Definition at line 318 of file partitionedspace.hh.

◆ initSortedIndexRange()

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
static SortedIndexRange Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::initSortedIndexRange ( )
inlinestatic

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

Definition at line 357 of file partitionedspace.hh.

◆ lowerShapeFunctions()

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
ShapeFunctionSet const & Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::lowerShapeFunctions ( Cell const &  cell) const
inline

Returns a shape function set for a lower ansatz order (or an empty shape function set if there is no lower order).

Definition at line 431 of file partitionedspace.hh.

◆ maxOrder()

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
int Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::maxOrder ( ) const
inline

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

Definition at line 308 of file partitionedspace.hh.

◆ shapefunctions() [1/2]

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
ShapeFunctionSet const & Kaskade::UniformPartitionedMapper< Implementation, Tagger, 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 399 of file partitionedspace.hh.

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

◆ shapefunctions() [2/2]

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
ShapeFunctionSet const & Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::shapefunctions ( size_t  n) const
inline

Returns the set of shape functions defined on this cell.

Definition at line 416 of file partitionedspace.hh.

◆ shapefunctions_non_const() [1/2]

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
ShapeFunctionSet & Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::shapefunctions_non_const ( Cell const &  cell)
inline

◆ shapefunctions_non_const() [2/2]

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
ShapeFunctionSet & Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::shapefunctions_non_const ( size_t  n)
inline

Definition at line 422 of file partitionedspace.hh.

◆ size()

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
size_t Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::size ( ) const
inline

Returns the number of global scalar degrees of freedom managed.

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

Definition at line 388 of file partitionedspace.hh.

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

◆ sortedIndices() [1/2]

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
SortedIndexRange Kaskade::UniformPartitionedMapper< Implementation, Tagger, 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 367 of file partitionedspace.hh.

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

◆ sortedIndices() [2/2]

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
SortedIndexRange Kaskade::UniformPartitionedMapper< Implementation, Tagger, 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 376 of file partitionedspace.hh.

◆ unrestrictedToRestrictedIndex()

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
std::pair< bool, size_t > Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::unrestrictedToRestrictedIndex ( size_t  unrestrictedIndex)
inline

Definition at line 453 of file partitionedspace.hh.

◆ update()

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
void Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::update ( )
inline

(Re)computes the internal data.

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

Definition at line 463 of file partitionedspace.hh.

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

Member Data Documentation

◆ globalSupport

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
bool const Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::globalSupport = false
static

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

Definition at line 282 of file partitionedspace.hh.

◆ implementation

template<class Implementation , class Tagger = PartitionedSpaceDetail::SingleTagger, class SFData = PartitionedSpaceDetail::Empty>
Implementation Kaskade::UniformPartitionedMapper< Implementation, Tagger, SFData >::implementation
protected

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