libMesh::QGaussLobatto Class Reference

Implements 1D and 2/3D tensor product Gauss-Lobatto quadrature rules. More...

#include <quadrature_gauss_lobatto.h>

Inheritance diagram for libMesh::QGaussLobatto:

Public Member Functions

 QGaussLobatto (const unsigned int _dim, const Order _order=INVALID_ORDER)
 
 ~QGaussLobatto ()
 
virtual QuadratureType type () const libmesh_override
 
ElemType get_elem_type () const
 
unsigned int get_p_level () const
 
unsigned int n_points () const
 
unsigned int get_dim () const
 
const std::vector< Point > & get_points () const
 
std::vector< Point > & get_points ()
 
const std::vector< Real > & get_weights () const
 
std::vector< Real > & get_weights ()
 
Point qp (const unsigned int i) const
 
Real w (const unsigned int i) const
 
virtual void init (const ElemType type=INVALID_ELEM, unsigned int p_level=0)
 
virtual void init (const Elem &elem, const std::vector< Real > &vertex_distance_func, unsigned int p_level=0)
 
Order get_order () const
 
void print_info (std::ostream &os=libMesh::out) const
 
void scale (std::pair< Real, Real > old_range, std::pair< Real, Real > new_range)
 
virtual bool shapes_need_reinit ()
 

Static Public Member Functions

static UniquePtr< QBasebuild (const std::string &name, const unsigned int dim, const Order order=INVALID_ORDER)
 
static UniquePtr< QBasebuild (const QuadratureType qt, const unsigned int dim, const Order order=INVALID_ORDER)
 
static void print_info (std::ostream &out=libMesh::out)
 
static std::string get_info ()
 
static unsigned int n_objects ()
 
static void enable_print_counter_info ()
 
static void disable_print_counter_info ()
 

Public Attributes

bool allow_rules_with_negative_weights
 

Protected Types

typedef std::map< std::string, std::pair< unsigned int, unsigned int > > Counts
 

Protected Member Functions

virtual void init_0D (const ElemType type=INVALID_ELEM, unsigned int p_level=0)
 
void tensor_product_quad (const QBase &q1D)
 
void tensor_product_hex (const QBase &q1D)
 
void tensor_product_prism (const QBase &q1D, const QBase &q2D)
 
void increment_constructor_count (const std::string &name)
 
void increment_destructor_count (const std::string &name)
 

Protected Attributes

const unsigned int _dim
 
const Order _order
 
ElemType _type
 
unsigned int _p_level
 
std::vector< Point_points
 
std::vector< Real_weights
 

Static Protected Attributes

static Counts _counts
 
static Threads::atomic< unsigned int > _n_objects
 
static Threads::spin_mutex _mutex
 
static bool _enable_print_counter = true
 

Private Member Functions

virtual void init_1D (const ElemType _type=INVALID_ELEM, unsigned int p_level=0) libmesh_override
 
virtual void init_2D (const ElemType _type=INVALID_ELEM, unsigned int p_level=0) libmesh_override
 
virtual void init_3D (const ElemType _type=INVALID_ELEM, unsigned int p_level=0) libmesh_override
 

Detailed Description

Implements 1D and 2/3D tensor product Gauss-Lobatto quadrature rules.

This class implements Gauss-Lobatto quadrature for 1D elements and 2D/3D tensor product elements. Properties of Gauss-Lobatto quadrature rules: .) Include the "end-points" of the domain (have points on edges/faces in 2D/3D). .) Rules with n points can exactly integrate polynomials of degree 2n-3.

http://en.wikipedia.org/wiki/Gaussian_quadrature#Gauss.E2.80.93Lobatto_rules

Author
John W. Peterson
Date
2014

Definition at line 41 of file quadrature_gauss_lobatto.h.

Member Typedef Documentation

typedef std::map<std::string, std::pair<unsigned int, unsigned int> > libMesh::ReferenceCounter::Counts
protectedinherited

Data structure to log the information. The log is identified by the class name.

Definition at line 119 of file reference_counter.h.

Constructor & Destructor Documentation

libMesh::QGaussLobatto::QGaussLobatto ( const unsigned int  _dim,
const Order  _order = INVALID_ORDER 
)

Constructor. Declares the order of the quadrature rule.

Definition at line 33 of file quadrature_gauss_lobatto.C.

References libMesh::QBase::_dim, libMesh::EDGE2, and libMesh::QBase::init().

34  : QBase(d,o)
35 {
36  // explicitly call the init function in 1D since the
37  // other tensor-product rules require this one.
38  // note that EDGE will not be used internally, however
39  // if we called the function with INVALID_ELEM it would try to
40  // be smart and return, thinking it had already done the work.
41  if (_dim == 1)
42  init(EDGE2);
43 }
virtual void init(const ElemType type=INVALID_ELEM, unsigned int p_level=0)
Definition: quadrature.C:28
const unsigned int _dim
Definition: quadrature.h:311
QBase(const unsigned int _dim, const Order _order=INVALID_ORDER)
Definition: quadrature.h:350
libMesh::QGaussLobatto::~QGaussLobatto ( )

Destructor.

Definition at line 47 of file quadrature_gauss_lobatto.C.

48 {
49 }

Member Function Documentation

UniquePtr< QBase > libMesh::QBase::build ( const std::string &  name,
const unsigned int  dim,
const Order  order = INVALID_ORDER 
)
staticinherited

Builds a specific quadrature rule based on the name string. This enables selection of the quadrature rule at run-time. The input parameter name must be mappable through the Utility::string_to_enum<>() function.

This function allocates memory, therefore a UniquePtr<QBase> is returned so that the user does not accidentally leak it.

Definition at line 42 of file quadrature_build.C.

Referenced by libMesh::InfFE< Dim, T_radial, T_map >::attach_quadrature_rule(), and libMesh::QBase::~QBase().

45 {
46  return QBase::build (Utility::string_to_enum<QuadratureType> (type),
47  _dim,
48  _order);
49 }
const unsigned int _dim
Definition: quadrature.h:311
virtual QuadratureType type() const =0
static UniquePtr< QBase > build(const std::string &name, const unsigned int dim, const Order order=INVALID_ORDER)
const Order _order
Definition: quadrature.h:317
UniquePtr< QBase > libMesh::QBase::build ( const QuadratureType  qt,
const unsigned int  dim,
const Order  order = INVALID_ORDER 
)
staticinherited

Builds a specific quadrature rule based on the QuadratureType. This enables selection of the quadrature rule at run-time.

This function allocates memory, therefore a UniquePtr<QBase> is returned so that the user does not accidentally leak it.

Definition at line 53 of file quadrature_build.C.

References libMesh::FIRST, libMesh::FORTYTHIRD, libMesh::out, libMesh::QCLOUGH, libMesh::QCONICAL, libMesh::QGAUSS, libMesh::QGAUSS_LOBATTO, libMesh::QGRID, libMesh::QGRUNDMANN_MOLLER, libMesh::QJACOBI_1_0, libMesh::QJACOBI_2_0, libMesh::QMONOMIAL, libMesh::QSIMPSON, libMesh::QTRAP, libMesh::THIRD, and libMesh::TWENTYTHIRD.

56 {
57  switch (_qt)
58  {
59 
60  case QCLOUGH:
61  {
62 #ifdef DEBUG
63  if (_order > TWENTYTHIRD)
64  {
65  libMesh::out << "WARNING: Clough quadrature implemented" << std::endl
66  << " up to TWENTYTHIRD order." << std::endl;
67  }
68 #endif
69 
70  return UniquePtr<QBase>(new QClough(_dim, _order));
71  }
72 
73  case QGAUSS:
74  {
75 
76 #ifdef DEBUG
77  if (_order > FORTYTHIRD)
78  {
79  libMesh::out << "WARNING: Gauss quadrature implemented" << std::endl
80  << " up to FORTYTHIRD order." << std::endl;
81  }
82 #endif
83 
84  return UniquePtr<QBase>(new QGauss(_dim, _order));
85  }
86 
87  case QJACOBI_1_0:
88  {
89 
90 #ifdef DEBUG
91  if (_order > FORTYTHIRD)
92  {
93  libMesh::out << "WARNING: Jacobi(1,0) quadrature implemented" << std::endl
94  << " up to FORTYTHIRD order." << std::endl;
95  }
96 
97  if (_dim > 1)
98  {
99  libMesh::out << "WARNING: Jacobi(1,0) quadrature implemented" << std::endl
100  << " in 1D only." << std::endl;
101  }
102 #endif
103 
104  return UniquePtr<QBase>(new QJacobi(_dim, _order, 1, 0));
105  }
106 
107  case QJACOBI_2_0:
108  {
109 
110 #ifdef DEBUG
111  if (_order > FORTYTHIRD)
112  {
113  libMesh::out << "WARNING: Jacobi(2,0) quadrature implemented" << std::endl
114  << " up to FORTYTHIRD order." << std::endl;
115  }
116 
117  if (_dim > 1)
118  {
119  libMesh::out << "WARNING: Jacobi(2,0) quadrature implemented" << std::endl
120  << " in 1D only." << std::endl;
121  }
122 #endif
123 
124  return UniquePtr<QBase>(new QJacobi(_dim, _order, 2, 0));
125  }
126 
127  case QSIMPSON:
128  {
129 
130 #ifdef DEBUG
131  if (_order > THIRD)
132  {
133  libMesh::out << "WARNING: Simpson rule provides only" << std::endl
134  << " THIRD order!" << std::endl;
135  }
136 #endif
137 
138  return UniquePtr<QBase>(new QSimpson(_dim));
139  }
140 
141  case QTRAP:
142  {
143 
144 #ifdef DEBUG
145  if (_order > FIRST)
146  {
147  libMesh::out << "WARNING: Trapezoidal rule provides only" << std::endl
148  << " FIRST order!" << std::endl;
149  }
150 #endif
151 
152  return UniquePtr<QBase>(new QTrap(_dim));
153  }
154 
155  case QGRID:
156  return UniquePtr<QBase>(new QGrid(_dim, _order));
157 
158  case QGRUNDMANN_MOLLER:
159  return UniquePtr<QBase>(new QGrundmann_Moller(_dim, _order));
160 
161  case QMONOMIAL:
162  return UniquePtr<QBase>(new QMonomial(_dim, _order));
163 
164  case QGAUSS_LOBATTO:
165  return UniquePtr<QBase>(new QGaussLobatto(_dim, _order));
166 
167  case QCONICAL:
168  return UniquePtr<QBase>(new QConical(_dim, _order));
169 
170  default:
171  libmesh_error_msg("ERROR: Bad qt=" << _qt);
172  }
173 
174 
175  libmesh_error_msg("We'll never get here!");
176  return UniquePtr<QBase>();
177 }
const unsigned int _dim
Definition: quadrature.h:311
OStreamProxy out(std::cout)
const Order _order
Definition: quadrature.h:317
void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited
void libMesh::ReferenceCounter::enable_print_counter_info ( )
staticinherited

