<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello everyone,<br>
<br>
I was wondering, before looping over the quadrature points in a
local operator, how can I get the total number of quadrature points?<br>
<br>
Context:<br>
I am trying to evaluate some variables on each quadrature point as a
post process:<br>
Something like:<br>
_____________________________________________________________________________________<br>
<small> // Loop over each volume<br>
LeafIterator beginElem = gv.template begin< 0 ,
Dune::Interior_Partition >();<br>
LeafIterator endElem = gv.template end< 0 ,
Dune::Interior_Partition >();<br>
<br>
// Iterate over each element<br>
for ( LeafIterator self = beginElem; self!= endElem;
++self )<br>
{<br>
int elementNumber = indexSet.index(*self);<br>
<br>
// matrix for storing the variables at each quadrature
point of the current volume<br>
std::vector< std::vector<double> > vars(
no_of_vars );<br>
for (size_type i=0; i< no_of_vars ; i++){<br>
vars[i] = std::vector<double> ( <b>no_of_quadrature_points</b>
, 0. );<br>
}<br>
<br>
// select quadrature rule<br>
Dune::GeometryType gt = (*self).geometry().type();<br>
const Dune::QuadratureRule<DF,dim>& rule =
Dune::QuadratureRules<DF,dim>::rule(gt,2/*intorder*/);<br>
// loop over quadrature points<br>
for (typename
Dune::QuadratureRule<DF,dim>::const_iterator
it=rule.begin(); it!=rule.end(); ++it){<br>
.... SOME_CALCULATIONS_FOR_THE_VARS ....<br>
}<br>
}</small><br>
_____________________________________________________________________________________<br>
<br>
<br>
Thanks in advance, and best regards,<br>
Shubhangi<br>
</body>
</html>