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) |
CellType
).A function defined on a cell is represented as:
where is the spatial spatial coordinate for spatical dim that lives in the cell's domain, is the th basis function (of order = order()
), is the (constant) coefficient for the th basis function, and is the number of basis functions. Therefore, given the coefficients of the basis function on the cell , one can compute the value of the function on the cell at any point in the domain of the cell given the above summation formula. This interface refers to the coefficients 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.
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.
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. |
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.
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.
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. |
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.
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. |
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.
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.
Array< RCP< BasisDOFTopologyBase > > replicate | ( | const RCP< BasisDOFTopologyBase > & | model, | |
int | n | |||
) | [related] |
Definition at line 142 of file SundanceMapStructure.cpp.