Methods to enable/disable the reference counter output from print_info()

Definition at line 101 of file reference_counter.C.

References libMesh::ReferenceCounter::_enable_print_counter.

Referenced by libMesh::ReferenceCounter::n_objects().

102 {
103  _enable_print_counter = true;
104  return;
105 }
unsigned int libMesh::QBase::get_dim ( ) const
inlineinherited
Returns
The spatial dimension of the quadrature rule.

Definition at line 122 of file quadrature.h.

References libMesh::QBase::_dim.

Referenced by libMesh::InfFE< Dim, T_radial, T_map >::attach_quadrature_rule(), libMesh::QConical::conical_product_pyramid(), libMesh::QConical::conical_product_tet(), and libMesh::QConical::conical_product_tri().

122 { return _dim; }
const unsigned int _dim
Definition: quadrature.h:311
ElemType libMesh::QBase::get_elem_type ( ) const
inlineinherited
Returns
The element type we're currently using.

Definition at line 103 of file quadrature.h.

References libMesh::QBase::_type.

103 { return _type; }
ElemType _type
Definition: quadrature.h:323
std::string libMesh::ReferenceCounter::get_info ( )
staticinherited

Gets a string containing the reference information.

Definition at line 47 of file reference_counter.C.

References libMesh::ReferenceCounter::_counts, and libMesh::Quality::name().

Referenced by libMesh::ReferenceCounter::print_info().

48 {
49 #if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
50 
51  std::ostringstream oss;
52 
53  oss << '\n'
54  << " ---------------------------------------------------------------------------- \n"
55  << "| Reference count information |\n"
56  << " ---------------------------------------------------------------------------- \n";
57 
58  for (Counts::iterator it = _counts.begin();
59  it != _counts.end(); ++it)
60  {
61  const std::string name(it->first);
62  const unsigned int creations = it->second.first;
63  const unsigned int destructions = it->second.second;
64 
65  oss << "| " << name << " reference count information:\n"
66  << "| Creations: " << creations << '\n'
67  << "| Destructions: " << destructions << '\n';
68  }
69 
70  oss << " ---------------------------------------------------------------------------- \n";
71 
72  return oss.str();
73 
74 #else
75 
76  return "";
77 
78 #endif
79 }
std::string name(const ElemQuality q)
Definition: elem_quality.C:39
Order libMesh::QBase::get_order ( ) const
inlineinherited
Returns
The order of the quadrature rule.

Definition at line 189 of file quadrature.h.

References libMesh::QBase::_order, libMesh::QBase::_p_level, libMesh::QBase::operator<<, libMesh::out, libMesh::QBase::print_info(), and libMesh::QBase::scale().

Referenced by libMesh::InfFE< Dim, T_radial, T_map >::attach_quadrature_rule().

189 { return static_cast<Order>(_order + _p_level); }
unsigned int _p_level
Definition: quadrature.h:329
const Order _order
Definition: quadrature.h:317
unsigned int libMesh::QBase::get_p_level ( ) const
inlineinherited
Returns
The p-refinement level we're currently using.

Definition at line 108 of file quadrature.h.

References libMesh::QBase::_p_level.

108 { return _p_level; }
unsigned int _p_level
Definition: quadrature.h:329
const std::vector<Point>& libMesh::QBase::get_points ( ) const
inlineinherited
std::vector<Point>& libMesh::QBase::get_points ( )
inlineinherited
Returns
A std::vector containing the quadrature point locations in reference element space as a writable reference.

Definition at line 134 of file quadrature.h.

References libMesh::QBase::_points.

134 { return _points; }
std::vector< Point > _points
Definition: quadrature.h:335
const std::vector<Real>& libMesh::QBase::get_weights ( ) const
inlineinherited
std::vector<Real>& libMesh::QBase::get_weights ( )
inlineinherited
Returns
A writable references to a std::vector containing the quadrature weights.

Definition at line 146 of file quadrature.h.

References libMesh::QBase::_weights.

146 { return _weights; }
std::vector< Real > _weights
Definition: quadrature.h:341
void libMesh::ReferenceCounter::increment_constructor_count ( const std::string &  name)
inlineprotectedinherited

Increments the construction counter. Should be called in the constructor of any derived class that will be reference counted.

Definition at line 185 of file reference_counter.h.

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCounter::n_objects(), and libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().

186 {
187  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
188  std::pair<unsigned int, unsigned int> & p = _counts[name];
189 
190  p.first++;
191 }
std::string name(const ElemQuality q)
Definition: elem_quality.C:39
spin_mutex spin_mtx
Definition: threads.C:29
void libMesh::ReferenceCounter::increment_destructor_count ( const std::string &  name)
inlineprotectedinherited

Increments the destruction counter. Should be called in the destructor of any derived class that will be reference counted.

Definition at line 198 of file reference_counter.h.

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCounter::n_objects(), and libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().

199 {
200  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
201  std::pair<unsigned int, unsigned int> & p = _counts[name];
202 
203  p.second++;
204 }
std::string name(const ElemQuality q)
Definition: elem_quality.C:39
spin_mutex spin_mtx
Definition: threads.C:29
void libMesh::QBase::init ( const ElemType  type = INVALID_ELEM,
unsigned int  p_level = 0 
)
virtualinherited

Initializes the data structures for a quadrature rule for an element of type type.

Definition at line 28 of file quadrature.C.

References libMesh::QBase::_dim, libMesh::QBase::_p_level, libMesh::QBase::_type, libMesh::QBase::init_0D(), libMesh::QBase::init_1D(), libMesh::QBase::init_2D(), and libMesh::QBase::init_3D().

Referenced by libMesh::FESubdivision::attach_quadrature_rule(), libMesh::QBase::init(), libMesh::QClough::init_1D(), libMesh::QMonomial::init_1D(), libMesh::QClough::init_2D(), init_2D(), libMesh::QTrap::init_2D(), libMesh::QGrid::init_2D(), libMesh::QSimpson::init_2D(), libMesh::QGauss::init_2D(), libMesh::QMonomial::init_2D(), init_3D(), libMesh::QTrap::init_3D(), libMesh::QGrid::init_3D(), libMesh::QGauss::init_3D(), libMesh::QSimpson::init_3D(), libMesh::QMonomial::init_3D(), libMesh::QGauss::QGauss(), QGaussLobatto(), libMesh::QJacobi::QJacobi(), libMesh::QSimpson::QSimpson(), libMesh::QTrap::QTrap(), and libMesh::QBase::w().

30 {
31  // check to see if we have already
32  // done the work for this quadrature rule
33  if (t == _type && p == _p_level)
34  return;
35  else
36  {
37  _type = t;
38  _p_level = p;
39  }
40 
41 
42 
43  switch(_dim)
44  {
45  case 0:
46  this->init_0D(_type,_p_level);
47 
48  return;
49 
50  case 1:
51  this->init_1D(_type,_p_level);
52 
53  return;
54 
55  case 2:
56  this->init_2D(_type,_p_level);
57 
58  return;
59 
60  case 3:
61  this->init_3D(_type,_p_level);
62 
63  return;
64 
65  default:
66  libmesh_error_msg("Invalid dimension _dim = " << _dim);
67  }
68 }
const unsigned int _dim
Definition: quadrature.h:311
ElemType _type
Definition: quadrature.h:323
unsigned int _p_level
Definition: quadrature.h:329
virtual void init_2D(const ElemType, unsigned int=0)
Definition: quadrature.h:263
virtual void init_1D(const ElemType type=INVALID_ELEM, unsigned int p_level=0)=0
virtual void init_0D(const ElemType type=INVALID_ELEM, unsigned int p_level=0)
Definition: quadrature.C:82
virtual void init_3D(const ElemType, unsigned int=0)
Definition: quadrature.h:279
void libMesh::QBase::init ( const Elem elem,
const std::vector< Real > &  vertex_distance_func,
unsigned int  p_level = 0 
)
virtualinherited

