Public Member Functions | |
| Lagrange (int order) | |
| bool | supportsCellTypePair (const CellType &maximalCellType, const CellType &cellType) const |
| Inform caller as to whether a given cell type is supported. | |
| void | print (std::ostream &os) const |
| int | order () const |
| int | nReferenceDOFsWithoutFacets (const CellType &maximalCellType, const CellType &cellType) const |
| return the number of nodes for this basis on the given cell type | |
| 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. | |
| 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. | |
| void | getConstrainsForHNDoF (const int indexInParent, const int maxCellDim, const int maxNrChild, const int facetDim, const int facetIndex, const int nodeIndex, Array< int > &localDoFs, Array< int > &parentFacetDim, Array< int > &parentFacetIndex, Array< int > &parentFacetNode, Array< double > &coefs) |
| constraints for hanging DoFs | |
Handleable interface | |
| int | order_ |
| bool | doFInfromationCalculated_ |
| Array< int > | facetD_ |
| For each DoF the dimension of the element which is the DoF on. | |
| Array< int > | facetI_ |
| For each DoF the facet index of the element. | |
| Array< int > | facetN_ |
| For each DoF the facet index of the element. | |
| std::string | description () const |
| static Array< int > | makeRange (int low, int high) |
| void | evalOnLine (const Point &pt, const MultiIndex &deriv, Array< double > &result) const |
| evaluate on a line cell | |
| void | evalOnTriangle (const Point &pt, const MultiIndex &deriv, Array< double > &result) const |
| evaluate on a triangle cell | |
| void | evalOnquad (const Point &pt, const MultiIndex &deriv, Array< double > &result) const |
| evaluate on a quad cell | |
| void | evalOnTet (const Point &pt, const MultiIndex &deriv, Array< double > &result) const |
| evaluate on a tet cell | |
| void | evalOnBrick (const Point &pt, const MultiIndex &deriv, Array< double > &result) const |
| evaluate on a tet cell | |
| void | returnDoFPositionOnRef (const int maxCellDim, const int facetDim, const int facetIndex, const int nodeIndex, Point &pos) const |
| get the exact position one DoF on the Ref Element this is needed for the treatment of hanging nodes | |
| void | getDoFsOrdered (const CellType maxCellDim, int nrDoF, Array< int > &facetD, Array< int > &facetI, Array< int > &facetN) |
| This method calls the "getReferenceDOFs" method and then for each DoF extracts the facet dimension, facet index and node in 3 different array This method could be used for general purpose for other basis, where HN is possible. | |
Lagrange basis.
Definition at line 43 of file SundanceLagrange.hpp.
| Lagrange::Lagrange | ( | int | order | ) |
Definition at line 45 of file SundanceLagrange.cpp.
| std::string Sundance::Lagrange::description | ( | ) | const [inline] |
Definition at line 102 of file SundanceLagrange.hpp.
References order(), and Sundance::toString().
| void Lagrange::evalOnBrick | ( | const Point & | pt, |
| const MultiIndex & | deriv, | ||
| Array< double > & | result | ||
| ) | const [private] |
evaluate on a tet cell
Definition at line 628 of file SundanceLagrange.cpp.
References Sundance::MultiIndex::firstOrderDirection(), Sundance::MultiIndex::order(), order_, SUNDANCE_ERROR, SUNDANCE_ERROR7, and Sundance::value.
Referenced by refEval().
| void Lagrange::evalOnLine | ( | const Point & | pt, |
| const MultiIndex & | deriv, | ||
| Array< double > & | result | ||
| ) | const [private] |
evaluate on a line cell
Definition at line 360 of file SundanceLagrange.cpp.
References Sundance::MultiIndex::order(), order(), order_, and Sundance::value.
Referenced by refEval().
| void Lagrange::evalOnquad | ( | const Point & | pt, |
| const MultiIndex & | deriv, | ||
| Array< double > & | result | ||
| ) | const [private] |
evaluate on a quad cell
Definition at line 506 of file SundanceLagrange.cpp.
References Sundance::MultiIndex::firstOrderDirection(), Sundance::gradient(), Sundance::MultiIndex::order(), order_, SUNDANCE_OUT, Sundance::value, Sundance::ADReal::value(), and Sundance::DefaultObjectWithVerbosity::verb().
Referenced by refEval().
| void Lagrange::evalOnTet | ( | const Point & | pt, |
| const MultiIndex & | deriv, | ||
| Array< double > & | result | ||
| ) | const [private] |
evaluate on a tet cell
Definition at line 571 of file SundanceLagrange.cpp.
References Sundance::MultiIndex::firstOrderDirection(), Sundance::MultiIndex::order(), order_, SUNDANCE_ERROR, SUNDANCE_ERROR7, and Sundance::value.
Referenced by refEval().
| void Lagrange::evalOnTriangle | ( | const Point & | pt, |
| const MultiIndex & | deriv, | ||
| Array< double > & | result | ||
| ) | const [private] |
evaluate on a triangle cell
Definition at line 428 of file SundanceLagrange.cpp.
References Sundance::MultiIndex::firstOrderDirection(), Sundance::gradient(), Sundance::MultiIndex::order(), order_, SUNDANCE_ERROR, SUNDANCE_ERROR7, SUNDANCE_OUT, Sundance::value, Sundance::ADReal::value(), and Sundance::DefaultObjectWithVerbosity::verb().
Referenced by refEval().
| void Lagrange::getConstrainsForHNDoF | ( | const int | indexInParent, |
| const int | maxCellDim, | ||
| const int | maxNrChild, | ||
| const int | facetDim, | ||
| const int | facetIndex, | ||
| const int | nodeIndex, | ||
| Array< int > & | localDoFs, | ||
| Array< int > & | parentFacetDim, | ||
| Array< int > & | parentFacetIndex, | ||
| Array< int > & | parentFacetNode, | ||
| Array< double > & | coefs | ||
| ) | [virtual] |
constraints for hanging DoFs
Reimplemented from Sundance::BasisReferenceEvaluationBase.
Definition at line 932 of file SundanceLagrange.cpp.
References Sundance::BrickCell, doFInfromationCalculated_, facetD_, facetI_, facetN_, getDoFsOrdered(), Sundance::QuadCell, refEval(), returnDoFPositionOnRef(), SUNDANCE_OUT, and Sundance::DefaultObjectWithVerbosity::verb().
| void Lagrange::getDoFsOrdered | ( | const CellType | maxCellDim, |
| int | nrDoF, | ||
| Array< int > & | facetD, | ||
| Array< int > & | facetI, | ||
| Array< int > & | facetN | ||
| ) | [private] |
This method calls the "getReferenceDOFs" method and then for each DoF extracts the facet dimension, facet index and node in 3 different array
This method could be used for general purpose for other basis, where HN is possible.
| maxCellDim | [in] |
| nrDoF | [in] nr of DoF for this element |
| facetD | [out] |
| facetI | [out] |
| facetN | [out] |
Definition at line 1187 of file SundanceLagrange.cpp.
References getReferenceDOFs(), SUNDANCE_OUT, and Sundance::DefaultObjectWithVerbosity::verb().
Referenced by getConstrainsForHNDoF().
| void Lagrange::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 168 of file SundanceLagrange.cpp.
References Sundance::BrickCell, Sundance::ScalarBasis::dim(), Sundance::dimension(), Sundance::LineCell, makeRange(), Sundance::numFacets(), order(), order_, Sundance::PointCell, Sundance::QuadCell, Sundance::TetCell, and Sundance::TriangleCell.
Referenced by getDoFsOrdered().
| Array< int > Lagrange::makeRange | ( | int | low, |
| int | high | ||
| ) | [static, private] |
Definition at line 291 of file SundanceLagrange.cpp.
Referenced by getReferenceDOFs().
| int Lagrange::nReferenceDOFsWithoutFacets | ( | const CellType & | maximalCellType, |
| const CellType & | cellType | ||
| ) | const [virtual] |
return the number of nodes for this basis on the given cell type
Implements Sundance::BasisDOFTopologyBase.
Definition at line 120 of file SundanceLagrange.cpp.
References Sundance::BrickCell, Sundance::LineCell, order_, Sundance::PointCell, Sundance::QuadCell, Sundance::TetCell, and Sundance::TriangleCell.
| int Sundance::Lagrange::order | ( | ) | const [inline, virtual] |
Implements Sundance::BasisFamilyBase.
Definition at line 61 of file SundanceLagrange.hpp.
References order_.
Referenced by description(), evalOnLine(), Sundance::ExprFieldWrapper::ExprFieldWrapper(), getReferenceDOFs(), Sundance::DOFMapBuilder::hasCellBasis(), Sundance::DOFMapBuilder::hasNodalBasis(), and returnDoFPositionOnRef().
| void Lagrange::print | ( | std::ostream & | os | ) | const [virtual] |
Implements Sundance::Printable.
Definition at line 115 of file SundanceLagrange.cpp.
References order_.
| void Lagrange::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 300 of file SundanceLagrange.cpp.
References Sundance::BrickCell, evalOnBrick(), evalOnLine(), evalOnquad(), evalOnTet(), evalOnTriangle(), Sundance::SpatialDerivSpecifier::isIdentity(), Sundance::SpatialDerivSpecifier::isPartial(), Sundance::LineCell, Sundance::SpatialDerivSpecifier::mi(), Sundance::PointCell, Sundance::QuadCell, Sundance::TetCell, and Sundance::TriangleCell.
Referenced by getConstrainsForHNDoF().
| void Lagrange::returnDoFPositionOnRef | ( | const int | maxCellDim, |
| const int | facetDim, | ||
| const int | facetIndex, | ||
| const int | nodeIndex, | ||
| Point & | pos | ||
| ) | const [private] |
get the exact position one DoF on the Ref Element this is needed for the treatment of hanging nodes
| maxCellDim | [in] the MaxCell dim of this element |
| facetDim | [in] the facet dim which the DoF is on |
| facetIndex | [in] the facet index which the DoF is on |
| nodeIndex | [in] the node index of the DoF |
| pos | [out] the position of the DoF |
Definition at line 1106 of file SundanceLagrange.cpp.
References order().
Referenced by getConstrainsForHNDoF().
| bool Lagrange::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 53 of file SundanceLagrange.cpp.
References Sundance::BrickCell, Sundance::LineCell, Sundance::PointCell, Sundance::QuadCell, Sundance::TetCell, and Sundance::TriangleCell.
bool Sundance::Lagrange::doFInfromationCalculated_ [private] |
Definition at line 166 of file SundanceLagrange.hpp.
Referenced by getConstrainsForHNDoF().
Array<int> Sundance::Lagrange::facetD_ [private] |
For each DoF the dimension of the element which is the DoF on.
Definition at line 169 of file SundanceLagrange.hpp.
Referenced by getConstrainsForHNDoF().
Array<int> Sundance::Lagrange::facetI_ [private] |
For each DoF the facet index of the element.
Definition at line 172 of file SundanceLagrange.hpp.
Referenced by getConstrainsForHNDoF().
Array<int> Sundance::Lagrange::facetN_ [private] |
For each DoF the facet index of the element.
Definition at line 175 of file SundanceLagrange.hpp.
Referenced by getConstrainsForHNDoF().
int Sundance::Lagrange::order_ [private] |
Definition at line 106 of file SundanceLagrange.hpp.
Referenced by evalOnBrick(), evalOnLine(), evalOnquad(), evalOnTet(), evalOnTriangle(), getReferenceDOFs(), nReferenceDOFsWithoutFacets(), order(), and print().