Sundance::BasisDOFTopologyBase Class Reference

Inheritance diagram for Sundance::BasisDOFTopologyBase:

Sundance::BasisFamilyBase Sundance::ScalarBasis Sundance::ScalarBasis Sundance::VectorBasis Sundance::VectorBasisComponent Sundance::Bernstein Sundance::Bubble Sundance::CubicHermite Sundance::EdgeLocalizedBasis Sundance::Fourier Sundance::Lagrange Sundance::Legendre Sundance::Bernstein Sundance::Bubble Sundance::CubicHermite Sundance::EdgeLocalizedBasis Sundance::Fourier Sundance::Lagrange Sundance::Legendre Sundance::HCurlVectorBasis Sundance::HDivVectorBasis

List of all members.

Public Member Functions

virtual bool supportsCellTypePair (const CellType &maximalCellType, const CellType &cellType) const =0
 Inform caller as to whether a given combination of cell types is supported.
virtual void getReferenceDOFs (const CellType &maximalCellType, const CellType &cellType, Array< Array< Array< int > > > &dofs) const =0
 Get a description of the DOF numbering and distribution scheme for this basis function on the given cell type.
virtual int nReferenceDOFsWithFacets (const CellType &maximalCellType, const CellType &cellType) const
 Return the total number of degrees of freedom associated with this basis on a specified cell type. Note: the count returned by this function includes DOFs owned by facets of the specified reference cell.
virtual int nReferenceDOFsWithoutFacets (const CellType &maximalCellType, const CellType &cellType) const =0
 Return the total number of degrees of freedom associated with this basis on a specified cell type. Note: the count returned by this function DOES NOT include DOFs owned by facets of the specified reference cell.
virtual bool lessThan (const BasisDOFTopologyBase *other) const =0
 Comparison function allowing use of OrderedHandle<BasisFamilyBase> in sorted containers. This is needed by the MixedDOFMap ctor when it uses an STL map to group functions having the same bases into chunks.

Related Functions

(Note that these are not member functions.)

Array< RCP
< BasisDOFTopologyBase > > 
replicate (const RCP< BasisDOFTopologyBase > &model, int n)


Detailed Description

Abstract interface for specification of the topology of degree-of-freedom (DOF) assignments on reference cells in any dimension. Currently, only an enumerated set of cell types are supported (see CellType).

A function $g(x)$ defined on a cell is represented as:

\[ g(x) = \sum_{i=0}^{N-1} \bar{g}_i \psi_i(x) \]

where $x\in\Re^{D}$ is the spatial spatial coordinate for spatical dim $D$ that lives in the cell's domain, $\psi_i(x)$ is the $i$th basis function (of order = order()), $\bar{g}_i$ is the (constant) coefficient for the $i$th basis function, and $N$ is the number of basis functions. Therefore, given the coefficients of the basis function on the cell $\bar{g}_i$, one can compute the value of the function $g(x)$ on the cell at any point $x$ in the domain of the cell given the above summation formula. This interface refers to the coefficients $\bar{g}_i$ as degrees of freedom (DOFs).

This interface allows the specification basis functions and basis coefficients (i.e. DOFs) to be associated with any of the facets of a cell, including the cell itself without restriction. See the function getLocalDOFs() for how this mapping of DOFs to facets for a single function defined on the cell.

It is important to note that each cell type, i.e. the values of the enum CellType, has a "agreed upon" geometry for the "reference cell" and this geometry must be known by the client of the basis family and the concrete implementations of the basis family.

This is an interoperability interface and is therefore deliberately minimalist.

Definition at line 80 of file SundanceBasisDOFTopologyBase.hpp.


Member Function Documentation

virtual void Sundance::BasisDOFTopologyBase::getReferenceDOFs ( const CellType maximalCellType,
const CellType cellType,
Array< Array< Array< int > > > &  dofs 
) const [pure virtual]

Get a description of the DOF numbering and distribution scheme for this basis function on the given cell type.

Parameters:
cellType [in] Specification of the cell topology
dofs [out] Array of dof numbering information, to be filled in during the call. On output, dofs.size()==dimension(cellType). See description of dofs below for more details.
The DOF description is returned in the nested array dofs, and is to be interpreted as follows: The outer dimension of the description array dofs.size() is cellDim, where cellDim is the spatial dimension of the cell. The DOFs attached to facets are stored in array entries dofs[s] where s=0...cellDim-1. Those associated with the cell body are stored in dofs[cellDim-1]. For cell dofs attached to facets, the dof facetDofIndex associated with the facet facetIndex of facet dimension facetDim is given by:

   dofs[facetDim][facetIndex][faceDofIndex] 

For dofs attached to the cell body, the local DOF within the entire cell is given by dof is given by

   dofs[cellDim][0][dofIndex]

