Intrepid2
|
A basis that is the direct sum of two other bases. More...
#include <Intrepid2_DirectSumBasis.hpp>
Public Member Functions | |
Basis_DirectSumBasis (BasisPtr basis1, BasisPtr basis2) | |
Constructor. More... | |
virtual BasisValues < OutputValueType, DeviceType > | allocateBasisValues (TensorPoints< PointValueType, DeviceType > points, const EOperator operatorType=OPERATOR_VALUE) const override |
Allocate BasisValues container suitable for passing to the getValues() variant that takes a TensorPoints container as argument. More... | |
virtual void | getDofCoords (ScalarViewType dofCoords) const override |
Fills in spatial locations (coordinates) of degrees of freedom (nodes) on the reference cell. More... | |
virtual void | getDofCoeffs (ScalarViewType dofCoeffs) const override |
Fills in coefficients of degrees of freedom for Lagrangian basis on the reference cell. More... | |
virtual const char * | getName () const override |
Returns basis name. More... | |
virtual void | getValues (BasisValues< OutputValueType, DeviceType > outputValues, const TensorPoints< PointValueType, DeviceType > inputPoints, const EOperator operatorType=OPERATOR_VALUE) const override |
Evaluation of a FEM basis on a reference cell, using point and output value containers that allow preservation of tensor-product structure. More... | |
virtual void | getValues (OutputViewType outputValues, const PointViewType inputPoints, const EOperator operatorType=OPERATOR_VALUE) const override |
Evaluation of a FEM basis on a reference cell. More... | |
virtual int | getNumTensorialExtrusions () const override |
Protected Attributes | |
BasisPtr | basis1_ |
BasisPtr | basis2_ |
std::string | name_ |
A basis that is the direct sum of two other bases.
The direct-sum basis is ordered such that the Basis1 members come first (and in the same order as they exist in Basis1), followed by the members of Basis2, in the same order as they exist in Basis2.
The two bases must agree in their BasisType (the return value of getBasisType()).
Definition at line 33 of file Intrepid2_DirectSumBasis.hpp.
|
inline |
Constructor.
[in] | basis1 | - the instance of Basis1 |
[in] | basis2 | - the instance of Basis2 |
Definition at line 59 of file Intrepid2_DirectSumBasis.hpp.
|
inlineoverridevirtual |
Allocate BasisValues container suitable for passing to the getValues() variant that takes a TensorPoints container as argument.
The default implementation employs a trivial tensor-product structure, for compatibility across all bases. Subclasses that have tensor-product structure should override. Note that only the basic exact-sequence operators are supported at the moment: VALUE, GRAD, DIV, CURL.
Definition at line 182 of file Intrepid2_DirectSumBasis.hpp.
|
inlineoverridevirtual |
Fills in coefficients of degrees of freedom for Lagrangian basis on the reference cell.
[out] | dofCoeffs | - the container into which to place the degrees of freedom. |
dofCoeffs have shape (F,D) or (F) if D=1, field dimension matches the cardinality of the basis, and D is the basis dimension.
Degrees of freedom coefficients are such that (dofCoords_(j)) dofCoeffs_(j) = , where are the basis and the Kronecker delta. Note that getDofCoeffs() is supported only for Lagrangian bases.
Definition at line 271 of file Intrepid2_DirectSumBasis.hpp.
|
inlineoverridevirtual |
Fills in spatial locations (coordinates) of degrees of freedom (nodes) on the reference cell.
[out] | dofCoords | - the container into which to place the degrees of freedom. |
dofCoords should have shape (F,D), where the field dimension matches the cardinality of the basis, and D is the spatial dimension of the topology on which the basis is defined.
Note that getDofCoords() is not supported by all bases; in particular, hierarchical bases do not generally support this.
Definition at line 248 of file Intrepid2_DirectSumBasis.hpp.
|
inlineoverridevirtual |
Returns basis name.
Reimplemented in Intrepid2::Basis_Derived_HCURL_HEX< HGRAD_LINE, HVOL_LINE >, Intrepid2::Basis_Derived_HDIV_HEX< HGRAD_LINE, HVOL_LINE >, Intrepid2::Basis_Derived_HCURL_WEDGE< HGRAD_TRI, HCURL_TRI, HGRAD_LINE, HVOL_LINE >, Intrepid2::Basis_Derived_HDIV_WEDGE< HDIV_TRI, HVOL_TRI, HGRAD_LINE, HVOL_LINE >, Intrepid2::Basis_Derived_HDIV_QUAD< HGRAD_LINE, HVOL_LINE >, and Intrepid2::Basis_Derived_HCURL_QUAD< HGRAD_LINE, HVOL_LINE >.
Definition at line 290 of file Intrepid2_DirectSumBasis.hpp.
Referenced by Intrepid2::Basis_Derived_HCURL_HEX< HGRAD_LINE, HVOL_LINE >::Basis_Derived_HCURL_HEX(), Intrepid2::Basis_Derived_HCURL_QUAD< HGRAD_LINE, HVOL_LINE >::Basis_Derived_HCURL_QUAD(), Intrepid2::Basis_Derived_HCURL_WEDGE< HGRAD_TRI, HCURL_TRI, HGRAD_LINE, HVOL_LINE >::Basis_Derived_HCURL_WEDGE(), Intrepid2::Basis_Derived_HDIV_HEX< HGRAD_LINE, HVOL_LINE >::Basis_Derived_HDIV_HEX(), Intrepid2::Basis_Derived_HDIV_QUAD< HGRAD_LINE, HVOL_LINE >::Basis_Derived_HDIV_QUAD(), and Intrepid2::Basis_Derived_HDIV_WEDGE< HDIV_TRI, HVOL_TRI, HGRAD_LINE, HVOL_LINE >::Basis_Derived_HDIV_WEDGE().
|
inlineoverridevirtual |
Evaluation of a FEM basis on a reference cell, using point and output value containers that allow preservation of tensor-product structure.
Returns values of operatorType acting on FEM basis functions for a set of points in the reference cell for which the basis is defined.
outputValues | [out] - variable rank array with the basis values. Should be allocated using Basis::allocateBasisValues(). |
inputPoints | [in] - rank-2 array (P,D) with the evaluation points. This should be allocated using Cubature::allocateCubaturePoints() and filled using Cubature::getCubature(). |
operatorType | [in] - the operator acting on the basis function |
This is the preferred getValues() method for TensorBasis and DirectSumBasis and their subclasses. It allows a reduced memory footprint and optimized integration, etc.
Definition at line 312 of file Intrepid2_DirectSumBasis.hpp.
|
inlineoverridevirtual |
Evaluation of a FEM basis on a reference cell.
Returns values of operatorType acting on FEM basis functions for a set of points in the reference cell for which the basis is defined.
outputValues | [out] - variable rank array with the basis values |
inputPoints | [in] - rank-2 array (P,D) with the evaluation points |
operatorType | [in] - the operator acting on the basis functions |
Definition at line 346 of file Intrepid2_DirectSumBasis.hpp.