19 #include "libmesh/quadrature_gm.h"    20 #include "libmesh/quadrature_gauss.h"    21 #include "libmesh/enum_quadrature_type.h"    22 #include "libmesh/int_range.h"    40   return std::make_unique<QGrundmann_Moller>(*this);
    63   const unsigned int degree = 2*s+1;
    69   const unsigned int n_pts = 
dim==2 ? (s+3)*(s+2)*(s+1) / 6 : (s+4)*(s+3)*(s+2)*(s+1) / 24;
    80   std::vector<std::vector<unsigned int>> permutations;
    86   for (
unsigned int i=0; i<=s; ++i)
    97           for (
unsigned int j=0; j<
dim; ++j)
    99               static_cast<Real>(2.*permutations[p][j] + 1.) /
   100               static_cast<Real>(  degree + 
dim - 2.*i     );
   110       const unsigned int weight_loop_index =
   111         std::max(
dim, std::max(degree, degree+
dim-i))+1;
   113       for (
unsigned int j=1; j<weight_loop_index; ++j)
   124           if (j <= degree+
dim-i) 
   136       offset += permutations.size();
   157                                     std::vector<std::vector<unsigned int>> & result)
   164   std::vector<unsigned int> workspace(p);
   168   result.push_back(workspace);
   171   unsigned int head_value=s;
   180   while (workspace.back() != s)
   192       head_value = workspace[head_index];
   196       workspace[head_index] = 0;
   201       libmesh_assert_greater (head_value, 0);
   202       workspace[0] = head_value - 1;
   205       workspace[head_index+1] += 1;
   208       result.push_back(workspace);
 
virtual void init_1D() override
In 1D, use a Gauss rule. 
virtual QuadratureType type() const override
const std::vector< Real > & get_weights() const
QuadratureType
Defines an enum for currently available quadrature rules. 
The libMesh namespace provides an interface to certain functionality in the library. 
std::vector< Point > _points
The locations of the quadrature points in reference element space. 
std::vector< Real > _weights
The quadrature weights. 
void gm_rule(unsigned int s, unsigned int dim)
This routine is called from init_2D() and init_3D(). 
virtual std::unique_ptr< QBase > clone() const override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::vector< Point > & get_points() const
This class implements specific orders of Gauss quadrature. 
void compose_all(unsigned int s, unsigned int p, std::vector< std::vector< unsigned int >> &result)
Routine which generates p-compositions of a given order, s, as well as permutations thereof...
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...