dune-pdelab 2.7-git
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag > Class Template Reference

base class for tuples of grid function spaces product of identical grid function spaces base class that holds implementation of the methods More...

#include <dune/pdelab/gridfunctionspace/powergridfunctionspace.hh>

Inheritance diagram for Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >:
Inheritance graph

Classes

struct  ConstraintsContainer
 extract type for storing constraints More...
 

Public Types

typedef PowerGridFunctionSpaceTag ImplementationTag
 
typedef TypeTree::PowerNode< T, k > BaseT
 
typedef ordering_transformation::Type Ordering
 
typedef ImplementationBase::Traits Traits
 export traits class
 
typedef O OrderingTag
 
typedef std::size_t size_type
 

Public Member Functions

 PowerGridFunctionSpace (const std::array< std::shared_ptr< T >, k > &container, const Backend &backend=Backend(), const OrderingTag ordering_tag=OrderingTag())
 Construct a new Power Grid Function Space object.
 
 PowerGridFunctionSpace (T &c, const Backend &backend=Backend(), const OrderingTag ordering_tag=OrderingTag())
 
 PowerGridFunctionSpace (T &c0, T &c1, const Backend &backend=Backend(), const OrderingTag ordering_tag=OrderingTag())
 
 PowerGridFunctionSpace (T &c0, T &c1, T &c2, const Backend &backend=Backend(), const OrderingTag ordering_tag=OrderingTag())
 
 PowerGridFunctionSpace (T &c0, T &c1, T &c2, T &c3, const Backend &backend=Backend(), const OrderingTag ordering_tag=OrderingTag())
 
 PowerGridFunctionSpace (T &c0, T &c1, T &c2, T &c3, T &c4, const Backend &backend=Backend(), const OrderingTag ordering_tag=OrderingTag())
 
 PowerGridFunctionSpace (T &c0, T &c1, T &c2, T &c3, T &c4, T &c5, const Backend &backend=Backend(), const OrderingTag ordering_tag=OrderingTag())
 
 PowerGridFunctionSpace (T &c0, T &c1, T &c2, T &c3, T &c4, T &c5, T &c6, const Backend &backend=Backend(), const OrderingTag ordering_tag=OrderingTag())
 
 PowerGridFunctionSpace (T &c0, T &c1, T &c2, T &c3, T &c4, T &c5, T &c6, T &c7, const Backend &backend=Backend(), const OrderingTag ordering_tag=OrderingTag())
 
 PowerGridFunctionSpace (T &c0, T &c1, T &c2, T &c3, T &c4, T &c5, T &c6, T &c7, T &c8, const Backend &backend=Backend(), const OrderingTag ordering_tag=OrderingTag())
 
 PowerGridFunctionSpace (T &c0, T &c1, T &c2, T &c3, T &c4, T &c5, T &c6, T &c7, T &c8, T &c9, const Backend &backend=Backend(), const OrderingTag ordering_tag=OrderingTag())
 
template<typename Child0 , typename... Children>
 PowerGridFunctionSpace (std::shared_ptr< Child0 > child0, std::shared_ptr< Children >... children)
 
const Orderingordering () const
 Direct access to the DOF ordering.
 
Orderingordering ()
 Direct access to the DOF ordering.
 
std::shared_ptr< const OrderingorderingStorage () const
 Direct access to the storage of the DOF ordering.
 
std::shared_ptr< OrderingorderingStorage ()
 Direct access to the storage of the DOF ordering.
 
const Traits::GridView & gridView () const
 get grid view
 
const Traits::EntitySet & entitySet () const
 get grid view partition
 
Traits::SizeType size () const
 
Traits::SizeType blockCount () const
 
Traits::SizeType globalSize () const
 
Traits::SizeType maxLocalSize () const
 get max dimension of shape function space
 
void update (bool force=false)
 Update the indexing information of the GridFunctionSpace.
 
const std::string & name () const
 
void name (const std::string &name)
 
Traits::Backendbackend ()
 
const Traits::Backendbackend () const
 
Traits::OrderingTagorderingTag ()
 
const Traits::OrderingTagorderingTag () const
 
bool isRootSpace () const
 
bool dataHandleContains (int codim) const
 returns true if data for this codim should be communicated
 
bool dataHandleFixedSize (int codim) const
 returns true if size per entity of given dim and codim is a constant
 