Initializes the data structures for an element potentially "cut" by a signed distance function. The array vertex_distance_func contains vertex values of the signed distance function. If the signed distance function changes sign on the vertices, then the element is considered to be cut.) This interface can be extended by derived classes in order to subdivide the element and construct a composite quadrature rule.

Definition at line 72 of file quadrature.C.

References libMesh::QBase::init(), and libMesh::Elem::type().

75 {
76  // dispatch generic implementation
77  this->init(elem.type(), p_level);
78 }
virtual void init(const ElemType type=INVALID_ELEM, unsigned int p_level=0)
Definition: quadrature.C:28
void libMesh::QBase::init_0D ( const ElemType  type = INVALID_ELEM,
unsigned int  p_level = 0 
)
protectedvirtualinherited

Initializes the 0D quadrature rule by filling the points and weights vectors with the appropriate values. Generally this is just one point with weight 1.

Definition at line 82 of file quadrature.C.

References libMesh::QBase::_points, and libMesh::QBase::_weights.

Referenced by libMesh::QBase::init().

84 {
85  _points.resize(1);
86  _weights.resize(1);
87  _points[0] = Point(0.);
88  _weights[0] = 1.0;
89 }
std::vector< Point > _points
Definition: quadrature.h:335
std::vector< Real > _weights
Definition: quadrature.h:341
void libMesh::QGaussLobatto::init_1D ( const ElemType  type = INVALID_ELEM,
unsigned int  p_level = 0 
)
privatevirtual

Initializes the 1D quadrature rule by filling the points and weights vectors with the appropriate values. The order of the rule will be defined by the implementing class. It is assumed that derived quadrature rules will at least define the init_1D function, therefore it is pure virtual.

Implements libMesh::QBase.

Definition at line 28 of file quadrature_gauss_lobatto_1D.C.

References libMesh::QBase::_order, libMesh::QBase::_points, libMesh::QBase::_weights, libMesh::CONSTANT, libMesh::EIGHTH, libMesh::EIGHTTEENTH, libMesh::ELEVENTH, libMesh::FIFTEENTH, libMesh::FIFTH, libMesh::FIRST, libMesh::FORTIETH, libMesh::FORTYFIRST, libMesh::FORTYSECOND, libMesh::FORTYTHIRD, libMesh::FOURTEENTH, libMesh::FOURTH, libMesh::NINETEENTH, libMesh::NINTH, libMesh::Real, libMesh::SECOND, libMesh::SEVENTEENTH, libMesh::SEVENTH, libMesh::SIXTEENTH, libMesh::SIXTH, libMesh::TENTH, libMesh::THIRD, libMesh::THIRTEENTH, libMesh::THIRTIETH, libMesh::THIRTYEIGHTH, libMesh::THIRTYFIFTH, libMesh::THIRTYFIRST, libMesh::THIRTYFOURTH, libMesh::THIRTYNINTH, libMesh::THIRTYSECOND, libMesh::THIRTYSEVENTH, libMesh::THIRTYSIXTH, libMesh::THIRTYTHIRD, libMesh::TWELFTH, libMesh::TWENTIETH, libMesh::TWENTYEIGHTH, libMesh::TWENTYFIFTH, libMesh::TWENTYFIRST, libMesh::TWENTYFOURTH, libMesh::TWENTYNINTH, libMesh::TWENTYSECOND, libMesh::TWENTYSEVENTH, libMesh::TWENTYSIXTH, and libMesh::TWENTYTHIRD.

Referenced by type().

