dune-pdelab  2.0.0
Public Types | Public Member Functions | List of all members
Dune::PDELab::GridFunctionSubSpace< GFS, TreePath > Class Template Reference

Non-nesting implementation of GridFunctionSubSpace. More...

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

Inheritance diagram for Dune::PDELab::GridFunctionSubSpace< GFS, TreePath >:
Inheritance graph

Public Types

typedef GFS BaseGridFunctionSpace
 The base GridFunctionSpace that this GridFunctionSubSpace is based on. More...
 
typedef
TypeTree::extract_child_type
< GFS, TreePath >::type 
ChildGridFunctionSpace
 The type of the original GridFunctionSpace that is the root of this GridFunctionSpace. More...
 
typedef
ChildGridFunctionSpace::Traits 
Traits
 Re-exported Traits from the original GridFunctionSpace. More...
 
typedef
GridFunctionSubSpaceTag
< typename
ChildGridFunctionSpace::ImplementationTag > 
ImplementationTag
 Our ImplementationTag is derived from the tag of the original GridFunctionSpace. More...
 

Public Member Functions

 GridFunctionSubSpace (shared_ptr< const GFS > gfs_storage)
 
 GridFunctionSubSpace (const GFS &gfs)
 
const BaseGridFunctionSpacebaseGridFunctionSpace () const
 Returns the root GridFunctionSpace that this subspace view is based on. More...
 
shared_ptr< const
BaseGridFunctionSpace
baseGridFunctionSpaceStorage () const
 Returns the storage object of the root GridFunctionSpace that this subspace view is based on. More...
 
const ChildGridFunctionSpacechildGridFunctionSpace () const
 Returns the original GridFunctionSpace that we provide a view for. More...
 
shared_ptr< const
ChildGridFunctionSpace
childGridFunctionSpaceStorage () const
 Returns the storage object of the original GridFunctionSpace that we provide a view for. More...
 
Additional Functionality for Leaf Spaces
const Traits::FiniteElementMap & finiteElementMap () const
 Returns the finite element map of this space. More...
 
shared_ptr< const typename
Traits::FiniteElementMap > 
finiteElementMapStorage () const
 Returns the storage object for the finite element map of this space. More...
 
const Traits::ConstraintsType & constraints () const
 Returns the constraints engine of this space. More...
 
const std::string & name () const
 Returns the name of this space. More...
 

Default Functionality for all GridFunctionSpaces

std::size_t subSpaceDepth () const
 
const Orderingordering () const
 Returns the ordering associated with this GridFunctionSubSpace. More...
 
const Traits::GridViewType & gridView () const
 Returns the underlying GridView. More...
 
Traits::SizeType globalSize () const
 Returns the global size of the root space. More...
 
Traits::SizeType size () const
 Returns the global size of the root space. More...
 
Traits::SizeType maxLocalSize () const
 Returns the maximum number of DOFs per cells in this subspace. More...
 
typedef TreePath SubSpacePath
 The TreePath from the root of the space hierarchy to this subspace. More...
 
typedef
ChildGridFunctionSpace::OrderingTag 
OrderingTag
 Re-exported OrderingTag from the original GridFunctionSpace. More...
 
typedef SubOrdering< typename
GFS::Ordering, typename
find_ordering_treepath_for_sub_gfs
< typename GFS::Ordering, GFS,
TreePath >::type > 
Ordering
 The ordering used by this GridFunctionSubSpace. More...
 

Detailed Description

template<typename GFS, typename TreePath>
class Dune::PDELab::GridFunctionSubSpace< GFS, TreePath >

Non-nesting implementation of GridFunctionSubSpace.

This is the actual implementation of GridFunctionSubSpace. It is based around the idea of performing the mapping from the subspace to the rootspace in a single step using a SubOrdering. As SubOrderings cannot be nested, this class needs some helper functionality that constructs a new GridFunctionSubSpace directly on top of the underlying root GridFunctionSpace if the user attempts to nest GridFunctionSubSpaces. On the other hand, this implementation should render such usage mostly unnecessary, as it is now possible to directly construct a subspace for a given leaf space. If the compiler has support for template aliases, the de-nesting infrastructure will be able to completely remove all traces of nesting, letting the type obtained by nesting two GridFunctionSubSpaces look exactly like the type obtained by constructing a single GridFunctionSubSpace. Alternatively, without template aliases, it is only possible to have the actual implementation be non-nested. In this case, the Dune::PDELab::GridFunctionSubSpace classes will still nest.