constexpr bool sendLeafSizes () const
 Returns true if the sizes of the leaf orderings in this tree should be sent as part of the communcation.
 
template<typename Entity >
size_type dataHandleSize (const Entity &e) const
 
template<typename V , typename EntityIndex >
void setup_dof_indices (V &v, size_type n, const EntityIndex &ei, std::integral_constant< bool, true >) const
 
template<typename V , typename EntityIndex >
void setup_dof_indices (V &v, size_type n, const EntityIndex &ei, std::integral_constant< bool, false >) const
 
template<typename V >
V::iterator dof_indices_begin (V &v, std::integral_constant< bool, true >) const
 
template<typename V >
DummyDOFIndexIterator dof_indices_begin (V &v, std::integral_constant< bool, false >) const
 
template<typename Entity , typename ContainerIndex , typename DOFIndex , typename OffsetIterator , bool map_dof_indices>
void dataHandleIndices (const Entity &e, std::vector< ContainerIndex > &container_indices, std::vector< DOFIndex > &dof_indices, OffsetIterator oit, std::integral_constant< bool, map_dof_indices > map_dof_indices_value) const
 return vector of global indices associated with the given entity
 

Protected Member Functions

void update (Ordering &ordering) const
 
const GFS & gfs () const
 

Detailed Description

template<typename T, std::size_t k, typename Backend, typename OrderingTag = LexicographicOrderingTag>
class Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >

base class for tuples of grid function spaces product of identical grid function spaces base class that holds implementation of the methods

PGFS(T,k) = {T}^k

Template Parameters
Tthe underlying are all grid function spaces
kpower factor
Mapperis the ordering parameter. Use e.g. GridFunctionSpaceLexicographicMapper or GridFunctionSpaceComponentBlockwiseMapper or GridFunctionSpaceBlockwiseMapper or GridFunctionSpaceDynamicBlockwiseMapper
Examples
recipe-blocking.cc, and recipe-operator-splitting.cc.

Member Typedef Documentation

◆ BaseT

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
typedef TypeTree::PowerNode<T,k> Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::BaseT

◆ ImplementationTag

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
typedef PowerGridFunctionSpaceTag Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::ImplementationTag

◆ Ordering

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
typedef ordering_transformation::Type Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::Ordering

◆ size_type

template<typename GFS >
typedef std::size_t Dune::PDELab::DataHandleProvider< GFS >::size_type
inherited

◆ Traits

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
typedef ImplementationBase::Traits Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::Traits

export traits class

Constructor & Destructor Documentation

◆ PowerGridFunctionSpace() [1/12]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::PowerGridFunctionSpace ( const std::array< std::shared_ptr< T >, k > &  container,
const Backend &  backend = Backend(),
const OrderingTag  ordering_tag = OrderingTag() 
)
inline

Construct a new Power Grid Function Space object.

Parameters
containerarray with pointers to child spaces
backendbackend object
ordering_tagordering tag object

◆ PowerGridFunctionSpace() [2/12]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::PowerGridFunctionSpace ( T &  c,
const Backend &  backend = Backend(),
const OrderingTag  ordering_tag = OrderingTag() 
)
inline

◆ PowerGridFunctionSpace() [3/12]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::PowerGridFunctionSpace ( T &  c0,
T &  c1,
const Backend &  backend = Backend(),
const OrderingTag  ordering_tag = OrderingTag() 
)
inline

◆ PowerGridFunctionSpace() [4/12]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::PowerGridFunctionSpace ( T &  c0,
T &  c1,
T &  c2,
const Backend &  backend = Backend(),
const OrderingTag  ordering_tag = OrderingTag() 
)
inline

◆ PowerGridFunctionSpace() [5/12]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::PowerGridFunctionSpace ( T &  c0,
T &  c1,
T &  c2,
T &  c3,
const Backend &  backend = Backend(),
const OrderingTag  ordering_tag = OrderingTag() 
)
inline

◆ PowerGridFunctionSpace() [6/12]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::PowerGridFunctionSpace ( T &  c0,
T &  c1,
T &  c2,
T &  c3,
T &  c4,
const Backend &  backend = Backend(),
const OrderingTag  ordering_tag = OrderingTag() 
)
inline

◆ PowerGridFunctionSpace() [7/12]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::PowerGridFunctionSpace ( T &  c0,
T &  c1,
T &  c2,
T &  c3,
T &  c4,
T &  c5,
const Backend &  backend = Backend(),
const OrderingTag  ordering_tag = OrderingTag() 
)
inline

