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 int > | face_lexicographic_to_hierarchic_numbering (const unsigned int) |
template<> | |
void | initialize_unit_face_support_points () |
template<> | |
std::vector< unsigned int > | face_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 int > | get_dpo_vector (const unsigned int degree) |
static std::vector< unsigned int > | face_lexicographic_to_hierarchic_numbering (const unsigned int degree) |
Private Attributes | |
const std::vector< unsigned int > | face_index_map |
Friends | |
class | FE_Q |
class | FE_Q< dim, spacedim >::Implementation |
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.
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:
dim==1
interface_constraints
are not needed prolongation
matrices up to degree 4, and restriction
matrices up to degree 4. dim==2
interface_constraints
up to degree 4, prolongation
matrices up to degree 3, and restriction
matrices up to degree 4. dim==3
interface_constraints
up to degree 2, prolongation
matrices up to degree 2, and restriction
matrices up to degree 4. 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:
1D case:
* 0-------1 *
2D case:
* 2-------3 * | | * | | * | | * 0-------1 *
3D case:
* 6-------7 6-------7 * /| | / /| * / | | / / | * / | | / / | * 4 | | 4-------5 | * | 2-------3 | | 3 * | / / | | / * | / / | | / * |/ / | |/ * 0-------1 0-------1 *
The respective coordinate values of the support points of the degrees of freedom are as follows:
[0, 0, 0]
; [1, 0, 0]
; [0, 1, 0]
; [1, 1, 0]
; [0, 0, 1]
; [1, 0, 1]
; [0, 1, 1]
; [1, 1, 1]
; 1D case:
* 0---2---1 *
2D case:
* 2---7---3 * | | * 4 8 5 * | | * 0---6---1 *
3D case:
* 6--15---7 6--15---7 * /| | / /| * 12 | 19 12 1319 * / 18 | / / | * 4 | | 4---14--5 | * | 2---11--3 | | 3 * | / / | 17 / * 16 8 9 16 | 9 * |/ / | |/ * 0---10--1 0---8---1 * * *-------* *-------* * /| | / /| * / | 23 | / 25 / | * / | | / / | * * | | *-------* | * |20 *-------* | |21 * * | / / | 22 | / * | / 24 / | | / * |/ / | |/ * *-------* *-------* *
The center vertex has number 26.
The respective coordinate values of the support points of the degrees of freedom are as follows:
[0, 0, 0]
; [1, 0, 0]
; [0, 1, 0]
; [1, 1, 0]
; [0, 0, 1]
; [1, 0, 1]
; [0, 1, 1]
; [1, 1, 1]
; [0, 1/2, 0]
; [1, 1/2, 0]
; [1/2, 0, 0]
; [1/2, 1, 0]
; [0, 1/2, 1]
; [1, 1/2, 1]
; [1/2, 0, 1]
; [1/2, 1, 1]
; [0, 0, 1/2]
; [1, 0, 1/2]
; [0, 1, 1/2]
; [1, 1, 1/2]
; [0, 1/2, 1/2]
; [1, 1/2, 1/2]
; [1/2, 0, 1/2]
; [1/2, 1, 1/2]
; [1/2, 1/2, 0]
; [1/2, 1/2, 1]
; [1/2, 1/2, 1/2]
; 1D case:
* 0--2--3--1 *
* 2--10-11-3 * | | * 5 14 15 7 * | | * 4 12 13 6 * | | * 0--8--9--1 *
1D case:
* 0--2--3--4--1 *
* 2--13-14-15-3 * | | * 6 22 23 24 9 * | | * 5 19 20 21 8 * | | * 4 16 17 18 7 * | | * 0--10-11-12-1 *
Constructor for tensor product polynomials of degree p
.
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.
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 >.
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.
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.
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.
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 >.
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 >.
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.
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.
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.
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.
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 >.
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 >.
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
.
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.
void FE_Q< dim, spacedim >::initialize_constraints | ( | ) | [private] |
Initialize the hanging node constraints matrices. Called from the constructor.
void FE_Q< dim, spacedim >::initialize_embedding | ( | ) | [private] |
Initialize the embedding matrices. Called from the constructor.
void FE_Q< dim, spacedim >::initialize_restriction | ( | ) | [private] |
Initialize the restriction matrices. Called from the constructor.
void FE_Q< dim, spacedim >::initialize_unit_support_points | ( | ) | [private] |
Initialize the unit_support_points
field of the FiniteElement class. Called from the constructor.
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.
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.
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.
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.
void FE_Q< 1 >::initialize_unit_face_support_points | ( | ) | [inline] |
std::vector< unsigned int > FE_Q< 1 >::face_lexicographic_to_hierarchic_numbering | ( | const unsigned | int | ) | [inline] |
void FE_Q< 1, 2 >::initialize_unit_face_support_points | ( | ) | [inline] |
std::vector< unsigned int > FE_Q< 1, 2 >::face_lexicographic_to_hierarchic_numbering | ( | const unsigned | int | ) | [inline] |
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.
friend class FE_Q< dim, spacedim >::Implementation [friend] |
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.