51 template <
class Scalar,
class ArrayPo
int,
class ArrayWeight>
53 ArrayWeight & cubWeights,
56 int numCubPoints = getNumPoints();
57 int cellDim = getDimension();
59 TEUCHOS_TEST_FOR_EXCEPTION( ( ( (
int)cubPoints.size() < numCubPoints*cellDim ) || ( (
int)cubWeights.size() < numCubPoints ) ),
61 ">>> ERROR (CubatureDirect): Insufficient space allocated for cubature points or weights.");
63 for (
int pointId = 0; pointId < numCubPoints; pointId++) {
64 for (
int dim = 0; dim < cellDim; dim++) {
65 cubPoints(pointId,dim) = cubData->
points_[pointId][dim];
67 cubWeights(pointId) = cubData->
weights_[pointId];
72 template <
class Scalar,
class ArrayPo
int,
class ArrayWeight>
74 ArrayWeight & cubWeights)
const {
75 getCubatureData( cubPoints, cubWeights, &(exposeCubatureData()[degree_]) );
78 template<
class Scalar,
class ArrayPo
int,
class ArrayWeight>
80 ArrayWeight& cubWeights,
81 ArrayPoint& cellCoords)
const
83 TEUCHOS_TEST_FOR_EXCEPTION( (
true), std::logic_error,
84 ">>> ERROR (CubatureDirect): Cubature defined in reference space calling method for physical space cubature.");
89 template <
class Scalar,
class ArrayPo
int,
class ArrayWeight>
91 return exposeCubatureData()[degree_].numPoints_;
96 template <
class Scalar,
class ArrayPo
int,
class ArrayWeight>
103 template <
class Scalar,
class ArrayPo
int,
class ArrayWeight>
105 accuracy.assign(1, degree_);
virtual void getCubatureData(ArrayPoint &cubPoints, ArrayWeight &cubWeights, const CubatureTemplate *cubData) const
Extracts points and weights from cubData.
virtual void getAccuracy(std::vector< int > &accuracy) const
Returns max. degree of polynomials that are integrated exactly. The return vector has size 1...
virtual void getCubature(ArrayPoint &cubPoints, ArrayWeight &cubWeights) const
Returns cubature points and weights (return arrays must be pre-sized/pre-allocated).
virtual int getNumPoints() const
Returns the number of cubature points.
virtual int getDimension() const
Returns dimension of integration domain.
Template for the cubature rules used by Intrepid. Cubature template consists of cubature points and c...
double points_[INTREPID_MAX_INTEGRATION_POINTS][INTREPID_MAX_DIMENSION]
Array with the (X,Y,Z) coordinates of the cubature points.
double weights_[INTREPID_MAX_INTEGRATION_POINTS]
Array with the associated cubature weights.