More specifically:

  • dof[facetDim].size() gives the number of facets of the facet dimension facetDim, where 0 <= facetDim <= cellDim

  • dof[facetDim][facetIndex].size() gives the number of degrees of freedom (DOFs) on the facet facetIndex with facet dimension facetDim, where 0 <= facetDim <= cellDim and 0 <= facetIndex < numFacets(cellType,facetDim).

For example, the Lagrange basis functions of order 0 through 3 on 2D triangles would have the following dof arrays:


   Order 0:

   { {}, {}, {{0}} }
   
   Order 1:

   { { {0}, {1}, {2} }, {}, {} }
    
   Order 2:

   { { {0}, {1}, {2} }, { {3}, {4}, {5} }, {} }
    
   Order 3:

   { { {0}, {1}, {2} }, { {3,4}, {5,6}, {7,8} }, {9} }

   

Above, we have used the ordering given in Hughes' textbook.

Implemented in Sundance::Bernstein, Sundance::Bubble, Sundance::CubicHermite, Sundance::EdgeLocalizedBasis, Sundance::Fourier, Sundance::Lagrange, Sundance::Legendre, Sundance::Nedelec, Sundance::RaviartThomas, and Sundance::VectorBasisComponent.

virtual bool Sundance::BasisDOFTopologyBase::lessThan ( const BasisDOFTopologyBase other  )  const [pure virtual]

Comparison function allowing use of OrderedHandle<BasisFamilyBase> in sorted containers. This is needed by the MixedDOFMap ctor when it uses an STL map to group functions having the same bases into chunks.

Note: this method should normally only be called from within the comparison operator of OrderedHandle, in which context comparisons between different derived types have already been resolved by comparisons of typeid. Thus, we can require that the lessThan() function be called only with an argument whose typeid is equal to that of *this. We recommend that all overriding implementations check that condition.

Parameters:
other [in] Pointer to another basis family object. Precondition: typeid(*this)==typeid(*other).

Implemented in Sundance::BasisFamilyBase, and Sundance::RaviartThomas.

int BasisDOFTopologyBase::nReferenceDOFsWithFacets ( const CellType maximalCellType,
const CellType cellType 
) const [virtual]

Return the total number of degrees of freedom associated with this basis on a specified cell type. Note: the count returned by this function includes DOFs owned by facets of the specified reference cell.

Parameters:
cellType [in] type of cell for which we want DOF information.
maximalCellType [in] maximal-dimension cell type to which the cell is connected. For example, a triangle in 3D could be connected to a prism or to a tetrahedron.
Returns:
Number of DOFs associated with the cell type and its facets.

Reimplemented in Sundance::VectorBasisComponent.

Definition at line 39 of file SundanceBasisDOFTopologyBase.cpp.

References Sundance::BrickCell, Sundance::LineCell, nReferenceDOFsWithoutFacets(), Sundance::PointCell, Sundance::QuadCell, Sundance::TetCell, and Sundance::TriangleCell.

virtual int Sundance::BasisDOFTopologyBase::nReferenceDOFsWithoutFacets ( const CellType maximalCellType,
const CellType cellType 
) const [pure virtual]

Return the total number of degrees of freedom associated with this basis on a specified cell type. Note: the count returned by this function DOES NOT include DOFs owned by facets of the specified reference cell.

Parameters:
cellType [in] type of cell for which we want DOF information.
maximalCellType [in] maximal-dimension cell type to which the cell is connected. For example, a triangle in 3D could be connected to a prism or to a tetrahedron.
Returns:
Number of DOFs associated with the cell type.

Implemented in Sundance::Bernstein, Sundance::Bubble, Sundance::CubicHermite, Sundance::EdgeLocalizedBasis, Sundance::Fourier, Sundance::Lagrange, Sundance::Legendre, Sundance::Nedelec, Sundance::RaviartThomas, and Sundance::VectorBasisComponent.

Referenced by nReferenceDOFsWithFacets().

virtual bool Sundance::BasisDOFTopologyBase::supportsCellTypePair ( const CellType maximalCellType,
const CellType cellType 
) const [pure virtual]

Inform caller as to whether a given combination of cell types is supported.

Parameters:
maximalCellType [in] maximal-dimension cell type to which the cell is connected. For example, a triangle in 3D could be connected to a prism or to a tetrahedron.
cellType [in] type of cell for which we want DOF information.

Implemented in Sundance::Bernstein, Sundance::Bubble, Sundance::CubicHermite, Sundance::EdgeLocalizedBasis, Sundance::Fourier, Sundance::Lagrange, Sundance::Legendre, Sundance::Nedelec, Sundance::RaviartThomas, and Sundance::VectorBasisComponent.


Friends And Related Function Documentation

Array< RCP< BasisDOFTopologyBase > > replicate ( const RCP< BasisDOFTopologyBase > &  model,
int  n 
) [related]

Definition at line 142 of file SundanceMapStructure.cpp.

Site Contact