◆ PowerGridFunctionSpace() [8/12]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::PowerGridFunctionSpace ( T &  c0,
T &  c1,
T &  c2,
T &  c3,
T &  c4,
T &  c5,
T &  c6,
const Backend &  backend = Backend(),
const OrderingTag  ordering_tag = OrderingTag() 
)
inline

◆ PowerGridFunctionSpace() [9/12]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::PowerGridFunctionSpace ( T &  c0,
T &  c1,
T &  c2,
T &  c3,
T &  c4,
T &  c5,
T &  c6,
T &  c7,
const Backend &  backend = Backend(),
const OrderingTag  ordering_tag = OrderingTag() 
)
inline

◆ PowerGridFunctionSpace() [10/12]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::PowerGridFunctionSpace ( T &  c0,
T &  c1,
T &  c2,
T &  c3,
T &  c4,
T &  c5,
T &  c6,
T &  c7,
T &  c8,
const Backend &  backend = Backend(),
const OrderingTag  ordering_tag = OrderingTag() 
)
inline

◆ PowerGridFunctionSpace() [11/12]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::PowerGridFunctionSpace ( T &  c0,
T &  c1,
T &  c2,
T &  c3,
T &  c4,
T &  c5,
T &  c6,
T &  c7,
T &  c8,
T &  c9,
const Backend &  backend = Backend(),
const OrderingTag  ordering_tag = OrderingTag() 
)
inline

◆ PowerGridFunctionSpace() [12/12]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
template<typename Child0 , typename... Children>
Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::PowerGridFunctionSpace ( std::shared_ptr< Child0 >  child0,
std::shared_ptr< Children >...  children 
)
inline

Member Function Documentation

◆ backend() [1/2]

◆ backend() [2/2]

◆ blockCount()

Traits::SizeType Dune::PDELab::GridFunctionSpaceBase< GridFunctionSpace , PowerCompositeGridFunctionSpaceTraits< GV, B, O, k > >::blockCount ( ) const
inlineinherited

◆ dataHandleContains()

template<typename GFS >
bool Dune::PDELab::DataHandleProvider< GFS >::dataHandleContains ( int  codim) const
inlineinherited

returns true if data for this codim should be communicated

◆ dataHandleFixedSize()

template<typename GFS >
bool Dune::PDELab::DataHandleProvider< GFS >::dataHandleFixedSize ( int  codim) const
inlineinherited

returns true if size per entity of given dim and codim is a constant

◆ dataHandleIndices()

template<typename GFS >
template<typename Entity , typename ContainerIndex , typename DOFIndex , typename OffsetIterator , bool map_dof_indices>
void Dune::PDELab::DataHandleProvider< GFS >::dataHandleIndices ( const Entity &  e,
std::vector< ContainerIndex > &  container_indices,
std::vector< DOFIndex > &  dof_indices,
OffsetIterator  oit,
std::integral_constant< bool, map_dof_indices >  map_dof_indices_value 
) const
inlineinherited

return vector of global indices associated with the given entity

◆ dataHandleSize()

template<typename GFS >
template<typename Entity >
size_type Dune::PDELab::DataHandleProvider< GFS >::dataHandleSize ( const Entity &  e) const
inlineinherited

how many objects of type DataType have to be sent for a given entity

Note: Only the sender side needs to know this size.

◆ dof_indices_begin() [1/2]

template<typename GFS >
template<typename V >
DummyDOFIndexIterator Dune::PDELab::DataHandleProvider< GFS >::dof_indices_begin ( V &  v,
std::integral_constant< bool, false >   
) const
inlineinherited

◆ dof_indices_begin() [2/2]

template<typename GFS >
template<typename V >
V::iterator Dune::PDELab::DataHandleProvider< GFS >::dof_indices_begin ( V &  v,
std::integral_constant< bool, true >   
) const
inlineinherited

◆ gfs()

template<typename GFS >
const GFS & Dune::PDELab::DataHandleProvider< GFS >::gfs ( ) const
inlineprotectedinherited

◆ globalSize()

Traits::SizeType Dune::PDELab::GridFunctionSpaceBase< GridFunctionSpace , PowerCompositeGridFunctionSpaceTraits< GV, B, O, k > >::globalSize ( ) const
inlineinherited

◆ isRootSpace()

