36 #include "QuadraturePointsGroup.hpp"
39 template<
unsigned DIM>
43 c_vector<double, DIM> unset;
44 for (
unsigned i=0; i<DIM; i++)
50 data.resize(mNumElements*mNumQuadPointsPerElement, unset);
58 unsigned elem_index = iter->GetIndex();
60 c_vector<double, DIM+1> linear_phi;
61 for (
unsigned quad_index=0; quad_index<rQuadRule.
GetNumQuadPoints(); quad_index++)
68 c_vector<double,DIM> physical_quad_point = zero_vector<double>(DIM);
69 for (
unsigned node_index=0; node_index<DIM+1; node_index++)
71 physical_quad_point += linear_phi(node_index)*(iter->GetNode(node_index))->rGetLocation();
75 assert(elem_index<mNumElements);
76 assert(quad_index<mNumQuadPointsPerElement);
77 data[ elem_index*mNumQuadPointsPerElement + quad_index ] = physical_quad_point;
82 template<
unsigned DIM>
85 assert(elementIndex<mNumElements);
86 assert(quadIndex<mNumQuadPointsPerElement);
87 return data[ elementIndex*mNumQuadPointsPerElement + quadIndex ];
90 template<
unsigned DIM>
93 assert(i < mNumElements*mNumQuadPointsPerElement);
97 template<
unsigned DIM>
103 template<
unsigned DIM>
106 return mNumQuadPointsPerElement;
109 template<
unsigned DIM>
112 return mNumElements*mNumQuadPointsPerElement;
ElementIterator GetElementIteratorBegin(bool skipDeletedElements=true)
QuadraturePointsGroup(AbstractTetrahedralMesh< DIM, DIM > &rMesh, GaussianQuadratureRule< DIM > &rQuadRule)
unsigned GetNumElements() const
ElementIterator GetElementIteratorEnd()
virtual unsigned GetNumElements() const
unsigned GetNumQuadPointsPerElement() const
unsigned GetNumQuadPoints() const
const double DOUBLE_UNSET
static void ComputeBasisFunctions(const ChastePoint< ELEMENT_DIM > &rPoint, c_vector< double, ELEMENT_DIM+1 > &rReturnValue)
c_vector< double, DIM > & rGet(unsigned elementIndex, unsigned quadIndex)
const ChastePoint< ELEMENT_DIM > & rGetQuadPoint(unsigned index) const