30 {
31  //----------------------------------------------------------------------
32  // 1D quadrature rules
33  switch(_order + 2*p)
34  {
35  // Since Gauss-Lobatto rules must include the endpoints of the
36  // domain, there is no 1-point rule. The two-point
37  // Gauss-Lobatto rule is equivalent to the trapezoidal rule.
38  case CONSTANT:
39  case FIRST:
40  {
41  _points.resize (2);
42  _weights.resize(2);
43 
44  _points[0](0) = -1.0L;
45  _points[1] = -_points[0];
46 
47  _weights[0] = 1.;
48  _weights[1] = _weights[0];
49 
50  return;
51  }
52 
53  // The three-point Gauss-Lobatto rule is equivalent to Simpsons' rule.
54  // It can integrate cubic polynomials exactly.
55  case SECOND:
56  case THIRD:
57  {
58  _points.resize (3);
59  _weights.resize(3);
60 
61  _points[0](0) = -1.0L;
62  _points[1] = 0.0L;
63  _points[2] = -_points[0];
64 
65  _weights[0] = Real(1)/3;
66  _weights[1] = Real(4)/3;
67  _weights[2] = _weights[0];
68  return;
69  }
70 
71  // The four-point Gauss-Lobatto rule can integrate 2*4-3 =
72  // 5th-order polynomials exactly.
73  case FOURTH:
74  case FIFTH:
75  {
76  _points.resize (4);
77  _weights.resize(4);
78 
79  _points[ 0](0) = -1.0L;
80  _points[ 1](0) = -std::sqrt(1.0L/5.0L);
81  _points[ 2] = -_points[1];
82  _points[ 3] = -_points[0];
83 
84  _weights[ 0] = Real(1)/6;
85  _weights[ 1] = Real(5)/6;
86  _weights[ 2] = _weights[1];
87  _weights[ 3] = _weights[0];
88 
89  return;
90  }
91 
92  // The five-point Gauss-Lobatto rule can integrate 2*5-3 =
93  // 7th-order polynomials exactly.
94  case SIXTH:
95  case SEVENTH:
96  {
97  _points.resize (5);
98  _weights.resize(5);
99 
100  _points[ 0](0) = -1.0L;
101  _points[ 1](0) = -std::sqrt(3.0L/7.0L);
102  _points[ 2](0) = 0.;
103  _points[ 3] = -_points[1];
104  _points[ 4] = -_points[0];
105 
106  _weights[ 0] = 0.1;
107  _weights[ 1] = Real(49)/90;
108  _weights[ 2] = Real(32)/45;
109  _weights[ 3] = _weights[1];
110  _weights[ 4] = _weights[0];
111 
112  return;
113  }
114 
115  // 2*6-3 = 9
116  case EIGHTH:
117  case NINTH:
118  {
119  _points.resize (6);
120  _weights.resize(6);
121 
122  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
123  _points[ 1](0) = -7.6505532392946469285100297395934e-01L;
124  _points[ 2](0) = -2.8523151648064509631415099404088e-01L;
125  _points[ 3] = -_points[2];
126  _points[ 4] = -_points[1];
127  _points[ 5] = -_points[0];
128 
129  _weights[ 0] = 6.6666666666666666666666666666667e-02L;
130  _weights[ 1] = 3.7847495629784698031661280821202e-01L;
131  _weights[ 2] = 5.5485837703548635301672052512131e-01L;
132  _weights[ 3] = _weights[2];
133  _weights[ 4] = _weights[1];
134  _weights[ 5] = _weights[0];
135 
136  return;
137  }
138 
139  // 2*7-3 = 11
140  case TENTH:
141  case ELEVENTH:
142  {
143  _points.resize (7);
144  _weights.resize(7);
145 
146  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
147  _points[ 1](0) = -8.3022389627856692987203221396747e-01L;
148  _points[ 2](0) = -4.6884879347071421380377188190877e-01L;
149  _points[ 3](0) = 0.;
150  _points[ 4] = -_points[2];
151  _points[ 5] = -_points[1];
152  _points[ 6] = -_points[0];
153 
154  _weights[ 0] = 4.7619047619047619047619047619048e-02L;
155  _weights[ 1] = 2.7682604736156594801070040629007e-01L;
156  _weights[ 2] = 4.3174538120986262341787102228136e-01L;
157  _weights[ 3] = 4.8761904761904761904761904761905e-01L;
158  _weights[ 4] = _weights[2];
159  _weights[ 5] = _weights[1];
160  _weights[ 6] = _weights[0];
161 
162  return;
163  }
164 
165  // 2*8-3 = 13
166  case TWELFTH:
167  case THIRTEENTH:
168  {
169  _points.resize (8);
170  _weights.resize(8);
171 
172  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
173  _points[ 1](0) = -8.7174014850960661533744576122066e-01L;
174  _points[ 2](0) = -5.9170018143314230214451073139795e-01L;
175  _points[ 3](0) = -2.0929921790247886876865726034535e-01L;
176  _points[ 4] = -_points[3];
177  _points[ 5] = -_points[2];
178  _points[ 6] = -_points[1];
179  _points[ 7] = -_points[0];
180 
181  _weights[ 0] = 3.5714285714285714285714285714286e-02L;
182  _weights[ 1] = 2.1070422714350603938299206577576e-01L;
183  _weights[ 2] = 3.4112269248350436476424067710775e-01L;
184  _weights[ 3] = 4.1245879465870388156705297140221e-01L;
185  _weights[ 4] = _weights[3];
186  _weights[ 5] = _weights[2];
187  _weights[ 6] = _weights[1];
188  _weights[ 7] = _weights[0];
189 
190  return;
191  }
192 
193  // 2*9-3 = 15
194  case FOURTEENTH:
195  case FIFTEENTH:
196  {
197  _points.resize (9);
198  _weights.resize(9);
199 
200  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
201  _points[ 1](0) = -8.9975799541146015731234524441834e-01L;
202  _points[ 2](0) = -6.7718627951073775344588542709134e-01L;
203  _points[ 3](0) = -3.6311746382617815871075206870866e-01L;
204  _points[ 4](0) = 0.;
205  _points[ 5] = -_points[3];
206  _points[ 6] = -_points[2];
207  _points[ 7] = -_points[1];
208  _points[ 8] = -_points[0];
209 
210  _weights[ 0] = 2.7777777777777777777777777777778e-02L;
211  _weights[ 1] = 1.6549536156080552504633972002921e-01L;
212  _weights[ 2] = 2.7453871250016173528070561857937e-01L;
213  _weights[ 3] = 3.4642851097304634511513153213972e-01L;
214  _weights[ 4] = 3.7151927437641723356009070294785e-01L;
215  _weights[ 5] = _weights[3];
216  _weights[ 6] = _weights[2];
217  _weights[ 7] = _weights[1];
218  _weights[ 8] = _weights[0];
219 
220  return;
221  }
222 
223  // 2*10-3 = 17
224  case SIXTEENTH:
225  case SEVENTEENTH:
226  {
227  _points.resize (10);
228  _weights.resize(10);
229 
230  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
231  _points[ 1](0) = -9.1953390816645881382893266082234e-01L;
232  _points[ 2](0) = -7.3877386510550507500310617485983e-01L;
233  _points[ 3](0) = -4.7792494981044449566117509273126e-01L;
234  _points[ 4](0) = -1.6527895766638702462621976595817e-01L;
235  _points[ 5] = -_points[4];
236  _points[ 6] = -_points[3];
237  _points[ 7] = -_points[2];
238  _points[ 8] = -_points[1];
239  _points[ 9] = -_points[0];
240 
241  _weights[ 0] = 2.2222222222222222222222222222222e-02L;
242  _weights[ 1] = 1.3330599085107011112622717075539e-01L;
243  _weights[ 2] = 2.2488934206312645211945782173105e-01L;
244  _weights[ 3] = 2.9204268367968375787558225737444e-01L;
245  _weights[ 4] = 3.2753976118389745665651052791689e-01L;
246  _weights[ 5] = _weights[4];
247  _weights[ 6] = _weights[3];
248  _weights[ 7] = _weights[2];
249  _weights[ 8] = _weights[1];
250  _weights[ 9] = _weights[0];
251 
252  return;
253  }
254 
255  // 2*11-3 = 19
256  case EIGHTTEENTH:
257  case NINETEENTH:
258  {
259  _points.resize (11);
260  _weights.resize(11);
261 
262  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
263  _points[ 1](0) = -9.3400143040805913433227413609938e-01L;
264  _points[ 2](0) = -7.8448347366314441862241781610846e-01L;
265  _points[ 3](0) = -5.6523532699620500647096396947775e-01L;
266  _points[ 4](0) = -2.9575813558693939143191151555906e-01L;
267  _points[ 5](0) = 0.;
268  _points[ 6] = -_points[4];
269  _points[ 7] = -_points[3];
270  _points[ 8] = -_points[2];
271  _points[ 9] = -_points[1];
272  _points[10] = -_points[0];
273 
274  _weights[ 0] = 1.8181818181818181818181818181818e-02L;
275  _weights[ 1] = 1.0961227326699486446140344958035e-01L;
276  _weights[ 2] = 1.8716988178030520410814152189943e-01L;
277  _weights[ 3] = 2.4804810426402831404008486642187e-01L;
278  _weights[ 4] = 2.8687912477900808867922240333154e-01L;
279  _weights[ 5] = 3.0021759545569069378593188116998e-01L;
280  _weights[ 6] = _weights[4];
281  _weights[ 7] = _weights[3];
282  _weights[ 8] = _weights[2];
283  _weights[ 9] = _weights[1];
284  _weights[10] = _weights[0];
285 
286  return;
287  }
288 
289  // 2*12-3 = 21
290  case TWENTIETH:
291  case TWENTYFIRST:
292  {
293  _points.resize (12);
294  _weights.resize(12);
295 
296  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
297  _points[ 1](0) = -9.4489927222288222340758013830322e-01L;
298  _points[ 2](0) = -8.1927932164400667834864158171690e-01L;
299  _points[ 3](0) = -6.3287615303186067766240485444366e-01L;
300  _points[ 4](0) = -3.9953094096534893226434979156697e-01L;
301  _points[ 5](0) = -1.3655293285492755486406185573969e-01L;
302  _points[ 6] = -_points[5];
303  _points[ 7] = -_points[4];
304  _points[ 8] = -_points[3];
305  _points[ 9] = -_points[2];
306  _points[10] = -_points[1];
307  _points[11] = -_points[0];
308 
309  _weights[ 0] = 1.5151515151515151515151515151515e-02L;
310  _weights[ 1] = 9.1684517413196130668342594134079e-02L;
311  _weights[ 2] = 1.5797470556437011516467106270034e-01L;
312  _weights[ 3] = 2.1250841776102114535830207736687e-01L;
313  _weights[ 4] = 2.5127560319920128029324441214760e-01L;
314  _weights[ 5] = 2.7140524091069617700028833849960e-01L;
315  _weights[ 6] = _weights[5];
316  _weights[ 7] = _weights[4];
317  _weights[ 8] = _weights[3];
318  _weights[ 9] = _weights[2];
319  _weights[10] = _weights[1];
320  _weights[11] = _weights[0];
321 
322  return;
323  }
324 
325  // 2*13-3 = 23
326  case TWENTYSECOND:
327  case TWENTYTHIRD:
328  {
329  _points.resize (13);
330  _weights.resize(13);
331 
332  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
333  _points[ 1](0) = -9.5330984664216391189690546475545e-01L;
334  _points[ 2](0) = -8.4634756465187231686592560709875e-01L;
335  _points[ 3](0) = -6.8618846908175742607275903956636e-01L;
336  _points[ 4](0) = -4.8290982109133620174693723363693e-01L;
337  _points[ 5](0) = -2.4928693010623999256867370037423e-01L;
338  _points[ 6](0) = 0.;
339  _points[ 7] = -_points[5];
340  _points[ 8] = -_points[4];
341  _points[ 9] = -_points[3];
342  _points[10] = -_points[2];
343  _points[11] = -_points[1];
344  _points[12] = -_points[0];
345 
346  _weights[ 0] = 1.2820512820512820512820512820513e-02L;
347  _weights[ 1] = 7.7801686746818927793588988333134e-02L;
348  _weights[ 2] = 1.3498192668960834911991476258937e-01L;
349  _weights[ 3] = 1.8364686520355009200749425874681e-01L;
350  _weights[ 4] = 2.2076779356611008608553400837940e-01L;
351  _weights[ 5] = 2.4401579030667635645857814836016e-01L;
352  _weights[ 6] = 2.5193084933344673604413864154124e-01L;
353  _weights[ 7] = _weights[5];
354  _weights[ 8] = _weights[4];
355  _weights[ 9] = _weights[3];
356  _weights[10] = _weights[2];
357  _weights[11] = _weights[1];
358  _weights[12] = _weights[0];
359 
360  return;
361  }
362 
363  // 2*14-3 = 25
364  case TWENTYFOURTH:
365  case TWENTYFIFTH:
366  {
367  _points.resize (14);
368  _weights.resize(14);
369 
370  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
371  _points[ 1](0) = -9.5993504526726090135510016201542e-01L;
372  _points[ 2](0) = -8.6780105383034725100022020290826e-01L;
373  _points[ 3](0) = -7.2886859909132614058467240052088e-01L;
374  _points[ 4](0) = -5.5063940292864705531662270585908e-01L;
375  _points[ 5](0) = -3.4272401334271284504390340364167e-01L;
376  _points[ 6](0) = -1.1633186888370386765877670973616e-01L;
377  _points[ 7] = -_points[6];
378  _points[ 8] = -_points[5];
379  _points[ 9] = -_points[4];
380  _points[10] = -_points[3];
381  _points[11] = -_points[2];
382  _points[12] = -_points[1];
383  _points[13] = -_points[0];
384 
385  _weights[ 0] = 1.0989010989010989010989010989011e-02L;
386  _weights[ 1] = 6.6837284497681284634070660746053e-02L;
387  _weights[ 2] = 1.1658665589871165154099667065465e-01L;
388  _weights[ 3] = 1.6002185176295214241282099798759e-01L;
389  _weights[ 4] = 1.9482614937341611864033177837588e-01L;
390  _weights[ 5] = 2.1912625300977075487116252395417e-01L;
391  _weights[ 6] = 2.3161279446845705888962835729264e-01L;
392  _weights[ 7] = _weights[6];
393  _weights[ 8] = _weights[5];
394  _weights[ 9] = _weights[4];
395  _weights[10] = _weights[3];
396  _weights[11] = _weights[2];
397  _weights[12] = _weights[1];
398  _weights[13] = _weights[0];
399 
400  return;
401  }
402 
403  // 2*15-3 = 27
404  case TWENTYSIXTH:
405  case TWENTYSEVENTH:
406  {
407  _points.resize (15);
408  _weights.resize(15);
409 
410  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
411  _points[ 1](0) = -9.6524592650383857279585139206960e-01L;
412  _points[ 2](0) = -8.8508204422297629882540163148223e-01L;
413  _points[ 3](0) = -7.6351968995181520070411847597629e-01L;
414  _points[ 4](0) = -6.0625320546984571112352993863673e-01L;
415  _points[ 5](0) = -4.2063805471367248092189693873858e-01L;
416  _points[ 6](0) = -2.1535395536379423822567944627292e-01L;
417  _points[ 7](0) = 0.;
418  _points[ 8] = -_points[6];
419  _points[ 9] = -_points[5];
420  _points[10] = -_points[4];
421  _points[11] = -_points[3];
422  _points[12] = -_points[2];
423  _points[13] = -_points[1];
424  _points[14] = -_points[0];
425 
426  _weights[ 0] = 9.5238095238095238095238095238095e-03L;
427  _weights[ 1] = 5.8029893028601249096880584025282e-02L;
428  _weights[ 2] = 1.0166007032571806760366617078880e-01L;
429  _weights[ 3] = 1.4051169980242810946044680564367e-01L;
430  _weights[ 4] = 1.7278964725360094905207709940835e-01L;
431  _weights[ 5] = 1.9698723596461335609250034650741e-01L;
432  _weights[ 6] = 2.1197358592682092012743007697722e-01L;
433  _weights[ 7] = 2.1704811634881564951495021425091e-01L;
434  _weights[ 8] = _weights[6];
435  _weights[ 9] = _weights[5];
436  _weights[10] = _weights[4];
437  _weights[11] = _weights[3];
438  _weights[12] = _weights[2];
439  _weights[13] = _weights[1];
440  _weights[14] = _weights[0];
441 
442  return;
443  }
444 
445  // 2*16-3 = 29
446  case TWENTYEIGHTH:
447  case TWENTYNINTH:
448  {
449  _points.resize (16);
450  _weights.resize(16);
451 
452  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
453  _points[ 1](0) = -9.6956804627021793295224273836746e-01L;
454  _points[ 2](0) = -8.9920053309347209299462826151985e-01L;
455  _points[ 3](0) = -7.9200829186181506393108827096315e-01L;
456  _points[ 4](0) = -6.5238870288249308946788321964058e-01L;
457  _points[ 5](0) = -4.8605942188713761178189078584687e-01L;
458  _points[ 6](0) = -2.9983046890076320809835345472230e-01L;
459  _points[ 7](0) = -1.0132627352194944784303300504592e-01L;
460  _points[ 8] = -_points[7];
461  _points[ 9] = -_points[6];
462  _points[10] = -_points[5];
463  _points[11] = -_points[4];
464  _points[12] = -_points[3];
465  _points[13] = -_points[2];
466  _points[14] = -_points[1];
467  _points[15] = -_points[0];
468 
469  _weights[ 0] = 8.3333333333333333333333333333333e-03L;
470  _weights[ 1] = 5.0850361005919905403244919565455e-02L;
471  _weights[ 2] = 8.9393697325930800991052080166084e-02L;
472  _weights[ 3] = 1.2425538213251409834953633265731e-01L;
473  _weights[ 4] = 1.5402698080716428081564494048499e-01L;
474  _weights[ 5] = 1.7749191339170412530107566952836e-01L;
475  _weights[ 6] = 1.9369002382520358431691359885352e-01L;
476  _weights[ 7] = 2.0195830817822987148919912541094e-01L;
477  _weights[ 8] = _weights[7];
478  _weights[ 9] = _weights[6];
479  _weights[10] = _weights[5];
480  _weights[11] = _weights[4];
481  _weights[12] = _weights[3];
482  _weights[13] = _weights[2];
483  _weights[14] = _weights[1];
484  _weights[15] = _weights[0];
485 
486  return;
487  }
488 
489  // 2*17-3 = 31
490  case THIRTIETH:
491  case THIRTYFIRST:
492  {
493  _points.resize (17);
494  _weights.resize(17);
495 
496  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
497  _points[ 1](0) = -9.7313217663141831415697950187372e-01L;
498  _points[ 2](0) = -9.1087999591557359562380250639773e-01L;
499  _points[ 3](0) = -8.1569625122177030710675055323753e-01L;
500  _points[ 4](0) = -6.9102898062768470539491935737245e-01L;
501  _points[ 5](0) = -5.4138539933010153912373340750406e-01L;
502  _points[ 6](0) = -3.7217443356547704190723468073526e-01L;
503  _points[ 7](0) = -1.8951197351831738830426301475311e-01L;
504  _points[ 8](0) = 0.;
505  _points[ 9] = -_points[7];
506  _points[10] = -_points[6];
507  _points[11] = -_points[5];
508  _points[12] = -_points[4];
509  _points[13] = -_points[3];
510  _points[14] = -_points[2];
511  _points[15] = -_points[1];
512  _points[16] = -_points[0];
513 
514  _weights[ 0] = 7.3529411764705882352941176470588e-03L;
515  _weights[ 1] = 4.4921940543254209647400954623212e-02L;
516  _weights[ 2] = 7.9198270503687119190264429952835e-02L;
517  _weights[ 3] = 1.1059290900702816137577270522008e-01L;
518  _weights[ 4] = 1.3798774620192655905620157495403e-01L;
519  _weights[ 5] = 1.6039466199762153951632836586475e-01L;
520  _weights[ 6] = 1.7700425351565787043694574536329e-01L;
521  _weights[ 7] = 1.8721633967761923589208848286062e-01L;
522  _weights[ 8] = 1.9066187475346943329940724702825e-01L;
523  _weights[ 9] = _weights[7];
524  _weights[10] = _weights[6];
525  _weights[11] = _weights[5];
526  _weights[12] = _weights[4];
527  _weights[13] = _weights[3];
528  _weights[14] = _weights[2];
529  _weights[15] = _weights[1];
530  _weights[16] = _weights[0];
531 
532  return;
533  }
534 
535  // 2*18-3 = 33
536  case THIRTYSECOND:
537  case THIRTYTHIRD:
538  {
539  _points.resize (18);
540  _weights.resize(18);
541 
542  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
543  _points[ 1](0) = -9.7610555741219854286451892434170e-01L;
544  _points[ 2](0) = -9.2064918534753387383785462543128e-01L;
545  _points[ 3](0) = -8.3559353521809021371364636232794e-01L;
546  _points[ 4](0) = -7.2367932928324268130621036530207e-01L;
547  _points[ 5](0) = -5.8850483431866176117353589319356e-01L;
548  _points[ 6](0) = -4.3441503691212397534228713674067e-01L;
549  _points[ 7](0) = -2.6636265287828098416766533202560e-01L;
550  _points[ 8](0) = -8.9749093484652111022645010088562e-02L;
551  _points[ 9] = -_points[8];
552  _points[10] = -_points[7];
553  _points[11] = -_points[6];
554  _points[12] = -_points[5];
555  _points[13] = -_points[4];
556  _points[14] = -_points[3];
557  _points[15] = -_points[2];
558  _points[16] = -_points[1];
559  _points[17] = -_points[0];
560 
561  _weights[ 0] = 6.5359477124183006535947712418301e-03L;
562  _weights[ 1] = 3.9970628810914066137599176410101e-02L;
563  _weights[ 2] = 7.0637166885633664999222960167786e-02L;
564  _weights[ 3] = 9.9016271717502802394423605318672e-02L;
565  _weights[ 4] = 1.2421053313296710026339635889675e-01L;
566  _weights[ 5] = 1.4541196157380226798300321049443e-01L;
567  _weights[ 6] = 1.6193951723760248926432670670023e-01L;
568  _weights[ 7] = 1.7326210948945622601061440382668e-01L;
569  _weights[ 8] = 1.7901586343970308229381880694353e-01L;
570  _weights[ 9] = _weights[8];
571  _weights[10] = _weights[7];
572  _weights[11] = _weights[6];
573  _weights[12] = _weights[5];
574  _weights[13] = _weights[4];
575  _weights[14] = _weights[3];
576  _weights[15] = _weights[2];
577  _weights[16] = _weights[1];
578  _weights[17] = _weights[0];
579 
580  return;
581  }
582 
583  // 2*19-3 = 35
584  case THIRTYFOURTH:
585  case THIRTYFIFTH:
586  {
587  _points.resize (19);
588  _weights.resize(19);
589 
590  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
591  _points[ 1](0) = -9.7861176622208009515263406311022e-01L;
592  _points[ 2](0) = -9.2890152815258624371794025879655e-01L;
593  _points[ 3](0) = -8.5246057779664609308595597004106e-01L;
594  _points[ 4](0) = -7.5149420255261301416363748963394e-01L;
595  _points[ 5](0) = -6.2890813726522049776683230622873e-01L;
596  _points[ 6](0) = -4.8822928568071350277790963762492e-01L;
597  _points[ 7](0) = -3.3350484782449861029850010384493e-01L;
598  _points[ 8](0) = -1.6918602340928157137515415344488e-01L;
599  _points[ 9](0) = 0.;
600  _points[10] = -_points[8];
601  _points[11] = -_points[7];
602  _points[12] = -_points[6];
603  _points[13] = -_points[5];
604  _points[14] = -_points[4];
605  _points[15] = -_points[3];
606  _points[16] = -_points[2];
607  _points[17] = -_points[1];
608  _points[18] = -_points[0];
609 
610  _weights[ 0] = 5.8479532163742690058479532163743e-03L;
611  _weights[ 1] = 3.5793365186176477115425569035122e-02L;
612  _weights[ 2] = 6.3381891762629736851695690418317e-02L;
613  _weights[ 3] = 8.9131757099207084448008790556153e-02L;
614  _weights[ 4] = 1.1231534147730504407091001546378e-01L;
615  _weights[ 5] = 1.3226728044875077692604673390973e-01L;
616  _weights[ 6] = 1.4841394259593888500968064366841e-01L;
617  _weights[ 7] = 1.6029092404406124197991096818359e-01L;
618  _weights[ 8] = 1.6755658452714286727013727774026e-01L;
619  _weights[ 9] = 1.7000191928482723464467271561652e-01L;
620  _weights[10] = _weights[8];
621  _weights[11] = _weights[7];
622  _weights[12] = _weights[6];
623  _weights[13] = _weights[5];
624  _weights[14] = _weights[4];
625  _weights[15] = _weights[3];
626  _weights[16] = _weights[2];
627  _weights[17] = _weights[1];
628  _weights[18] = _weights[0];
629 
630  return;
631  }
632 
633  // 2*20-3 = 37
634  case THIRTYSIXTH:
635  case THIRTYSEVENTH:
636  {
637  _points.resize (20);
638  _weights.resize(20);
639 
640  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
641  _points[ 1](0) = -9.8074370489391417192544643858423e-01L;
642  _points[ 2](0) = -9.3593449881266543571618158493063e-01L;
643  _points[ 3](0) = -8.6687797808995014130984721461629e-01L;
644  _points[ 4](0) = -7.7536826095205587041431752759469e-01L;
645  _points[ 5](0) = -6.6377640229031128984640332297116e-01L;
646  _points[ 6](0) = -5.3499286403188626164813596182898e-01L;
647  _points[ 7](0) = -3.9235318371390929938647470381582e-01L;
648  _points[ 8](0) = -2.3955170592298649518240135692709e-01L;
649  _points[ 9](0) = -8.0545937238821837975944518159554e-02L;
650  _points[10] = -_points[9];
651  _points[11] = -_points[8];
652  _points[12] = -_points[7];
653  _points[13] = -_points[6];
654  _points[14] = -_points[5];
655  _points[15] = -_points[4];
656  _points[16] = -_points[3];
657  _points[17] = -_points[2];
658  _points[18] = -_points[1];
659  _points[19] = -_points[0];
660 
661  _weights[ 0] = 5.2631578947368421052631578947368e-03L;
662  _weights[ 1] = 3.2237123188488941491605028117294e-02L;
663  _weights[ 2] = 5.7181802127566826004753627173243e-02L;
664  _weights[ 3] = 8.0631763996119603144776846113721e-02L;
665  _weights[ 4] = 1.0199149969945081568378120573289e-01L;
666  _weights[ 5] = 1.2070922762867472509942970500239e-01L;
667  _weights[ 6] = 1.3630048235872418448978079298903e-01L;
668  _weights[ 7] = 1.4836155407091682581471301373397e-01L;
669  _weights[ 8] = 1.5658010264747548715816989679364e-01L;
670  _weights[ 9] = 1.6074328638784574900772672644908e-01L;
671  _weights[10] = _weights[9];
672  _weights[11] = _weights[8];
673  _weights[12] = _weights[7];
674  _weights[13] = _weights[6];
675  _weights[14] = _weights[5];
676  _weights[15] = _weights[4];
677  _weights[16] = _weights[3];
678  _weights[17] = _weights[2];
679  _weights[18] = _weights[1];
680  _weights[19] = _weights[0];
681 
682  return;
683  }
684 
685  // 2*21-3 = 39
686  case THIRTYEIGHTH:
687  case THIRTYNINTH:
688  {
689  _points.resize (21);
690  _weights.resize(21);
691 
692  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
693  _points[ 1](0) = -9.8257229660454802823448127655541e-01L;
694  _points[ 2](0) = -9.4197629695974553429610265066144e-01L;
695  _points[ 3](0) = -8.7929475532359046445115359630494e-01L;
696  _points[ 4](0) = -7.9600192607771240474431258966036e-01L;
697  _points[ 5](0) = -6.9405102606222323262731639319467e-01L;
698  _points[ 6](0) = -5.7583196026183068692702187033809e-01L;
699  _points[ 7](0) = -4.4411578327900210119451634960735e-01L;
700  _points[ 8](0) = -3.0198985650876488727535186785875e-01L;
701  _points[ 9](0) = -1.5278551580218546600635832848567e-01L;
702  _points[10](0) = 0.;
703  _points[11] = -_points[9];
704  _points[12] = -_points[8];
705  _points[13] = -_points[7];
706  _points[14] = -_points[6];
707  _points[15] = -_points[5];
708  _points[16] = -_points[4];
709  _points[17] = -_points[3];
710  _points[18] = -_points[2];
711  _points[19] = -_points[1];
712  _points[20] = -_points[0];
713 
714  _weights[ 0] = 4.7619047619047619047619047619048e-03L;
715  _weights[ 1] = 2.9184840098505458609458543613171e-02L;
716  _weights[ 2] = 5.1843169000849625072722971852830e-02L;
717  _weights[ 3] = 7.3273918185074144252547861041894e-02L;
718  _weights[ 4] = 9.2985467957886065301137664149214e-02L;
719  _weights[ 5] = 1.1051708321912333526700048678439e-01L;
720  _weights[ 6] = 1.2545812119086894801515753570800e-01L;
721  _weights[ 7] = 1.3745846286004134358089961741515e-01L;
722  _weights[ 8] = 1.4623686244797745926727053063439e-01L;
723  _weights[ 9] = 1.5158757511168138445325068150529e-01L;
724  _weights[10] = 1.5338519033217494855158440506754e-01L;
725  _weights[11] = _weights[9];
726  _weights[12] = _weights[8];
727  _weights[13] = _weights[7];
728  _weights[14] = _weights[6];
729  _weights[15] = _weights[5];
730  _weights[16] = _weights[4];
731  _weights[17] = _weights[3];
732  _weights[18] = _weights[2];
733  _weights[19] = _weights[1];
734  _weights[20] = _weights[0];
735 
736  return;
737  }
738 
739  // 2*22-3 = 41
740  case FORTIETH:
741  case FORTYFIRST:
742  {
743  _points.resize (22);
744  _weights.resize(22);
745 
746  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
747  _points[ 1](0) = -9.8415243845764617655228962221207e-01L;
748  _points[ 2](0) = -9.4720428399922868052421376661573e-01L;
749  _points[ 3](0) = -8.9006229019090447052965782577909e-01L;
750  _points[ 4](0) = -8.1394892761192113604544184805614e-01L;
751  _points[ 5](0) = -7.2048723996120215811988189639847e-01L;
752  _points[ 6](0) = -6.1166943828425897122621160586993e-01L;
753  _points[ 7](0) = -4.8981487518990234980875123568327e-01L;
754  _points[ 8](0) = -3.5752071013891953806095728024018e-01L;
755  _points[ 9](0) = -2.1760658515928504178795509346539e-01L;
756  _points[10](0) = -7.3054540010898334761088790464107e-02L;
757  _points[11] = -_points[10];
758  _points[12] = -_points[9];
759  _points[13] = -_points[8];
760  _points[14] = -_points[7];
761  _points[15] = -_points[6];
762  _points[16] = -_points[5];
763  _points[17] = -_points[4];
764  _points[18] = -_points[3];
765  _points[19] = -_points[2];
766  _points[20] = -_points[1];
767  _points[21] = -_points[0];
768 
769  _weights[ 0] = 4.3290043290043290043290043290043e-03L;
770  _weights[ 1] = 2.6545747682501757911627904520543e-02L;
771  _weights[ 2] = 4.7214465293740752123775734864792e-02L;
772  _weights[ 3] = 6.6865605864553076012404194157097e-02L;
773  _weights[ 4] = 8.5090060391838447815711236095748e-02L;
774  _weights[ 5] = 1.0150057480164767437243730374960e-01L;
775  _weights[ 6] = 1.1574764465393906659003636772146e-01L;
776  _weights[ 7] = 1.2752769665343027553084445930883e-01L;
777  _weights[ 8] = 1.3658968861374142668617736220617e-01L;
778  _weights[ 9] = 1.4274049227136140033623599356679e-01L;
779  _weights[10] = 1.4584901944424179361642043947997e-01L;
780  _weights[11] = _weights[10];
781  _weights[12] = _weights[9];
782  _weights[13] = _weights[8];
783  _weights[14] = _weights[7];
784  _weights[15] = _weights[6];
785  _weights[16] = _weights[5];
786  _weights[17] = _weights[4];
787  _weights[18] = _weights[3];
788  _weights[19] = _weights[2];
789  _weights[20] = _weights[1];
790  _weights[21] = _weights[0];
791 
792  return;
793  }
794 
795  // 2*23-3 = 43
796  case FORTYSECOND:
797  case FORTYTHIRD:
798  {
799  _points.resize (23);
800  _weights.resize(23);
801 
802  _points[ 0](0) = -1.0000000000000000000000000000000e+00L;
803  _points[ 1](0) = -9.8552715587873257808146276673810e-01L;
804  _points[ 2](0) = -9.5175795571071020413563967985143e-01L;
805  _points[ 3](0) = -8.9945855804034501095016032034737e-01L;
806  _points[ 4](0) = -8.2965109665128588622320061929000e-01L;
807  _points[ 5](0) = -7.4369504117206068394516354306700e-01L;
808  _points[ 6](0) = -6.4326364446013620847614553360277e-01L;
809  _points[ 7](0) = -5.3031177113684416813011532015230e-01L;
810  _points[ 8](0) = -4.0703793791447482919595048821510e-01L;
811  _points[ 9](0) = -2.7584154894579306710687763267914e-01L;
812  _points[10](0) = -1.3927620404066839859186261298277e-01L;
813  _points[11](0) = 0.;
814  _points[12] = -_points[10];
815  _points[13] = -_points[9];
816  _points[14] = -_points[8];
817  _points[15] = -_points[7];
818  _points[16] = -_points[6];
819  _points[17] = -_points[5];
820  _points[18] = -_points[4];
821  _points[19] = -_points[3];
822  _points[20] = -_points[2];
823  _points[21] = -_points[1];
824  _points[22] = -_points[0];
825 
826  _weights[ 0] = 3.9525691699604743083003952569170e-03L;
827  _weights[ 1] = 2.4248600771531736517399658937097e-02L;
828  _weights[ 2] = 4.3175871170241834748876465612042e-02L;
829  _weights[ 3] = 6.1252477129554206381382847440355e-02L;
830  _weights[ 4] = 7.8135449475569989741934255347965e-02L;
831  _weights[ 5] = 9.3497246163512341833500706906697e-02L;
832  _weights[ 6] = 1.0703910172433651153518362791547e-01L;
833  _weights[ 7] = 1.1849751066274913130212600472426e-01L;
834  _weights[ 8] = 1.2764947470175887663614855305567e-01L;
835  _weights[ 9] = 1.3431687263860381990156489770071e-01L;
836  _weights[10] = 1.3836993638580739452350273386294e-01L;
837  _weights[11] = 1.3972978001274736514015970647975e-01L;
838  _weights[12] = _weights[10];
839  _weights[13] = _weights[9];
840  _weights[14] = _weights[8];
841  _weights[15] = _weights[7];
842  _weights[16] = _weights[6];
843  _weights[17] = _weights[5];
844  _weights[18] = _weights[4];
845  _weights[19] = _weights[3];
846  _weights[20] = _weights[2];
847  _weights[21] = _weights[1];
848  _weights[22] = _weights[0];
849 
850  return;
851  }
852 
853  default:
854  libmesh_error_msg("Quadrature rule " << _order << " not supported!");
855  }
856 }
std::vector< Point > _points
Definition: quadrature.h:335
std::vector< Real > _weights
Definition: quadrature.h:341
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Order _order
Definition: quadrature.h:317
void libMesh::QGaussLobatto::init_2D ( const ElemType  = INVALID_ELEM,
unsigned int  = 0 
)
privatevirtual

