Lowest-order Raviart-Thomas basis. More...
Public Member Functions | |
| RaviartThomas (int spatialDim) | |
| int | order () const |
| void | print (std::ostream &os) const |
| bool | supportsCellTypePair (const CellType &maximalCellType, const CellType &cellType) const |
| Inform caller as to whether a given cell type is supported. | |
| virtual void | getReferenceDOFs (const CellType &maximalCellType, const CellType &cellType, Array< Array< Array< int > > > &dofs) const |
| Get a description of the DOF numbering and distribution scheme for this basis function on the given cell type. | |
| virtual int | nReferenceDOFsWithoutFacets (const CellType &maximalCellType, const CellType &cellType) const |
| Return the total number of degrees of freedom associated with this basis on a specified cell type. | |
| virtual bool | lessThan (const BasisDOFTopologyBase *other) const |
| Comparison function allowing use of OrderedHandle<BasisFamilyBase> in sorted containers. | |
| std::string | description () const |
| virtual void | refEval (const CellType &cellType, const Array< Point > &pts, const SpatialDerivSpecifier &deriv, Array< Array< Array< double > > > &result, int verbosity=0) const |
| Evaluate the basis functions (or some mixed spatial derivative of the basis functions) for an array of points on the "reference cell" for a given cell type. | |
Lowest-order Raviart-Thomas basis.
Definition at line 43 of file SundanceRaviartThomas.hpp.
| RaviartThomas::RaviartThomas | ( | int | spatialDim | ) |
Definition at line 45 of file SundanceRaviartThomas.cpp.
| std::string RaviartThomas::description | ( | ) | const |
Definition at line 82 of file SundanceRaviartThomas.cpp.
| void RaviartThomas::getReferenceDOFs | ( | const CellType & | maximalCellType, |
| const CellType & | cellType, | ||
| Array< Array< Array< int > > > & | dofs | ||
| ) | const [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. |
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.
Implements Sundance::BasisDOFTopologyBase.
Definition at line 102 of file SundanceRaviartThomas.cpp.
References Sundance::LineCell, Sundance::PointCell, Sundance::TetCell, and Sundance::TriangleCell.
| bool RaviartThomas::lessThan | ( | const BasisDOFTopologyBase * | other | ) | const [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). |
Reimplemented from Sundance::BasisFamilyBase.
Definition at line 139 of file SundanceRaviartThomas.cpp.
References Sundance::typeLessThan().
| int RaviartThomas::nReferenceDOFsWithoutFacets | ( | 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 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. |
Implements Sundance::BasisDOFTopologyBase.
Definition at line 87 of file SundanceRaviartThomas.cpp.
References Sundance::dimension().
| int Sundance::RaviartThomas::order | ( | ) | const [inline, virtual] |
Implements Sundance::BasisFamilyBase.
Definition at line 50 of file SundanceRaviartThomas.hpp.
| void RaviartThomas::print | ( | std::ostream & | os | ) | const [virtual] |
Implements Sundance::Printable.
Definition at line 238 of file SundanceRaviartThomas.cpp.
References Sundance::VectorBasis::dim().
| void RaviartThomas::refEval | ( | const CellType & | cellType, |
| const Array< Point > & | pts, | ||
| const SpatialDerivSpecifier & | deriv, | ||
| Array< Array< Array< double > > > & | result, | ||
| int | verbosity = 0 |
||
| ) | const [virtual] |
Evaluate the basis functions (or some mixed spatial derivative of the basis functions) for an array of points on the "reference cell" for a given cell type.
| cellType | [in] The type of cell on which the basis is currently being evaluated. |
| pts | [in] Array of points on the reference cell (or master cell) where the basis functions are to be computed. |
| deriv | [in] Specification of which differential operator is to be applied to the basis functions. |
| result | [out] On output, gives a triply nested array which contain the basis functions (or the requested basis function derivatives) evaluated at the given points pts. The size of the outer array results is either zero or spatialDim, depending on whether this is a scalar or vector basis, respectively. The size of the next array level is equal to the number of evaluation points. Finally, the size of the innermost array level is equal to the number of DOFs visible from the given cell type. x * Specifically, results[k][pointIndex][basisIndex] -th component of
= deriv[0], = deriv[1] (in 2D or 3D) and = deriv[2] (in 3D) at the point pointIndex (where 0 <= pointIndex < pts.size()) for the basis function = basisIndex (where 0 <= basisIndex < mapStructure.numBasisChunks()). |
Implements Sundance::BasisReferenceEvaluationBase.
Definition at line 148 of file SundanceRaviartThomas.cpp.
References Sundance::MultiIndex::firstOrderDirection(), Sundance::LineCell, Sundance::SpatialDerivSpecifier::mi(), Sundance::MultiIndex::order(), Sundance::PointCell, Sundance::TetCell, Sundance::TriangleCell, and Sundance::ADReal::value().
| bool RaviartThomas::supportsCellTypePair | ( | const CellType & | maximalCellType, |
| const CellType & | cellType | ||
| ) | const [virtual] |
Inform caller as to whether a given cell type is supported.
Implements Sundance::BasisDOFTopologyBase.
Definition at line 49 of file SundanceRaviartThomas.cpp.
References Sundance::LineCell, Sundance::PointCell, Sundance::TetCell, and Sundance::TriangleCell.