Public Member Functions | Static Public Member Functions | Private Attributes

hp::FECollection< dim, spacedim > Class Template Reference
[hp finite element supporthp Collections]

Inheritance diagram for hp::FECollection< dim, spacedim >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FECollection ()
 FECollection (const FiniteElement< dim, spacedim > &fe)
 FECollection (const FECollection< dim, spacedim > &fe_collection)
void push_back (const FiniteElement< dim, spacedim > &new_fe)
const FiniteElement< dim,
spacedim > & 
operator[] (const unsigned int index) const
unsigned int size () const
unsigned int n_components () const
unsigned int max_dofs_per_vertex () const
unsigned int max_dofs_per_line () const
unsigned int max_dofs_per_quad () const
unsigned int max_dofs_per_hex () const
unsigned int max_dofs_per_face () const
unsigned int max_dofs_per_cell () const
std::size_t memory_consumption () const
bool hp_constraints_are_implemented () const

Static Public Member Functions

::ExceptionBaseExcNoFiniteElements ()

Private Attributes

std::vector
< std_cxx1x::shared_ptr< const
FiniteElement< dim, spacedim > > > 
finite_elements

Detailed Description

template<int dim, int spacedim = dim>
class hp::FECollection< dim, spacedim >

This class acts as a collection of finite element objects used in the hp::DoFHandler. It is thus to a hp::DoFHandler what a FiniteElement is to a DoFHandler.

It implements the concepts stated in the hp Collections module described in the doxygen documentation.

In addition to offering access to the elements of the collection, this class provides access to the maximal number of degrees of freedom per vertex, line, etc, to allow allocation of as much memory as is necessary in the worst case when using the finite elements associated with the cells of a triangulation.

This class has not yet been implemented for the use in the codimension one case (spacedim != dim ).

Author:
Wolfgang Bangerth, 2003

Definition at line 46 of file fe_collection.h.


Constructor & Destructor Documentation

template<int dim, int spacedim = dim>
hp::FECollection< dim, spacedim >::FECollection (  )

Default constructor. Leads to an empty collection that can later be filled using push_back().

template<int dim, int spacedim = dim>
hp::FECollection< dim, spacedim >::FECollection ( const FiniteElement< dim, spacedim > &  fe ) [explicit]

Conversion constructor. This constructor creates a FECollection from a single finite element. More finite element objects can be added with push_back(), if desired, though it would probably be clearer to add all mappings the same way.

template<int dim, int spacedim = dim>
hp::FECollection< dim, spacedim >::FECollection ( const FECollection< dim, spacedim > &  fe_collection )

Copy constructor.


Member Function Documentation

template<int dim, int spacedim = dim>
void hp::FECollection< dim, spacedim >::push_back ( const FiniteElement< dim, spacedim > &  new_fe )

Add a finite element. This function generates a copy of the given element, i.e. you can do things like push_back(FE_Q<dim>(1));. The internal copy is later destroyed by this object upon destruction of the entire collection.

When a new element is added, it needs to have the same number of vector components as all other elements already in the collection.

template<int dim, int spacedim>
const FiniteElement< dim, spacedim > & hp::FECollection< dim, spacedim >::operator[] ( const unsigned int  index ) const [inline]

Get a reference to the given element in this collection.

Precondition:
index must be between zero and the number of elements of the collection.

Definition at line 246 of file fe_collection.h.

References Assert, and StandardExceptions::ExcIndexRange().

template<int dim, int spacedim>
unsigned int hp::FECollection< dim, spacedim >::size (  ) const [inline]

Return the number of finite element objects stored in this collection.

Definition at line 227 of file fe_collection.h.

template<int dim, int spacedim>
unsigned int hp::FECollection< dim, spacedim >::n_components (  ) const [inline]

Return the number of vector components of the finite elements in this collection. This number must be the same for all elements in the collection.

Definition at line 236 of file fe_collection.h.

References Assert.

template<int dim, int spacedim>
unsigned int hp::FECollection< dim, spacedim >::max_dofs_per_vertex (  ) const

Return the maximal number of degrees of freedom per vertex over all elements of this collection.

Definition at line 257 of file fe_collection.h.

References Assert, and Utilities::MPI::max().

template<int dim, int spacedim>
unsigned int hp::FECollection< dim, spacedim >::max_dofs_per_line (  ) const

Return the maximal number of degrees of freedom per line over all elements of this collection.

Definition at line 273 of file fe_collection.h.

References Assert, and Utilities::MPI::max().

template<int dim, int spacedim>
unsigned int hp::FECollection< dim, spacedim >::max_dofs_per_quad (  ) const

Return the maximal number of degrees of freedom per quad over all elements of this collection.

Definition at line 289 of file fe_collection.h.

References Assert, and Utilities::MPI::max().

template<int dim, int spacedim>
unsigned int hp::FECollection< dim, spacedim >::max_dofs_per_hex (  ) const

Return the maximal number of degrees of freedom per hex over all elements of this collection.

Definition at line 305 of file fe_collection.h.

References Assert, and Utilities::MPI::max().

template<int dim, int spacedim>
unsigned int hp::FECollection< dim, spacedim >::max_dofs_per_face (  ) const

Return the maximal number of degrees of freedom per face over all elements of this collection.

Definition at line 321 of file fe_collection.h.

References Assert, and Utilities::MPI::max().

template<int dim, int spacedim>
unsigned int hp::FECollection< dim, spacedim >::max_dofs_per_cell (  ) const

Return the maximal number of degrees of freedom per cell over all elements of this collection.

Definition at line 337 of file fe_collection.h.

References Assert, and Utilities::MPI::max().

template<int dim, int spacedim = dim>
std::size_t hp::FECollection< dim, spacedim >::memory_consumption (  ) const

Return an estimate for the memory allocated for this object.

template<int dim, int spacedim>
bool hp::FECollection< dim, spacedim >::hp_constraints_are_implemented (  ) const

Return whether all elements in this collection implement the hanging node constraints in the new way, which has to be used to make elements "hp compatible". If this is not the case, the function returns false, which implies, that at least one element in the FECollection does not support the new face interface constraints. On the other hand, if this method does return true, this does not imply that the hp method will work!

This behaviour is related to the fact, that FiniteElement classes, which provide the new style hanging node constraints might still not provide them for all possible cases. If FE_Q and FE_RaviartThomas elements are included in the FECollection and both properly implement the get_face_interpolation_matrix method, this method will return true. But the get_face_interpolation_matrix might still fail to find an interpolation matrix between these two elements.

Definition at line 352 of file fe_collection.h.

References Assert.

template<int dim, int spacedim = dim>
::ExceptionBase& hp::FECollection< dim, spacedim >::ExcNoFiniteElements (  ) [static]

Exception


Member Data Documentation

template<int dim, int spacedim = dim>
std::vector<std_cxx1x::shared_ptr<const FiniteElement<dim,spacedim> > > hp::FECollection< dim, spacedim >::finite_elements [private]

Array of pointers to the finite elements stored by this collection.

Definition at line 217 of file fe_collection.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Fri Feb 3 2012 06:04:14 by doxygen 1.7.2