Initializes the 2D quadrature rule by filling the points and weights vectors with the appropriate values. The order of the rule will be defined by the implementing class. Should not be pure virtual since a derived quadrature rule may only be defined in 1D. If not redefined, gives an error (when DEBUG is defined) when called.

Reimplemented from libMesh::QBase.

Definition at line 26 of file quadrature_gauss_lobatto_2D.C.

References libMesh::QBase::_order, libMesh::EDGE2, libMesh::QBase::init(), libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::QUADSHELL4, and libMesh::QBase::tensor_product_quad().

Referenced by type().

28 {
29  switch (type_in)
30  {
31  case QUAD4:
32  case QUADSHELL4:
33  case QUAD8:
34  case QUAD9:
35  {
36  // We compute the 2D quadrature rule as a tensor
37  // product of the 1D quadrature rule.
38  QGaussLobatto q1D(1, _order);
39  q1D.init(EDGE2, p);
41  return;
42  }
43 
44  // We *could* fall back to a Gauss type rule for other types
45  // elements, but the assumption here is that the user has asked
46  // for a Gauss-Lobatto rule, i.e. a rule with integration points
47  // on the element boundary, for a reason.
48  default:
49  libmesh_error_msg("Element type not supported!:" << type_in);
50  }
51 }
QGaussLobatto(const unsigned int _dim, const Order _order=INVALID_ORDER)
void tensor_product_quad(const QBase &q1D)
Definition: quadrature.C:127
const Order _order
Definition: quadrature.h:317
void libMesh::QGaussLobatto::init_3D ( const ElemType  = INVALID_ELEM,
unsigned int  = 0 
)
privatevirtual

