49 #ifndef INTREPID_CUBATURE_SPARSE_HPP
50 #define INTREPID_CUBATURE_SPARSE_HPP
52 #include "Intrepid_ConfigDefs.hpp"
55 #include "Intrepid_CubatureSparseHelper.hpp"
56 #include "Teuchos_Assert.hpp"
63 #define INTREPID_CUBATURE_SPARSE2D_GAUSS_MAX 59
69 #define INTREPID_CUBATURE_SPARSE3D_GAUSS_MAX 57
74 template<
class Scalar,
int dimension_,
class ArrayPo
int = FieldContainer<Scalar>,
class ArrayWeight = ArrayPo
int>
99 ArrayWeight & cubWeights)
const;
109 ArrayWeight& cubWeights,
110 ArrayPoint& cellCoords)
const;
123 virtual void getAccuracy(std::vector<int> & accuracy)
const;
129 template<
class Scalar,
int DIM>
130 void iterateThroughDimensions(
int level,
133 Teuchos::Array<Scalar> & partial_node,
134 Scalar partial_weight);
136 inline int factorial(
int num)
155 inline double combination(
int top,
int bot)
157 double answer = factorial(top)/(factorial(bot) * factorial(top-bot));
161 inline int iterateThroughDimensionsForNumCalc(
int dims_left,
165 Teuchos::Array<int> & nodes,
170 for(
int j = 1; j <= levels_left; j++)
172 bool temp_bool = no_uni_quad;
173 int temp_knots = nodes[j-1]*product;
174 int temp_lsf = level_so_far + j;
181 if(temp_lsf < level && temp_bool ==
true)
185 numNodes += temp_knots;
190 numNodes += iterateThroughDimensionsForNumCalc(dims_left-1,level, levels_left-j+1, temp_lsf, nodes, temp_knots, temp_bool);
196 inline int calculateNumPoints(
int dim,
int level)
199 Teuchos::Array<int> uninum(level);
201 for(
int i = 1; i <= level-1; i++)
206 int numOfNodes = iterateThroughDimensionsForNumCalc(dim, level, level, 0, uninum, 1,
true);
virtual void getAccuracy(std::vector< int > &accuracy) const
Returns algebraic accuracy (e.g. max. degree of polynomial that is integrated exactly).
Header file for the Intrepid::CubatureDirectLineGauss class.
virtual int getDimension() const
Returns dimension of the integration domain.
virtual int getNumPoints() const
Returns the number of cubature points.
Definition file for the Intrepid::CubatureSparse class.
Defines the base class for cubature (integration) rules in Intrepid.
virtual void getCubature(ArrayPoint &cubPoints, ArrayWeight &cubWeights) const
Returns cubature points and weights (return arrays must be pre-sized/pre-allocated).
Header file for the Intrepid::Cubature class.