Note
This class should always be used as Dune::PDELab::GridFunctionSubSpace. Never attempt to directly use the class Dune::PDELab::gfs::GridFunctionSubSpace!
Template Parameters
GFSThe root GridFunctionSpace.
TreePathPath from the root GridFunctionSpace to the represented subspace. Without template alias support, this interface class inherits from the actual, de-nested implementation.

Member Typedef Documentation

template<typename GFS , typename TreePath >
typedef GFS Dune::PDELab::gfs::GridFunctionSubSpace< GFS, TreePath >::BaseGridFunctionSpace
inherited

The base GridFunctionSpace that this GridFunctionSubSpace is based on.

template<typename GFS , typename TreePath >
typedef TypeTree::extract_child_type<GFS,TreePath>::type Dune::PDELab::gfs::GridFunctionSubSpace< GFS, TreePath >::ChildGridFunctionSpace
inherited

The type of the original GridFunctionSpace that is the root of this GridFunctionSpace.

template<typename GFS , typename TreePath >
typedef GridFunctionSubSpaceTag< typename ChildGridFunctionSpace::ImplementationTag > Dune::PDELab::gfs::GridFunctionSubSpace< GFS, TreePath >::ImplementationTag
inherited

Our ImplementationTag is derived from the tag of the original GridFunctionSpace.

typedef SubOrdering< typename GFS::Ordering, typename find_ordering_treepath_for_sub_gfs< typename GFS::Ordering, GFS, TreePath >::type > Dune::PDELab::gfs::DefaultSubSpaceFeatures< GFS, TreePath, TypeTree::extract_child_type< GFS, TreePath >::type::ImplementationTag >::Ordering
inherited

The ordering used by this GridFunctionSubSpace.

typedef ChildGridFunctionSpace::OrderingTag Dune::PDELab::gfs::DefaultSubSpaceFeatures< GFS, TreePath, TypeTree::extract_child_type< GFS, TreePath >::type::ImplementationTag >::OrderingTag
inherited

Re-exported OrderingTag from the original GridFunctionSpace.

typedef TreePath Dune::PDELab::gfs::DefaultSubSpaceFeatures< GFS, TreePath, TypeTree::extract_child_type< GFS, TreePath >::type::ImplementationTag >::SubSpacePath
inherited

The TreePath from the root of the space hierarchy to this subspace.

template<typename GFS , typename TreePath >
typedef ChildGridFunctionSpace::Traits Dune::PDELab::gfs::GridFunctionSubSpace< GFS, TreePath >::Traits
inherited

Re-exported Traits from the original GridFunctionSpace.

Constructor & Destructor Documentation

template<typename GFS , typename TreePath >
Dune::PDELab::GridFunctionSubSpace< GFS, TreePath >::GridFunctionSubSpace ( shared_ptr< const GFS >  gfs_storage)
inlineexplicit
template<typename GFS , typename TreePath >
Dune::PDELab::GridFunctionSubSpace< GFS, TreePath >::GridFunctionSubSpace ( const GFS &  gfs)
inlineexplicit

Member Function Documentation

template<typename GFS , typename TreePath >
const BaseGridFunctionSpace& Dune::PDELab::gfs::GridFunctionSubSpace< GFS, TreePath >::baseGridFunctionSpace ( ) const
inlineinherited

Returns the root GridFunctionSpace that this subspace view is based on.

template<typename GFS , typename TreePath >
shared_ptr<const BaseGridFunctionSpace> Dune::PDELab::gfs::GridFunctionSubSpace< GFS, TreePath >::baseGridFunctionSpaceStorage ( ) const
inlineinherited

Returns the storage object of the root GridFunctionSpace that this subspace view is based on.

