dune-pdelab 2.7-git
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag > Class Template Reference

tensorproduct space representing a vector valued function space More...

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

Inheritance diagram for Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >:
Inheritance graph

Classes

struct  ConstraintsContainer
 extract type for storing constraints More...
 

Public Types

typedef VectorGridFunctionSpaceTag ImplementationTag
 
typedef TypeTree::PowerNode< LeafGFS, k > BaseT
 
typedef PowerCompositeGridFunctionSpaceBase< VectorGridFunctionSpace, impl::EntitySet< GV >, Backend, OrderingTag, k > ImplementationBase
 
typedef TypeTree::TransformTree< VectorGridFunctionSpace, gfs_to_ordering< VectorGridFunctionSpace > > ordering_transformation
 
typedef ordering_transformation::Type Ordering
 
typedef ImplementationBase::Traits Traits
 export traits class
 
typedef O OrderingTag
 
typedef std::size_t size_type
 

Public Member Functions

 VectorGridFunctionSpace (const typename Traits::GridView &gv, const FEM &fem, const Backend &backend=Backend(), const LeafBackend &leaf_backend=LeafBackend(), const OrderingTag &ordering_tag=OrderingTag(), const LeafOrderingTag &leaf_ordering_tag=LeafOrderingTag())
 
 VectorGridFunctionSpace (const typename Traits::EntitySet &es, const FEM &fem, const Backend &backend=Backend(), const LeafBackend &leaf_backend=LeafBackend(), const OrderingTag &ordering_tag=OrderingTag(), const LeafOrderingTag &leaf_ordering_tag=LeafOrderingTag())
 
 VectorGridFunctionSpace (const typename Traits::GridView &gv, std::shared_ptr< const FEM > fem, const Backend &backend=Backend(), const LeafBackend &leaf_backend=LeafBackend(), const OrderingTag &ordering_tag=OrderingTag(), const LeafOrderingTag &leaf_ordering_tag=LeafOrderingTag())
 
 VectorGridFunctionSpace (const typename Traits::EntitySet &es, std::shared_ptr< const FEM > fem, const Backend &backend=Backend(), const LeafBackend &leaf_backend=LeafBackend(), const OrderingTag &ordering_tag=OrderingTag(), const LeafOrderingTag &leaf_ordering_tag=LeafOrderingTag())
 
std::string name () const
 
void name (std::string name)
 
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::EntitySetentitySet () const
 get grid view partition
 
Traits::EntitySetentitySet ()
 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.
 
void name (const std::string &name)
 
Traits::Backendbackend ()
 
const Traits::Backendbackend () const
 
const Traits::GridViewgridView () const
 get grid view
 
void setEntitySet (typename Traits::EntitySet entity_set)
 Set the Entity Set object to this grid function space.
 
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
 
Output::DataSetType dataSetType () const
 Return the data set type of this function.
 
void setDataSetType (Output::DataSetType dataSetType)
 Set the data set type of this function.
 

Protected Member Functions

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

Protected Attributes

std::optional< typename Traits::EntitySet_entity_set
 

Detailed Description

template<typename GV, typename FEM, std::size_t k, typename Backend, typename LeafBackend, typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
class Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >

tensorproduct space representing a vector valued function space

In its structure this space is very similar to a PowerGridFunctionSpace:

VGFS(FEM,k) = PGFS(GFS(FEM),k) = {GFS(FEM)}^k

Stating explicitly that a space is a VectorGridFunctionSpace mainly changes the way the data is interpreted. One can immediatelly create a discrete function as a member of a VectorGridFunctionSpace and visualize it via VTK. In this case the output data is automatically tagged as vector valued data, allowing for a better visualization.

Template Parameters
GVType implementing GridView
FEMType implementing FiniteElementMapInterface
kPhysical dimension of the space
BackendLinear algebra backend type at the level of the tensorproduct construction (the same backend one might pass to a PowerGridFunctionSpace)
LeafBackendLinear algebra backend type at the level of the underlying scalar space (GFS(FEM))
ConstraintsType for constraints assembler
OrderingTagordering of DOFs at the level of the tensorproduct construction (usually on will choose either or EntityBlockedOrderingTag) LeafOrderingTag ordering of DOFs at the level of the underlying scalar space (default: DefaultLeafOrderingTag)

Member Typedef Documentation

◆ BaseT

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
typedef TypeTree::PowerNode<LeafGFS,k> Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::BaseT

◆ ImplementationBase

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
typedef PowerCompositeGridFunctionSpaceBase< VectorGridFunctionSpace, impl::EntitySet<GV>, Backend, OrderingTag, k> Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::ImplementationBase

◆ ImplementationTag

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
typedef VectorGridFunctionSpaceTag Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::ImplementationTag

◆ Ordering

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
typedef ordering_transformation::Type Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::Ordering