Initializes the 3D quadrature rule by filling the points and weights vectors with the appropriate values. The order of the rule will be defined by the implementing class. Should not be pure virtual since a derived quadrature rule may only be defined in 1D. If not redefined, gives an error (when DEBUG is defined) when called.

Reimplemented from libMesh::QBase.

Definition at line 26 of file quadrature_gauss_lobatto_3D.C.

References libMesh::QBase::_order, libMesh::EDGE2, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::QBase::init(), and libMesh::QBase::tensor_product_hex().

Referenced by type().

28 {
29  switch (type_in)
30  {
31  case HEX8:
32  case HEX20:
33  case HEX27:
34  {
35  // We compute the 3D quadrature rule as a tensor
36  // product of the 1D quadrature rule.
37  QGaussLobatto q1D(1, _order);
38  q1D.init(EDGE2, p);
39  tensor_product_hex(q1D);
40  return;
41  }
42 
43  // We *could* fall back to a Gauss type rule for other types
44  // elements, but the assumption here is that the user has asked
45  // for a Gauss-Lobatto rule, i.e. a rule with integration points
46  // on the element boundary, for a reason.
47  default:
48  libmesh_error_msg("ERROR: Unsupported type: " << type_in);
49  }
50 }
void tensor_product_hex(const QBase &q1D)
Definition: quadrature.C:154
QGaussLobatto(const unsigned int _dim, const Order _order=INVALID_ORDER)
const Order _order
Definition: quadrature.h:317
static unsigned int libMesh::ReferenceCounter::n_objects ( )
inlinestaticinherited
void libMesh::ReferenceCounter::print_info ( std::ostream &  out = libMesh::out)
staticinherited

