for (unsigned int i2 = 0; i2 < q2.size(); ++i2)
for (unsigned int i1 = 0; i1 < q1.size(); ++i1)
{
- // compose coordinates of
- // new quadrature point by tensor
- // product in the last component
+ // compose coordinates of new quadrature point by tensor product in the
+ // last component
for (unsigned int d = 0; d < dim - 1; ++d)
quadrature_points[present_index](d) = q1.point(i1)(d);
quadrature_points[present_index](dim - 1) = q2.point(i2)(0);
double sum = 0;
for (unsigned int i = 0; i < size(); ++i)
sum += weights[i];
- // we cannot guarantee the sum of weights
- // to be exactly one, but it should be
- // near that.
+ // we cannot guarantee the sum of weights to be exactly one, but it should
+ // be near that.
Assert((sum > 0.999999) && (sum < 1.000001), ExcInternalError());
}
#endif
unsigned int present_index = 0;
for (unsigned int i2 = 0; i2 < q2.size(); ++i2)
{
- // compose coordinates of
- // new quadrature point by tensor
- // product in the last component
+ // compose coordinates of new quadrature point by tensor product in the
+ // last component
quadrature_points[present_index](0) = q2.point(i2)(0);
weights[present_index] = q2.weight(i2);
double sum = 0;
for (unsigned int i = 0; i < size(); ++i)
sum += weights[i];
- // we cannot guarantee the sum of weights
- // to be exactly one, but it should be
- // near that.
+ // we cannot guarantee the sum of weights to be exactly one, but it should
+ // be near that.
Assert((sum > 0.999999) && (sum < 1.000001), ExcInternalError());
}
# endif
Quadrature<0>::Quadrature(const Quadrature<1> &)
: Subscriptor()
,
- // quadrature_points(1),
+ // quadrature_points(1),
weights(1, 1.)
, is_tensor_product_flag(false)
{}
Quadrature<1>::Quadrature(const Quadrature<0> &)
: Subscriptor()
{
- // this function should never be
- // called -- this should be the
- // copy constructor in 1d...
+ // this function should never be called -- this should be the copy constructor
+ // in 1d...
Assert(false, ExcImpossibleInDim(1));
}
#endif // DOXYGEN
Assert(n_copies > 0, ExcZero());
if (!internal::QIteratedImplementation::uses_both_endpoints(base_quadrature))
- // we don't have to skip some
- // points in order to get a
- // reasonable quadrature formula
+ // we don't have to skip some points in order to get a reasonable quadrature
+ // formula
{
unsigned int next_point = 0;
for (unsigned int copy = 0; copy < n_copies; ++copy)
{
unsigned int next_point = 0;
- // first find out the weights of
- // the left and the right boundary
- // points. note that these usually
- // are but need not necessarily be
- // the same
+ // first find out the weights of the left and the right boundary points.
+ // note that these usually are but need not necessarily be the same
double double_point_weight = 0;
unsigned int n_end_points = 0;
for (unsigned int i = 0; i < base_quadrature.size(); ++i)
- // add up the weight if this
- // is an endpoint
+ // add up the weight if this is an endpoint
if ((base_quadrature.point(i) == Point<1>(0.0)) ||
(base_quadrature.point(i) == Point<1>(1.0)))
{
// scale the weight correctly
double_point_weight /= n_copies;
- // make sure the base quadrature formula
- // has only one quadrature point
- // per end point
+ // make sure the base quadrature formula has only one quadrature point per
+ // end point
Assert(n_end_points == 2, ExcInvalidQuadratureFormula());
for (unsigned int q_point = 0; q_point < base_quadrature.size();
++q_point)
{
- // skip the left point of
- // this copy since we
- // have already entered
- // it the last time
+ // skip the left point of this copy since we have already entered it
+ // the last time
if ((copy > 0) && (base_quadrature.point(q_point) == Point<1>(0.0)))
continue;
Point<1>(base_quadrature.point(q_point)(0) / n_copies +
(1.0 * copy) / n_copies);
- // if this is the
- // rightmost point of one
- // of the non-last
- // copies: give it the
- // double weight
+ // if this is the rightmost point of one of the non-last copies:
+ // give it the double weight
if ((copy != n_copies - 1) &&
(base_quadrature.point(q_point) == Point<1>(1.0)))
this->weights[next_point] = double_point_weight;