template<typename GFS , typename TreePath >
const ChildGridFunctionSpace& Dune::PDELab::gfs::GridFunctionSubSpace< GFS, TreePath >::childGridFunctionSpace ( ) const
inlineinherited
template<typename GFS , typename TreePath >
shared_ptr<const ChildGridFunctionSpace> Dune::PDELab::gfs::GridFunctionSubSpace< GFS, TreePath >::childGridFunctionSpaceStorage ( ) const
inlineinherited

Returns the storage object of the original GridFunctionSpace that we provide a view for.

Warning
Users should think at least twice before using this object in their code, as it will usually not do what they want! Due to the way GridFunctionSpaces are constructed, it is not aware of the overall structure of the space!
const Traits::ConstraintsType& Dune::PDELab::gfs::LeafSubSpaceFeatures< GFS, TreePath, TypeTree::extract_child_type< GFS, TreePath >::type::ImplementationTag >::constraints ( ) const
inlineinherited

Returns the constraints engine of this space.

References Dune::PDELab::gfs::GridFunctionSubSpace< GFS, TreePath >::childGridFunctionSpace().

const Traits::FiniteElementMap& Dune::PDELab::gfs::LeafSubSpaceFeatures< GFS, TreePath, TypeTree::extract_child_type< GFS, TreePath >::type::ImplementationTag >::finiteElementMap ( ) const
inlineinherited

Returns the finite element map of this space.

References Dune::PDELab::gfs::GridFunctionSubSpace< GFS, TreePath >::childGridFunctionSpace().

shared_ptr<const typename Traits::FiniteElementMap> Dune::PDELab::gfs::LeafSubSpaceFeatures< GFS, TreePath, TypeTree::extract_child_type< GFS, TreePath >::type::ImplementationTag >::finiteElementMapStorage ( ) const
inlineinherited

Returns the storage object for the finite element map of this space.

References Dune::PDELab::gfs::GridFunctionSubSpace< GFS, TreePath >::childGridFunctionSpace().

Traits::SizeType Dune::PDELab::gfs::DefaultSubSpaceFeatures< GFS, TreePath, TypeTree::extract_child_type< GFS, TreePath >::type::ImplementationTag >::globalSize ( ) const
inlineinherited

Returns the global size of the root space.

References Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::size().

const Traits::GridViewType& Dune::PDELab::gfs::DefaultSubSpaceFeatures< GFS, TreePath, TypeTree::extract_child_type< GFS, TreePath >::type::ImplementationTag >::gridView ( ) const
inlineinherited
Traits::SizeType Dune::PDELab::gfs::DefaultSubSpaceFeatures< GFS, TreePath, TypeTree::extract_child_type< GFS, TreePath >::type::ImplementationTag >::maxLocalSize ( ) const
inlineinherited

Returns the maximum number of DOFs per cells in this subspace.

References Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::maxLocalSize().

const std::string& Dune::PDELab::gfs::LeafSubSpaceFeatures< GFS, TreePath, TypeTree::extract_child_type< GFS, TreePath >::type::ImplementationTag >::name ( ) const
inlineinherited
const Ordering& Dune::PDELab::gfs::DefaultSubSpaceFeatures< GFS, TreePath, TypeTree::extract_child_type< GFS, TreePath >::type::ImplementationTag >::ordering ( ) const
inlineinherited

Returns the ordering associated with this GridFunctionSubSpace.

Traits::SizeType Dune::PDELab::gfs::DefaultSubSpaceFeatures< GFS, TreePath, TypeTree::extract_child_type< GFS, TreePath >::type::ImplementationTag >::size ( ) const
inlineinherited

Returns the global size of the root space.

Warning
The semantics of this methods have changed with the introduction of Orderings: While this method used to return the size of the subspace only, it now behaves like globalSize() and returns the overall size of the root space! Calculating the size of the subspace might be a very expensive operation depending on the underlying orderings.

References Dune::PDELab::SubOrdering< BaseOrdering_, TreePath >::size().

std::size_t Dune::PDELab::gfs::DefaultSubSpaceFeatures< GFS, TreePath, TypeTree::extract_child_type< GFS, TreePath >::type::ImplementationTag >::subSpaceDepth ( ) const
inlineinherited

References value.


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