◆ ordering_transformation

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
typedef TypeTree::TransformTree<VectorGridFunctionSpace, gfs_to_ordering<VectorGridFunctionSpace> > Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::ordering_transformation

◆ size_type

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

◆ Traits

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
typedef ImplementationBase::Traits Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::Traits

export traits class

Constructor & Destructor Documentation

◆ VectorGridFunctionSpace() [1/4]

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::VectorGridFunctionSpace ( const typename Traits::GridView gv,
const FEM &  fem,
const Backend &  backend = Backend(),
const LeafBackend &  leaf_backend = LeafBackend(),
const OrderingTag ordering_tag = OrderingTag(),
const LeafOrderingTag leaf_ordering_tag = LeafOrderingTag() 
)
inline

◆ VectorGridFunctionSpace() [2/4]

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::VectorGridFunctionSpace ( const typename Traits::EntitySet es,
const FEM &  fem,
const Backend &  backend = Backend(),
const LeafBackend &  leaf_backend = LeafBackend(),
const OrderingTag ordering_tag = OrderingTag(),
const LeafOrderingTag leaf_ordering_tag = LeafOrderingTag() 
)
inline

◆ VectorGridFunctionSpace() [3/4]

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::VectorGridFunctionSpace ( const typename Traits::GridView gv,
std::shared_ptr< const FEM >  fem,
const Backend &  backend = Backend(),
const LeafBackend &  leaf_backend = LeafBackend(),
const OrderingTag ordering_tag = OrderingTag(),
const LeafOrderingTag leaf_ordering_tag = LeafOrderingTag() 
)
inline

◆ VectorGridFunctionSpace() [4/4]

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::VectorGridFunctionSpace ( const typename Traits::EntitySet es,
std::shared_ptr< const FEM >  fem,
const Backend &  backend = Backend(),
const LeafBackend &  leaf_backend = LeafBackend(),
const OrderingTag ordering_tag = OrderingTag(),
const LeafOrderingTag leaf_ordering_tag = LeafOrderingTag() 
)
inline

Member Function Documentation

◆ backend() [1/2]

◆ backend() [2/2]

◆ blockCount()

◆ 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.

◆ dataSetType()

Output::DataSetType Dune::PDELab::GridFunctionOutputParameters::dataSetType ( ) const
inlineinherited

Return the data set type of this function.

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

◆ gridView()

get grid view

◆ isRootSpace()

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

◆ maxLocalSize()

get max dimension of shape function space

◆ name() [1/3]

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
std::string Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::name ( ) const
inline

◆ name() [2/3]

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

◆ name() [3/3]

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
void Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::name ( std::string  name)
inline

◆ ordering() [1/2]

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
Ordering & Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::ordering ( )
inline

Direct access to the DOF ordering.

◆ ordering() [2/2]

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
const Ordering & Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::ordering ( ) const
inline

Direct access to the DOF ordering.

◆ orderingStorage() [1/2]

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
std::shared_ptr< Ordering > Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::orderingStorage ( )
inline

Direct access to the storage of the DOF ordering.

◆ orderingStorage() [2/2]

template<typename GV , typename FEM , std::size_t k, typename Backend , typename LeafBackend , typename Constraints = NoConstraints, typename OrderingTag = LexicographicOrderingTag, typename LeafOrderingTag = DefaultLeafOrderingTag>
std::shared_ptr< const Ordering > Dune::PDELab::VectorGridFunctionSpace< GV, FEM, k, Backend, LeafBackend, Constraints, OrderingTag, LeafOrderingTag >::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.

◆ setDataSetType()

void Dune::PDELab::GridFunctionOutputParameters::setDataSetType ( Output::DataSetType  dataSetType)
inlineinherited

Set the data set type of this function.

◆ setEntitySet()

void Dune::PDELab::GridFunctionSpaceBase< GridFunctionSpace , PowerCompositeGridFunctionSpaceTraits< GV, B, O, k > >::setEntitySet ( typename Traits::EntitySet  entity_set)
inlineinherited

Set the Entity Set object to this grid function space.

The passed entity set will be stored and modified by the grid function space. In case of a tree, all entity sets below an entity blocking tag are expected to be the same, otherwise, the ordering will issue an exception. (e.g. compartments with different function spaces). Additionally, the root node in a grid function space tree may also contain a different partition which will be used in the assembly process (e.g. a union of all entity sets from leaf nodes). If no other entity set was given, the root node will usually take the first leaf node entity set.

Parameters
entity_setAn object of the type PartitionViewEntitySet

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

◆ 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

Member Data Documentation

◆ _entity_set

std::optional<typename Traits::EntitySet> Dune::PDELab::GridFunctionSpaceBase< GridFunctionSpace , PowerCompositeGridFunctionSpaceTraits< GV, B, O, k > >::_entity_set
mutableprotectedinherited

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