Prints the reference information, by default to libMesh::out.

Definition at line 88 of file reference_counter.C.

References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().

Referenced by libMesh::LibMeshInit::LibMeshInit().

89 {
91  out_stream << ReferenceCounter::get_info();
92 }
static std::string get_info()
void libMesh::QBase::print_info ( std::ostream &  os = libMesh::out) const
inlineinherited

Prints information relevant to the quadrature rule, by default to libMesh::out.

Definition at line 364 of file quadrature.h.

References libMesh::QBase::_points, libMesh::QBase::_weights, libMesh::libmesh_assert(), libMesh::QBase::n_points(), and libMesh::Real.

Referenced by libMesh::QBase::get_order(), and libMesh::operator<<().

365 {
366  libmesh_assert(!_points.empty());
367  libmesh_assert(!_weights.empty());
368 
369  Real summed_weights=0;
370  os << "N_Q_Points=" << this->n_points() << std::endl << std::endl;
371  for (unsigned int qpoint=0; qpoint<this->n_points(); qpoint++)
372  {
373  os << " Point " << qpoint << ":\n"
374  << " "
375  << _points[qpoint]
376  << "\n Weight:\n "
377  << " w=" << _weights[qpoint] << "\n" << std::endl;
378 
379  summed_weights += _weights[qpoint];
380  }
381  os << "Summed Weights: " << summed_weights << std::endl;
382 }
std::vector< Point > _points
Definition: quadrature.h:335
std::vector< Real > _weights
Definition: quadrature.h:341
libmesh_assert(j)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int n_points() const
Definition: quadrature.h:113
Point libMesh::QBase::qp ( const unsigned int  i) const
inlineinherited
Returns
The $ i^{th} $ quadrature point in reference element space.