bool Dune::PDELab::GridFunctionSpaceBase< GridFunctionSpace , PowerCompositeGridFunctionSpaceTraits< GV, B, O, k > >::isRootSpace ( ) const
inlineinherited

◆ maxLocalSize()

Traits::SizeType Dune::PDELab::GridFunctionSpaceBase< GridFunctionSpace , PowerCompositeGridFunctionSpaceTraits< GV, B, O, k > >::maxLocalSize ( ) const
inlineinherited

get max dimension of shape function space

◆ name() [1/2]

const std::string & Dune::PDELab::GridFunctionSpaceBase< GridFunctionSpace , PowerCompositeGridFunctionSpaceTraits< GV, B, O, k > >::name ( ) const
inlineinherited

◆ name() [2/2]

void Dune::PDELab::GridFunctionSpaceBase< GridFunctionSpace , PowerCompositeGridFunctionSpaceTraits< GV, B, O, k > >::name ( const std::string &  name)
inlineinherited

◆ ordering() [1/2]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
Ordering & Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::ordering ( )
inline

Direct access to the DOF ordering.

◆ ordering() [2/2]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
const Ordering & Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::ordering ( ) const
inline

Direct access to the DOF ordering.

◆ orderingStorage() [1/2]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
std::shared_ptr< Ordering > Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::orderingStorage ( )
inline

Direct access to the storage of the DOF ordering.

◆ orderingStorage() [2/2]

template<typename T , std::size_t k, typename Backend , typename OrderingTag = LexicographicOrderingTag>
std::shared_ptr< const Ordering > Dune::PDELab::PowerGridFunctionSpace< T, k, Backend, OrderingTag >::orderingStorage ( ) const
inline

Direct access to the storage of the DOF ordering.

◆ orderingTag() [1/2]

◆ orderingTag() [2/2]

const Traits::OrderingTag & Dune::PDELab::GridFunctionSpaceBase< GridFunctionSpace , PowerCompositeGridFunctionSpaceTraits< GV, B, O, k > >::orderingTag ( ) const
inlineinherited

◆ sendLeafSizes()

template<typename GFS >
constexpr bool Dune::PDELab::DataHandleProvider< GFS >::sendLeafSizes ( ) const
inlineconstexprinherited

Returns true if the sizes of the leaf orderings in this tree should be sent as part of the communcation.

The MultiDomain extensions require knowledge about the size of the individual orderings, which might belong to separate subdomains. Otherwise it is possible to have size mismatches for entities with codim > 0 if there are protruding edges in the parallel mesh partitioning.

By default, this method will always return false. It must be overridden for cases where the data actually needs to be sent.

This flag also modifies the behavior of the generic data handles, which will automatically send, receive and process the additional information. Note that if sendLeafSizes() returns true, the underlying DataHandleIF of the grid will always use the data type char to be able to send different types of data, which will automatically be marshalled to / from a byte stream.

◆ setup_dof_indices() [1/2]

template<typename GFS >
template<typename V , typename EntityIndex >
void Dune::PDELab::DataHandleProvider< GFS >::setup_dof_indices ( V &  v,
size_type  n,
const EntityIndex &  ei,
std::integral_constant< bool, false >   
) const
inlineinherited

◆ setup_dof_indices() [2/2]

template<typename GFS >
template<typename V , typename EntityIndex >
void Dune::PDELab::DataHandleProvider< GFS >::setup_dof_indices ( V &  v,
size_type  n,
const EntityIndex &  ei,
std::integral_constant< bool, true >   
) const
inlineinherited

◆ size()

Traits::SizeType Dune::PDELab::GridFunctionSpaceBase< GridFunctionSpace , PowerCompositeGridFunctionSpaceTraits< GV, B, O, k > >::size ( ) const
inlineinherited

◆ update() [1/2]

void Dune::PDELab::GridFunctionSpaceBase< GridFunctionSpace , PowerCompositeGridFunctionSpaceTraits< GV, B, O, k > >::update ( bool  force = false)
inlineinherited

Update the indexing information of the GridFunctionSpace.

\ param force Set to true if the underlying grid has changed (e.g. due to adaptivity) to force an update of the embedded EntitySet.

◆ update() [2/2]

void Dune::PDELab::GridFunctionSpaceBase< GridFunctionSpace , PowerCompositeGridFunctionSpaceTraits< GV, B, O, k > >::update ( Ordering &  ordering) const
inlineprotectedinherited

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