FE_Q< dim, spacedim > Class Template Reference
[Finite element space descriptions]

Inheritance diagram for FE_Q< dim, spacedim >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 FE_Q (const unsigned int p)
 FE_Q (const Quadrature< 1 > &points)
virtual std::string get_name () const
virtual void get_interpolation_matrix (const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
virtual void get_face_interpolation_matrix (const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
virtual void get_subface_interpolation_matrix (const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
virtual bool has_support_on_face (const unsigned int shape_index, const unsigned int face_index) const
virtual unsigned int memory_consumption () const
template<>
void initialize_unit_face_support_points ()
template<>
std::vector< unsigned intface_lexicographic_to_hierarchic_numbering (const unsigned int)
template<>
void initialize_unit_face_support_points ()
template<>
std::vector< unsigned intface_lexicographic_to_hierarchic_numbering (const unsigned int)
Functions to support hp
virtual bool hp_constraints_are_implemented () const
virtual std::vector< std::pair
< unsigned int, unsigned int > > 
hp_vertex_dof_identities (const FiniteElement< dim, spacedim > &fe_other) const
virtual std::vector< std::pair
< unsigned int, unsigned int > > 
hp_line_dof_identities (const FiniteElement< dim, spacedim > &fe_other) const
virtual std::vector< std::pair
< unsigned int, unsigned int > > 
hp_quad_dof_identities (const FiniteElement< dim, spacedim > &fe_other) const
virtual
FiniteElementDomination::Domination 
compare_for_face_domination (const FiniteElement< dim, spacedim > &fe_other) const

Protected Member Functions

virtual FiniteElement< dim,
spacedim > * 
clone () const

Private Member Functions

void initialize_constraints ()
void initialize_embedding ()
void initialize_restriction ()
void initialize_unit_support_points ()
void initialize_unit_support_points (const Quadrature< 1 > &points)
void initialize_unit_face_support_points ()
void initialize_unit_face_support_points (const Quadrature< 1 > &points)
void initialize_quad_dof_index_permutation ()

Static Private Member Functions

static std::vector< unsigned intget_dpo_vector (const unsigned int degree)
static std::vector< unsigned intface_lexicographic_to_hierarchic_numbering (const unsigned int degree)

Private Attributes

const std::vector< unsigned intface_index_map

Friends

class FE_Q
class FE_Q< dim, spacedim >::Implementation


Detailed Description

template<int dim, int spacedim = dim>
class FE_Q< dim, spacedim >

Implementation of a scalar Lagrange finite element Qp that yields the finite element space of continuous, piecewise polynomials of degree p in each coordinate direction. This class is realized using tensor product polynomials based on equidistant or given support points.

The standard constructor of this class takes the degree p of this finite element. Alternatively, it can take a quadrature formula points defining the support points of the Lagrange interpolation in one coordinate direction.

For more information about the spacedim template parameter check the documentation of FiniteElement or the one of Triangulation.

Implementation

The constructor creates a TensorProductPolynomials object that includes the tensor product of LagrangeEquidistant polynomials of degree p. This TensorProductPolynomials object provides all values and derivatives of the shape functions. In case a quadrature rule is given, the constructure creates a TensorProductPolynomials object that includes the tensor product of Lagrange polynomials with the support points from points.

Furthermore the constructor filles the interface_constraints, the prolongation (embedding) and the restriction matrices. These are implemented only up to a certain degree, that is listed in the following:

Numbering of the degrees of freedom (DoFs)

The original ordering of the shape functions represented by the TensorProductPolynomials is a tensor product numbering. However, the shape functions on a cell are renumbered beginning with the shape functions whose support points are at the vertices, then on the line, on the quads, and finally (for 3d) on the hexes. To be explicit, these numberings are listed in the following:

Q1 elements

Q2 elements

Q3 elements

Q4 elements

Author:
Wolfgang Bangerth, 1998, 2003; Guido Kanschat, 2001; Ralf Hartmann, 2001, 2004, 2005; Oliver Kayser-Herold, 2004; Katharina Kormann, 2008; Martin Kronbichler, 2008

Constructor & Destructor Documentation

template<int dim, int spacedim = dim>
FE_Q< dim, spacedim >::FE_Q ( const unsigned int  p  ) 

Constructor for tensor product polynomials of degree p.

template<int dim, int spacedim = dim>
FE_Q< dim, spacedim >::FE_Q ( const Quadrature< 1 > &  points  ) 

Constructor for tensor product polynomials with support points points based on a one-dimensional quadrature formula. The degree of the finite element is points.size()-1. Note that the first point has to be 0 and the last one 1.


Member Function Documentation

template<int dim, int spacedim = dim>
virtual std::string FE_Q< dim, spacedim >::get_name (  )  const [virtual]

Return a string that uniquely identifies a finite element. This class returns FE_Q<dim>(degree), with dim and degree replaced by appropriate values.

Implements FiniteElement< dim, spacedim >.

template<int dim, int spacedim = dim>
virtual void FE_Q< dim, spacedim >::get_interpolation_matrix ( const FiniteElement< dim, spacedim > &  source,
FullMatrix< double > &  matrix 
) const [virtual]

Return the matrix interpolating from the given finite element to the present one. The size of the matrix is then dofs_per_cell times source.dofs_per_cell.

These matrices are only available if the source element is also a FE_Q element. Otherwise, an exception of type FiniteElement<dim,spacedim>::ExcInterpolationNotImplemented is thrown.

Reimplemented from FiniteElement< dim, spacedim >.

template<int dim, int spacedim = dim>
virtual void FE_Q< dim, spacedim >::get_face_interpolation_matrix ( const FiniteElement< dim, spacedim > &  source,
FullMatrix< double > &  matrix 
) const [virtual]

Return the matrix interpolating from a face of of one element to the face of the neighboring element. The size of the matrix is then source.dofs_per_face times this->dofs_per_face.

Derived elements will have to implement this function. They may only provide interpolation matrices for certain source finite elements, for example those from the same family. If they don't implement interpolation from a given element, then they must throw an exception of type FiniteElement<dim,spacedim>::ExcInterpolationNotImplemented.

Reimplemented from FiniteElement< dim, spacedim >.

template<int dim, int spacedim = dim>
virtual void FE_Q< dim, spacedim >::get_subface_interpolation_matrix ( const FiniteElement< dim, spacedim > &  source,
const unsigned int  subface,
FullMatrix< double > &  matrix 
) const [virtual]

Return the matrix interpolating from a face of of one element to the face of the neighboring element. The size of the matrix is then source.dofs_per_face times this->dofs_per_face.

Derived elements will have to implement this function. They may only provide interpolation matrices for certain source finite elements, for example those from the same family. If they don't implement interpolation from a given element, then they must throw an exception of type FiniteElement<dim,spacedim>::ExcInterpolationNotImplemented.

Reimplemented from FiniteElement< dim, spacedim >.

template<int dim, int spacedim = dim>
virtual bool FE_Q< dim, spacedim >::has_support_on_face ( const unsigned int  shape_index,
const unsigned int  face_index 
) const [virtual]

Check for non-zero values on a face.

This function returns true, if the shape function shape_index has non-zero values on the face face_index.

Implementation of the interface in FiniteElement

Reimplemented from FiniteElement< dim, spacedim >.

template<int dim, int spacedim = dim>
virtual bool FE_Q< dim, spacedim >::hp_constraints_are_implemented (  )  const [virtual]

Return whether this element implements its hanging node constraints in the new way, which has to be used to make elements "hp compatible".

For the FE_Q class the result is always true (independent of the degree of the element), as it implements the complete set of functions necessary for hp capability.

Reimplemented from FiniteElement< dim, spacedim >.

template<int dim, int spacedim = dim>
virtual std::vector<std::pair<unsigned int, unsigned int> > FE_Q< dim, spacedim >::hp_vertex_dof_identities ( const FiniteElement< dim, spacedim > &  fe_other  )  const [virtual]

If, on a vertex, several finite elements are active, the hp code first assigns the degrees of freedom of each of these FEs different global indices. It then calls this function to find out which of them should get identical values, and consequently can receive the same global DoF index. This function therefore returns a list of identities between DoFs of the present finite element object with the DoFs of fe_other, which is a reference to a finite element object representing one of the other finite elements active on this particular vertex. The function computes which of the degrees of freedom of the two finite element objects are equivalent, and returns a list of pairs of global dof indices in identities. The first index of each pair denotes one of the vertex dofs of the present element, whereas the second is the corresponding index of the other finite element.

Reimplemented from FiniteElement< dim, spacedim >.

template<int dim, int spacedim = dim>
virtual std::vector<std::pair<unsigned int, unsigned int> > FE_Q< dim, spacedim >::hp_line_dof_identities ( const FiniteElement< dim, spacedim > &  fe_other  )  const [virtual]

Same as hp_vertex_dof_indices(), except that the function treats degrees of freedom on lines.

Reimplemented from FiniteElement< dim, spacedim >.

template<int dim, int spacedim = dim>
virtual std::vector<std::pair<unsigned int, unsigned int> > FE_Q< dim, spacedim >::hp_quad_dof_identities ( const FiniteElement< dim, spacedim > &  fe_other  )  const [virtual]

Same as hp_vertex_dof_indices(), except that the function treats degrees of freedom on quads.

Reimplemented from FiniteElement< dim, spacedim >.

template<int dim, int spacedim = dim>
virtual FiniteElementDomination::Domination FE_Q< dim, spacedim >::compare_for_face_domination ( const FiniteElement< dim, spacedim > &  fe_other  )  const [virtual]

Return whether this element dominates the one given as argument when they meet at a common face, whether it is the other way around, whether neither dominates, or if either could dominate.

For a definition of domination, see FiniteElementBase::Domination and in particular the hp paper.

Reimplemented from FiniteElement< dim, spacedim >.

template<int dim, int spacedim = dim>
virtual unsigned int FE_Q< dim, spacedim >::memory_consumption (  )  const [virtual]

Determine an estimate for the memory consumption (in bytes) of this object.

This function is made virtual, since finite element objects are usually accessed through pointers to their base class, rather than the class itself.

Reimplemented from FiniteElement< dim, spacedim >.

template<int dim, int spacedim = dim>
virtual FiniteElement<dim,spacedim>* FE_Q< dim, spacedim >::clone (  )  const [protected, virtual]

clone function instead of a copy constructor.

This function is needed by the constructors of FESystem.

Implements FiniteElement< dim, spacedim >.

template<int dim, int spacedim = dim>
static std::vector<unsigned int> FE_Q< dim, spacedim >::get_dpo_vector ( const unsigned int  degree  )  [static, private]

Only for internal use. Its full name is get_dofs_per_object_vector function and it creates the dofs_per_object vector that is needed within the constructor to be passed to the constructor of FiniteElementData.

template<int dim, int spacedim = dim>
static std::vector<unsigned int> FE_Q< dim, spacedim >::face_lexicographic_to_hierarchic_numbering ( const unsigned int  degree  )  [static, private]

This is an analogon to the FETools::lexicographic_to_hierarchic_numbering function, but working on faces. Called from the constructor.

template<int dim, int spacedim = dim>
void FE_Q< dim, spacedim >::initialize_constraints (  )  [private]

Initialize the hanging node constraints matrices. Called from the constructor.

template<int dim, int spacedim = dim>
void FE_Q< dim, spacedim >::initialize_embedding (  )  [private]

Initialize the embedding matrices. Called from the constructor.

template<int dim, int spacedim = dim>
void FE_Q< dim, spacedim >::initialize_restriction (  )  [private]

Initialize the restriction matrices. Called from the constructor.

template<int dim, int spacedim = dim>
void FE_Q< dim, spacedim >::initialize_unit_support_points (  )  [private]

Initialize the unit_support_points field of the FiniteElement class. Called from the constructor.

template<int dim, int spacedim = dim>
void FE_Q< dim, spacedim >::initialize_unit_support_points ( const Quadrature< 1 > &  points  )  [private]

Initialize the unit_support_points field of the FiniteElement class. Called from the constructor in case the finite element is based on quadrature points.

template<int dim, int spacedim = dim>
void FE_Q< dim, spacedim >::initialize_unit_face_support_points (  )  [private]

Initialize the unit_face_support_points field of the FiniteElement class. Called from the constructor.

template<int dim, int spacedim = dim>
void FE_Q< dim, spacedim >::initialize_unit_face_support_points ( const Quadrature< 1 > &  points  )  [private]

Initialize the unit_face_support_points field of the FiniteElement class. Called from the constructor in case the finite element is based on quadrature points.

template<int dim, int spacedim = dim>
void FE_Q< dim, spacedim >::initialize_quad_dof_index_permutation (  )  [private]

Initialize the adjust_quad_dof_index_for_face_orientation_table field of the FiniteElement class. Called from the constructor.

template<>
void FE_Q< 1 >::initialize_unit_face_support_points (  )  [inline]

template<>
std::vector< unsigned int > FE_Q< 1 >::face_lexicographic_to_hierarchic_numbering ( const unsigned  int  )  [inline]

template<>
void FE_Q< 1, 2 >::initialize_unit_face_support_points (  )  [inline]

template<>
std::vector< unsigned int > FE_Q< 1, 2 >::face_lexicographic_to_hierarchic_numbering ( const unsigned  int  )  [inline]


Friends And Related Function Documentation

template<int dim, int spacedim = dim>
friend class FE_Q [friend]

Allow access from other dimensions. We need this since we want to call the functions get_dpo_vector and lexicographic_to_hierarchic_numbering for the faces of the finite element of dimension dim+1.

template<int dim, int spacedim = dim>
friend class FE_Q< dim, spacedim >::Implementation [friend]


Member Data Documentation

template<int dim, int spacedim = dim>
const std::vector<unsigned int> FE_Q< dim, spacedim >::face_index_map [private]

Mapping from hierarchic to lexicographic numbering on first face. Hierarchic is the numbering of the shape functions.


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

deal.II documentation generated on Sat Aug 15 16:51:54 2009 by doxygen 1.5.9