Definition at line 151 of file quadrature.h.

References libMesh::QBase::_points.

Referenced by libMesh::QConical::conical_product_pyramid(), libMesh::QConical::conical_product_tet(), libMesh::QConical::conical_product_tri(), libMesh::QBase::tensor_product_hex(), libMesh::QBase::tensor_product_prism(), and libMesh::QBase::tensor_product_quad().

152  {
153  libmesh_assert_less (i, _points.size());
154  return _points[i];
155  }
std::vector< Point > _points
Definition: quadrature.h:335
void libMesh::QBase::scale ( std::pair< Real, Real old_range,
std::pair< Real, Real new_range 
)
inherited

Maps the points of a 1D quadrature rule defined by "old_range" to another 1D interval defined by "new_range" and scales the weights accordingly.

Definition at line 93 of file quadrature.C.

References libMesh::QBase::_dim, libMesh::QBase::_points, libMesh::QBase::_weights, and libMesh::Real.

Referenced by libMesh::QConical::conical_product_tet(), libMesh::QConical::conical_product_tri(), and libMesh::QBase::get_order().

95 {
96  // Make sure we are in 1D
97  libmesh_assert_equal_to (_dim, 1);
98 
99  Real
100  h_new = new_range.second - new_range.first,
101  h_old = old_range.second - old_range.first;
102 
103  // Make sure that we have sane ranges
104  libmesh_assert_greater (h_new, 0.);
105  libmesh_assert_greater (h_old, 0.);
106 
107  // Make sure there are some points
108  libmesh_assert_greater (_points.size(), 0);
109 
110  // Compute the scale factor
111  Real scfact = h_new/h_old;
112 
113  // We're mapping from old_range -> new_range
114  for (std::size_t i=0; i<_points.size(); i++)
115  {
116  _points[i](0) = new_range.first +
117  (_points[i](0) - old_range.first) * scfact;
118 
119  // Scale the weights
120  _weights[i] *= scfact;
121  }
122 }
const unsigned int _dim
Definition: quadrature.h:311
std::vector< Point > _points
Definition: quadrature.h:335
std::vector< Real > _weights
Definition: quadrature.h:341
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual bool libMesh::QBase::shapes_need_reinit ( )
inlinevirtualinherited
Returns
true if the shape functions need to be recalculated, false otherwise.

This may be required if the number of quadrature points or their position changes.

Definition at line 217 of file quadrature.h.

217 { return false; }
void libMesh::QBase::tensor_product_hex ( const QBase q1D)
protectedinherited

Computes the tensor product quadrature rule [q1D x q1D x q1D] from the 1D rule q1D. Used in the init_3D routines for hexahedral element types.

Definition at line 154 of file quadrature.C.

References libMesh::QBase::_points, libMesh::QBase::_weights, libMesh::QBase::n_points(), libMesh::QBase::qp(), and libMesh::QBase::w().

Referenced by init_3D(), libMesh::QGrid::init_3D(), libMesh::QTrap::init_3D(), libMesh::QGauss::init_3D(), libMesh::QSimpson::init_3D(), and libMesh::QBase::init_3D().

155 {
156  const unsigned int np = q1D.n_points();
157 
158  _points.resize(np * np * np);
159 
160  _weights.resize(np * np * np);
161 
162  unsigned int q=0;
163 
164  for (unsigned int k=0; k<np; k++)
165  for (unsigned int j=0; j<np; j++)
166  for (unsigned int i=0; i<np; i++)
167  {
168  _points[q](0) = q1D.qp(i)(0);
169  _points[q](1) = q1D.qp(j)(0);
170  _points[q](2) = q1D.qp(k)(0);
171 
172  _weights[q] = q1D.w(i) * q1D.w(j) * q1D.w(k);
173 
174  q++;
175  }
176 }
std::vector< Point > _points
Definition: quadrature.h:335
std::vector< Real > _weights
Definition: quadrature.h:341
void libMesh::QBase::tensor_product_prism ( const QBase q1D,
const QBase q2D 
)
protectedinherited

Computes the tensor product of a 1D quadrature rule and a 2D quadrature rule. Used in the init_3D routines for prismatic element types.

Definition at line 181 of file quadrature.C.

References libMesh::QBase::_points, libMesh::QBase::_weights, libMesh::QBase::n_points(), libMesh::QBase::qp(), and libMesh::QBase::w().

Referenced by libMesh::QGrid::init_3D(), libMesh::QTrap::init_3D(), libMesh::QSimpson::init_3D(), libMesh::QGauss::init_3D(), and libMesh::QBase::init_3D().

182 {
183  const unsigned int n_points1D = q1D.n_points();
184  const unsigned int n_points2D = q2D.n_points();
185 
186  _points.resize (n_points1D * n_points2D);
187  _weights.resize (n_points1D * n_points2D);
188 
189  unsigned int q=0;
190 
191  for (unsigned int j=0; j<n_points1D; j++)
192  for (unsigned int i=0; i<n_points2D; i++)
193  {
194  _points[q](0) = q2D.qp(i)(0);
195  _points[q](1) = q2D.qp(i)(1);
196  _points[q](2) = q1D.qp(j)(0);
197 
198  _weights[q] = q2D.w(i) * q1D.w(j);
199 
200  q++;
201  }
202 
203 }
std::vector< Point > _points
Definition: quadrature.h:335
std::vector< Real > _weights
Definition: quadrature.h:341
void libMesh::QBase::tensor_product_quad ( const QBase q1D)
protectedinherited

Constructs a 2D rule from the tensor product of q1D with itself. Used in the init_2D() routines for quadrilateral element types.

Definition at line 127 of file quadrature.C.

References libMesh::QBase::_points, libMesh::QBase::_weights, libMesh::QBase::n_points(), libMesh::QBase::qp(), and libMesh::QBase::w().

Referenced by init_2D(), libMesh::QGrid::init_2D(), libMesh::QTrap::init_2D(), libMesh::QGauss::init_2D(), libMesh::QSimpson::init_2D(), and libMesh::QBase::init_3D().

128 {
129 
130  const unsigned int np = q1D.n_points();
131 
132  _points.resize(np * np);
133 
134  _weights.resize(np * np);
135 
136  unsigned int q=0;
137 
138  for (unsigned int j=0; j<np; j++)
139  for (unsigned int i=0; i<np; i++)
140  {
141  _points[q](0) = q1D.qp(i)(0);
142  _points[q](1) = q1D.qp(j)(0);
143 
144  _weights[q] = q1D.w(i)*q1D.w(j);
145 
146  q++;
147  }
148 }
std::vector< Point > _points
Definition: quadrature.h:335
std::vector< Real > _weights
Definition: quadrature.h:341
virtual QuadratureType libMesh::QGaussLobatto::type ( ) const
inlinevirtual
Real libMesh::QBase::w ( const unsigned int  i) const
inlineinherited

Member Data Documentation

ReferenceCounter::Counts libMesh::ReferenceCounter::_counts
staticprotectedinherited
const unsigned int libMesh::QBase::_dim
protectedinherited

The spatial dimension of the quadrature rule.

Definition at line 311 of file quadrature.h.

Referenced by libMesh::QBase::get_dim(), libMesh::QBase::init(), QGaussLobatto(), and libMesh::QBase::scale().

bool libMesh::ReferenceCounter::_enable_print_counter = true
staticprotectedinherited

Flag to control whether reference count information is printed when print_info is called.

Definition at line 143 of file reference_counter.h.

Referenced by libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info(), and libMesh::ReferenceCounter::print_info().

Threads::spin_mutex libMesh::ReferenceCounter::_mutex
staticprotectedinherited

Mutual exclusion object to enable thread-safe reference counting.

Definition at line 137 of file reference_counter.h.

Threads::atomic< unsigned int > libMesh::ReferenceCounter::_n_objects
staticprotectedinherited

The number of objects. Print the reference count information when the number returns to 0.

Definition at line 132 of file reference_counter.h.

Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().

unsigned int libMesh::QBase::_p_level
protectedinherited

The p-level of the element for which the current values have been computed.

Definition at line 329 of file quadrature.h.

Referenced by libMesh::QBase::get_order(), libMesh::QBase::get_p_level(), and libMesh::QBase::init().

bool libMesh::QBase::allow_rules_with_negative_weights
inherited

Flag (default true) controlling the use of quadrature rules with negative weights. Set this to false to require rules with all positive weights.

Rules with negative weights can be unsuitable for some problems. For example, it is possible for a rule with negative weights to obtain a negative result when integrating a positive function.

A particular example: if rules with negative weights are not allowed, a request for TET,THIRD (5 points) will return the TET,FIFTH (14 points) rule instead, nearly tripling the computational effort required!

Definition at line 232 of file quadrature.h.

Referenced by libMesh::QGrundmann_Moller::init_2D(), libMesh::QGauss::init_3D(), libMesh::QMonomial::init_3D(), and libMesh::QGrundmann_Moller::init_3D().


The documentation for this class was generated from the following files: