libMesh
|
The QBase
class provides the basic functionality from which various quadrature rules can be derived.
More...
#include <quadrature.h>
Public Member Functions | |
QBase (const QBase &)=default | |
Copy/move ctor, copy/move assignment operator, and destructor are all explicitly defaulted for this simple class. More... | |
QBase (QBase &&)=default | |
QBase & | operator= (const QBase &)=default |
QBase & | operator= (QBase &&)=default |
virtual | ~QBase ()=default |
virtual std::unique_ptr< QBase > | clone () const |
virtual QuadratureType | type () const =0 |
ElemType | get_elem_type () const |
unsigned int | get_p_level () const |
unsigned int | n_points () const |
unsigned int | size () const |
Alias for n_points() to enable use in index_range. More... | |
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 Elem &e, unsigned int p_level=invalid_uint) |
Initializes the data structures for a quadrature rule for the element e . More... | |
virtual void | init (const ElemType type=INVALID_ELEM, unsigned int p_level=0, bool simple_type_only=false) |
Initializes the data structures for a quadrature rule for an element of type type . More... | |
virtual void | init (const QBase &other_rule) |
Initializes the data structures for a quadrature rule based on the element, element type, and p_level settings of other_rule . More... | |
virtual void | init (const Elem &elem, const std::vector< Real > &vertex_distance_func, unsigned int p_level=0) |
Initializes the data structures for an element potentially "cut" by a signed distance function. More... | |
Order | get_order () const |
Order | get_base_order () const |
void | print_info (std::ostream &os=libMesh::out) const |
Prints information relevant to the quadrature rule, by default to libMesh::out. More... | |
void | scale (std::pair< Real, Real > old_range, std::pair< Real, Real > new_range) |
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. More... | |
virtual bool | shapes_need_reinit () |
Static Public Member Functions | |
static std::unique_ptr< QBase > | build (std::string_view name, const unsigned int dim, const Order order=INVALID_ORDER) |
Builds a specific quadrature rule based on the name string. More... | |
static std::unique_ptr< QBase > | build (const QuadratureType qt, const unsigned int dim, const Order order=INVALID_ORDER) |
Builds a specific quadrature rule based on the QuadratureType. More... | |
static std::string | get_info () |
Gets a string containing the reference information. More... | |
static void | print_info (std::ostream &out_stream=libMesh::out) |
Prints the reference information, by default to libMesh::out . More... | |
static unsigned int | n_objects () |
Prints the number of outstanding (created, but not yet destroyed) objects. More... | |
static void | enable_print_counter_info () |
Methods to enable/disable the reference counter output from print_info() More... | |
static void | disable_print_counter_info () |
Public Attributes | |
bool | allow_rules_with_negative_weights |
Flag (default true) controlling the use of quadrature rules with negative weights. More... | |
bool | allow_nodal_pyramid_quadrature |
The flag's value defaults to false so that one does not accidentally use a nodal quadrature rule on Pyramid elements, since evaluating the inverse element Jacobian (e.g. More... | |
Protected Types | |
typedef std::map< std::string, std::pair< unsigned int, unsigned int > > | Counts |
Data structure to log the information. More... | |
Protected Member Functions | |
QBase (unsigned int dim, Order order=INVALID_ORDER) | |
Constructor. More... | |
virtual void | init_0D () |
Initializes the 0D quadrature rule by filling the points and weights vectors with the appropriate values. More... | |
virtual void | init_1D ()=0 |
Initializes the 1D quadrature rule by filling the points and weights vectors with the appropriate values. More... | |
virtual void | init_2D () |
Initializes the 2D quadrature rule by filling the points and weights vectors with the appropriate values. More... | |
virtual void | init_3D () |
Initializes the 3D quadrature rule by filling the points and weights vectors with the appropriate values. More... | |
void | tensor_product_quad (const QBase &q1D) |
Constructs a 2D rule from the tensor product of q1D with itself. More... | |
void | tensor_product_hex (const QBase &q1D) |
Computes the tensor product quadrature rule [q1D x q1D x q1D] from the 1D rule q1D. More... | |
void | tensor_product_prism (const QBase &q1D, const QBase &q2D) |
Computes the tensor product of a 1D quadrature rule and a 2D quadrature rule. More... | |
void | increment_constructor_count (const std::string &name) noexcept |
Increments the construction counter. More... | |
void | increment_destructor_count (const std::string &name) noexcept |
Increments the destruction counter. More... | |
Protected Attributes | |
unsigned int | _dim |
The spatial dimension of the quadrature rule. More... | |
Order | _order |
The polynomial order which the quadrature rule is capable of integrating exactly. More... | |
ElemType | _type |
The type of element for which the current values have been computed. More... | |
const Elem * | _elem |
The element for which the current values were computed, or nullptr if values were computed without a specific element. More... | |
unsigned int | _p_level |
The p-level of the element for which the current values have been computed. More... | |
std::vector< Point > | _points |
The locations of the quadrature points in reference element space. More... | |
std::vector< Real > | _weights |
The quadrature weights. More... | |
Static Protected Attributes | |
static Counts | _counts |
Actually holds the data. More... | |
static Threads::atomic< unsigned int > | _n_objects |
The number of objects. More... | |
static Threads::spin_mutex | _mutex |
Mutual exclusion object to enable thread-safe reference counting. More... | |
static bool | _enable_print_counter = true |
Flag to control whether reference count information is printed when print_info is called. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const QBase &q) |
Same as above, but allows you to use the stream syntax. More... | |
The QBase
class provides the basic functionality from which various quadrature rules can be derived.
It computes and stores the quadrature points (in reference element space) and associated weights.
Definition at line 61 of file quadrature.h.
|
protectedinherited |
Data structure to log the information.
The log is identified by the class name.
Definition at line 119 of file reference_counter.h.
|
protected |
Constructor.
Protected to prevent instantiation of this base class. Use the build() method instead.
Definition at line 27 of file quadrature.C.
|
default |
Copy/move ctor, copy/move assignment operator, and destructor are all explicitly defaulted for this simple class.
|
default |
|
virtualdefault |
|
static |
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 std::unique_ptr<QBase>
is returned so that the user does not accidentally leak it.
Definition at line 43 of file quadrature_build.C.
References _dim, _order, and type().
Referenced by assemble_poisson(), libMesh::InfFE< Dim, T_radial, T_map >::attach_quadrature_rule(), clone(), main(), libMesh::OverlapCoupling::OverlapCoupling(), libMesh::InfFE< Dim, T_radial, T_map >::reinit(), QuadratureTest::testBuild(), QuadratureTest::testJacobi(), and QuadratureTest::testPolynomials().
|
static |
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 std::unique_ptr<QBase>
is returned so that the user does not accidentally leak it.
Definition at line 54 of file quadrature_build.C.
References _dim, _order, 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::QNODAL, libMesh::QSIMPSON, libMesh::QTRAP, libMesh::THIRD, and libMesh::TWENTYTHIRD.
|
virtual |
Reimplemented in libMesh::QGrundmann_Moller, libMesh::QMonomial, libMesh::QJacobi, libMesh::QNodal, libMesh::QGrid, libMesh::QGauss, libMesh::QSimpson, libMesh::QTrap, libMesh::QConical, libMesh::QClough, and libMesh::QGaussLobatto.
Definition at line 38 of file quadrature.C.
References build(), get_dim(), get_order(), and type().
|
staticinherited |
Definition at line 100 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
|
staticinherited |
Methods to enable/disable the reference counter output from print_info()
Definition at line 94 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
|
inline |
This function should be used when comparing quadrature objects independently of their last initialization.
Definition at line 258 of file quadrature.h.
References _order.
|
inline |
Definition at line 150 of file quadrature.h.
References _dim.
Referenced by libMesh::InfFE< Dim, T_radial, T_map >::attach_quadrature_rule(), clone(), libMesh::QConical::conical_product_pyramid(), libMesh::QConical::conical_product_tet(), libMesh::QConical::conical_product_tri(), and QuadratureTest::testPolynomial().
|
inline |
Definition at line 121 of file quadrature.h.
References _type.
|
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().
|
inline |
Each additional power of p increases the quadrature order required to integrate the mass matrix by 2, hence the formula below.
Definition at line 249 of file quadrature.h.
References _order, and _p_level.
Referenced by libMesh::InfFE< Dim, T_radial, T_map >::attach_quadrature_rule(), clone(), libMesh::QConical::conical_product_pyramid(), libMesh::QConical::conical_product_tet(), libMesh::QConical::conical_product_tri(), libMesh::RBEIMConstruction::enrich_eim_approximation_on_interiors(), libMesh::QGaussLobatto::init_1D(), libMesh::QGauss::init_1D(), libMesh::QConical::init_1D(), libMesh::QJacobi::init_1D(), libMesh::QGrundmann_Moller::init_1D(), libMesh::QGaussLobatto::init_2D(), libMesh::QGauss::init_2D(), libMesh::QMonomial::init_2D(), libMesh::QGrundmann_Moller::init_2D(), libMesh::QGaussLobatto::init_3D(), libMesh::QGauss::init_3D(), libMesh::QMonomial::init_3D(), libMesh::QGrundmann_Moller::init_3D(), and libMesh::RBParametrizedFunction::preevaluate_parametrized_function_on_mesh().
|
inline |
Definition at line 126 of file quadrature.h.
References _p_level.
|
inline |
std::vector
containing the quadrature point locations in reference element space. Definition at line 156 of file quadrature.h.
References _points.
Referenced by assemble_ellipticdg(), libMesh::QClough::init_1D(), libMesh::QConical::init_1D(), libMesh::QNodal::init_1D(), libMesh::QMonomial::init_1D(), libMesh::QGrundmann_Moller::init_1D(), libMesh::QGaussLobatto::init_2D(), libMesh::QClough::init_2D(), libMesh::QGauss::init_2D(), libMesh::QNodal::init_2D(), libMesh::QMonomial::init_2D(), libMesh::QGaussLobatto::init_3D(), libMesh::QGauss::init_3D(), libMesh::QNodal::init_3D(), libMesh::QMonomial::init_3D(), and libMesh::OverlapCoupling::operator()().
|
inline |
std::vector
containing the quadrature point locations in reference element space as a writable reference. Definition at line 162 of file quadrature.h.
References _points.
|
inline |
std::vector
containing the quadrature weights. Definition at line 168 of file quadrature.h.
References _weights.
Referenced by libMesh::VariationalSmootherSystem::element_time_derivative(), libMesh::QClough::init_1D(), libMesh::QConical::init_1D(), libMesh::QNodal::init_1D(), libMesh::QMonomial::init_1D(), libMesh::QGrundmann_Moller::init_1D(), libMesh::QGaussLobatto::init_2D(), libMesh::QClough::init_2D(), libMesh::QGauss::init_2D(), libMesh::QNodal::init_2D(), libMesh::QMonomial::init_2D(), libMesh::QGaussLobatto::init_3D(), libMesh::QGauss::init_3D(), libMesh::QNodal::init_3D(), libMesh::QMonomial::init_3D(), and libMesh::OverlapCoupling::operator()().
|
inline |
std::vector
containing the quadrature weights. Definition at line 174 of file quadrature.h.
References _weights.
|
inlineprotectednoexceptinherited |
Increments the construction counter.
Should be called in the constructor of any derived class that will be reference counted.
Definition at line 183 of file reference_counter.h.
References libMesh::err, libMesh::BasicOStreamProxy< charT, traits >::get(), libMesh::Quality::name(), and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().
|
inlineprotectednoexceptinherited |
Increments the destruction counter.
Should be called in the destructor of any derived class that will be reference counted.
Definition at line 207 of file reference_counter.h.
References libMesh::err, libMesh::BasicOStreamProxy< charT, traits >::get(), libMesh::Quality::name(), and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().
|
virtual |
Initializes the data structures for a quadrature rule for the element e
.
If p_level
is specified it overrides the element p_level() elevation to use.
Definition at line 65 of file quadrature.C.
References _dim, _elem, _p_level, _type, libMesh::Elem::dim(), init_0D(), init_1D(), init_2D(), init_3D(), libMesh::invalid_uint, libMesh::Elem::p_level(), libMesh::Elem::runtime_topology(), and libMesh::Elem::type().
Referenced by init(), libMesh::QClough::init_1D(), libMesh::QConical::init_1D(), libMesh::QNodal::init_1D(), libMesh::QMonomial::init_1D(), libMesh::QGaussLobatto::init_2D(), libMesh::QClough::init_2D(), libMesh::QGauss::init_2D(), libMesh::QNodal::init_2D(), libMesh::QMonomial::init_2D(), libMesh::QGaussLobatto::init_3D(), libMesh::QGauss::init_3D(), libMesh::QSimpson::init_3D(), libMesh::QTrap::init_3D(), libMesh::QGrid::init_3D(), libMesh::QNodal::init_3D(), libMesh::QMonomial::init_3D(), libMesh::OverlapCoupling::operator()(), libMesh::QClough::QClough(), libMesh::QConical::QConical(), libMesh::QGauss::QGauss(), libMesh::QGaussLobatto::QGaussLobatto(), libMesh::QGrid::QGrid(), libMesh::QGrundmann_Moller::QGrundmann_Moller(), libMesh::QJacobi::QJacobi(), libMesh::QMonomial::QMonomial(), libMesh::QNodal::QNodal(), libMesh::QSimpson::QSimpson(), libMesh::QTrap::QTrap(), and libMesh::FE< Dim, LAGRANGE_VEC >::reinit_default_dual_shape_coeffs().
|
virtual |
Initializes the data structures for a quadrature rule for an element of type type
.
Some types, such as Polygon subclasses, might require more detailed element information and so might not be compatible with this API.
New code should use the Elem-based API for most use cases, but some code may initialize quadrature rules with simple ElemType values like triangles and edges for use in tensor product or conical product constructions; this code can set the simple_type_only
flag to avoid being identified as deprecated.
Definition at line 121 of file quadrature.C.
References _dim, _elem, _p_level, _type, libMesh::C0POLYGON, libMesh::C0POLYHEDRON, libMesh::EDGE2, init_0D(), init_1D(), init_2D(), and init_3D().
|
virtual |
Initializes the data structures for a quadrature rule based on the element, element type, and p_level settings of other_rule
.
Definition at line 178 of file quadrature.C.
References _elem, _p_level, _type, and init().
|
virtual |
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 188 of file quadrature.C.
References init(), and libMesh::Elem::type().
|
protectedvirtual |
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 198 of file quadrature.C.
References _points, and _weights.
Referenced by init().
|
protectedpure virtual |
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.
Implemented in libMesh::QGrundmann_Moller, libMesh::QMonomial, libMesh::QJacobi, libMesh::QNodal, libMesh::QConical, libMesh::QGrid, libMesh::QGauss, libMesh::QSimpson, libMesh::QTrap, libMesh::QClough, and libMesh::QGaussLobatto.
Referenced by init().
|
protectedvirtual |
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 overridden, throws an error.
Reimplemented in libMesh::QGrundmann_Moller, libMesh::QMonomial, libMesh::QNodal, libMesh::QConical, libMesh::QGrid, libMesh::QGauss, libMesh::QSimpson, libMesh::QTrap, libMesh::QClough, and libMesh::QGaussLobatto.
Definition at line 208 of file quadrature.C.
Referenced by init().
|
protectedvirtual |
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 overridden, throws an error.
Reimplemented in libMesh::QGrundmann_Moller, libMesh::QMonomial, libMesh::QNodal, libMesh::QConical, libMesh::QGrid, libMesh::QGauss, libMesh::QSimpson, libMesh::QTrap, libMesh::QClough, and libMesh::QGaussLobatto.
Definition at line 215 of file quadrature.C.
Referenced by init().
|
inlinestaticinherited |
Prints the number of outstanding (created, but not yet destroyed) objects.
Definition at line 85 of file reference_counter.h.
References libMesh::ReferenceCounter::_n_objects.
Referenced by libMesh::LibMeshInit::~LibMeshInit().
|
inline |
Definition at line 131 of file quadrature.h.
References _points, and libMesh::libmesh_assert().
Referenced by libMesh::ExactSolution::_compute_error(), assemble(), assemble_1D(), assemble_ellipticdg(), assemble_helmholtz(), assemble_poisson(), assemble_shell(), assemble_wave(), assembly_with_dg_fem_context(), AssemblyA0::boundary_assembly(), AssemblyA1::boundary_assembly(), AssemblyF0::boundary_assembly(), AssemblyF1::boundary_assembly(), AssemblyA2::boundary_assembly(), AssemblyF2::boundary_assembly(), A2::boundary_assembly(), A3::boundary_assembly(), F0::boundary_assembly(), Output0::boundary_assembly(), compute_enriched_soln(), libMesh::FirstOrderUnsteadySolver::compute_second_order_eqns(), libMesh::QConical::conical_product_pyramid(), libMesh::QConical::conical_product_tet(), libMesh::QConical::conical_product_tri(), libMesh::HDGProblem::create_identity_jacobian(), libMesh::HDGProblem::create_identity_residual(), SecondOrderScalarSystemSecondOrderTimeSolverBase::damping_residual(), SecondOrderScalarSystemFirstOrderTimeSolverBase::damping_residual(), NavierSystem::element_constraint(), CoupledSystem::element_constraint(), PoissonSystem::element_postprocess(), LaplaceSystem::element_postprocess(), LaplaceQoI::element_qoi(), HeatSystem::element_qoi(), LaplaceQoI::element_qoi_derivative(), LaplaceSystem::element_qoi_derivative(), HeatSystem::element_qoi_derivative(), NavierSystem::element_time_derivative(), SolidSystem::element_time_derivative(), PoissonSystem::element_time_derivative(), LaplaceSystem::element_time_derivative(), CurlCurlSystem::element_time_derivative(), ElasticitySystem::element_time_derivative(), CoupledSystem::element_time_derivative(), HilbertSystem::element_time_derivative(), HeatSystem::element_time_derivative(), FirstOrderScalarSystemBase::element_time_derivative(), SecondOrderScalarSystemFirstOrderTimeSolverBase::element_time_derivative(), fe_assembly(), A0::interior_assembly(), B::interior_assembly(), M0::interior_assembly(), A1::interior_assembly(), AssemblyA0::interior_assembly(), AcousticsInnerProduct::interior_assembly(), AssemblyA1::interior_assembly(), A2::interior_assembly(), AssemblyA2::interior_assembly(), F0::interior_assembly(), OutputAssembly::interior_assembly(), EIM_IP_assembly::interior_assembly(), EIM_F::interior_assembly(), AssemblyEIM::interior_assembly(), InnerProductAssembly::interior_assembly(), AssemblyF0::interior_assembly(), AssemblyF1::interior_assembly(), Ex6InnerProduct::interior_assembly(), LaplaceYoung::jacobian(), NavierSystem::mass_residual(), ElasticitySystem::mass_residual(), libMesh::FEMPhysics::mass_residual(), FirstOrderScalarSystemBase::mass_residual(), SecondOrderScalarSystemSecondOrderTimeSolverBase::mass_residual(), SecondOrderScalarSystemFirstOrderTimeSolverBase::mass_residual(), libMesh::FEAbstract::n_quadrature_points(), print_info(), LaplaceYoung::residual(), LaplaceSystem::side_constraint(), LaplaceSystem::side_postprocess(), CoupledSystemQoI::side_qoi(), CoupledSystemQoI::side_qoi_derivative(), LaplaceSystem::side_qoi_derivative(), SolidSystem::side_time_derivative(), CurlCurlSystem::side_time_derivative(), ElasticitySystem::side_time_derivative(), size(), tensor_product_hex(), tensor_product_prism(), tensor_product_quad(), and QuadratureTest::testPolynomial().
|
staticinherited |
Prints the reference information, by default to libMesh::out
.
Definition at line 81 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().
Referenced by libMesh::LibMeshInit::~LibMeshInit().
void libMesh::QBase::print_info | ( | std::ostream & | os = libMesh::out | ) | const |
Prints information relevant to the quadrature rule, by default to libMesh::out.
Definition at line 43 of file quadrature.C.
References _points, _weights, libMesh::index_range(), libMesh::libmesh_assert(), n_points(), and libMesh::Real.
Referenced by libMesh::operator<<().
Definition at line 179 of file quadrature.h.
References _points.
Referenced by libMesh::QConical::conical_product_pyramid(), libMesh::QConical::conical_product_tet(), libMesh::QConical::conical_product_tri(), tensor_product_hex(), tensor_product_prism(), tensor_product_quad(), and QuadratureTest::testPolynomial().
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 222 of file quadrature.C.
References _dim, _points, _weights, libMesh::index_range(), and libMesh::Real.
Referenced by libMesh::QConical::conical_product_tet(), and libMesh::QConical::conical_product_tri().
|
inlinevirtual |
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 286 of file quadrature.h.
|
inline |
Alias for n_points() to enable use in index_range.
Definition at line 142 of file quadrature.h.
References n_points().
Referenced by libMesh::Elem::true_centroid().
|
protected |
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 283 of file quadrature.C.
References _points, _weights, n_points(), qp(), and w().
Referenced by libMesh::QGaussLobatto::init_3D(), libMesh::QTrap::init_3D(), libMesh::QSimpson::init_3D(), libMesh::QGauss::init_3D(), and libMesh::QGrid::init_3D().
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 310 of file quadrature.C.
References _points, _weights, n_points(), qp(), and w().
Referenced by libMesh::QGauss::init_3D(), libMesh::QTrap::init_3D(), libMesh::QSimpson::init_3D(), and libMesh::QGrid::init_3D().
|
protected |
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 256 of file quadrature.C.
References _points, _weights, n_points(), qp(), and w().
Referenced by libMesh::QGaussLobatto::init_2D(), libMesh::QTrap::init_2D(), libMesh::QSimpson::init_2D(), libMesh::QGauss::init_2D(), and libMesh::QGrid::init_2D().
|
pure virtual |
Implemented in libMesh::QGrundmann_Moller, libMesh::QMonomial, libMesh::QJacobi, libMesh::QNodal, libMesh::QGrid, libMesh::QGauss, libMesh::QSimpson, libMesh::QTrap, libMesh::QConical, libMesh::QClough, and libMesh::QGaussLobatto.
Referenced by libMesh::InfFE< Dim, T_radial, T_map >::attach_quadrature_rule(), build(), and clone().
Definition at line 188 of file quadrature.h.
References _weights.
Referenced by libMesh::QConical::conical_product_pyramid(), libMesh::QConical::conical_product_tet(), libMesh::QConical::conical_product_tri(), tensor_product_hex(), tensor_product_prism(), tensor_product_quad(), and QuadratureTest::testPolynomial().
|
friend |
Same as above, but allows you to use the stream syntax.
Definition at line 337 of file quadrature.C.
|
staticprotectedinherited |
Actually holds the data.
Definition at line 124 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::get_info().
|
protected |
The spatial dimension of the quadrature rule.
Definition at line 379 of file quadrature.h.
Referenced by build(), get_dim(), init(), libMesh::QGaussLobatto::init_2D(), libMesh::QGaussLobatto::init_3D(), libMesh::QGaussLobatto::QGaussLobatto(), libMesh::QJacobi::QJacobi(), and scale().
|
protected |
The element for which the current values were computed, or nullptr if values were computed without a specific element.
Definition at line 397 of file quadrature.h.
Referenced by init(), libMesh::QGauss::init_2D(), libMesh::QNodal::init_2D(), libMesh::QGauss::init_3D(), and libMesh::QNodal::init_3D().
|
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().
|
staticprotectedinherited |
Mutual exclusion object to enable thread-safe reference counting.
Definition at line 137 of file reference_counter.h.
|
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().
|
protected |
The polynomial order which the quadrature rule is capable of integrating exactly.
Definition at line 385 of file quadrature.h.
Referenced by build(), get_base_order(), get_order(), libMesh::QGaussLobatto::init_1D(), libMesh::QClough::init_1D(), libMesh::QGauss::init_1D(), libMesh::QGrid::init_1D(), libMesh::QNodal::init_1D(), libMesh::QJacobi::init_1D(), libMesh::QMonomial::init_1D(), libMesh::QGaussLobatto::init_2D(), libMesh::QClough::init_2D(), libMesh::QGauss::init_2D(), libMesh::QGrid::init_2D(), libMesh::QNodal::init_2D(), libMesh::QMonomial::init_2D(), libMesh::QGaussLobatto::init_3D(), libMesh::QGauss::init_3D(), libMesh::QGrid::init_3D(), libMesh::QNodal::init_3D(), and libMesh::QMonomial::init_3D().
|
protected |
The p-level of the element for which the current values have been computed.
Definition at line 403 of file quadrature.h.
Referenced by get_order(), get_p_level(), init(), libMesh::QClough::init_2D(), libMesh::QGauss::init_2D(), libMesh::QTrap::init_3D(), libMesh::QSimpson::init_3D(), and libMesh::QGauss::init_3D().
|
protected |
The locations of the quadrature points in reference element space.
Definition at line 409 of file quadrature.h.
Referenced by libMesh::QConical::conical_product_pyramid(), libMesh::QConical::conical_product_tet(), libMesh::QConical::conical_product_tri(), libMesh::QGauss::dunavant_rule(), libMesh::QGauss::dunavant_rule2(), get_points(), libMesh::QGrundmann_Moller::gm_rule(), init_0D(), libMesh::QGaussLobatto::init_1D(), libMesh::QClough::init_1D(), libMesh::QGauss::init_1D(), libMesh::QSimpson::init_1D(), libMesh::QTrap::init_1D(), libMesh::QGrid::init_1D(), libMesh::QConical::init_1D(), libMesh::QNodal::init_1D(), libMesh::QJacobi::init_1D(), libMesh::QMonomial::init_1D(), libMesh::QGrundmann_Moller::init_1D(), libMesh::QGaussLobatto::init_2D(), libMesh::QClough::init_2D(), libMesh::QGauss::init_2D(), libMesh::QSimpson::init_2D(), libMesh::QTrap::init_2D(), libMesh::QGrid::init_2D(), libMesh::QNodal::init_2D(), libMesh::QMonomial::init_2D(), libMesh::QGaussLobatto::init_3D(), libMesh::QSimpson::init_3D(), libMesh::QGauss::init_3D(), libMesh::QTrap::init_3D(), libMesh::QGrid::init_3D(), libMesh::QNodal::init_3D(), libMesh::QMonomial::init_3D(), libMesh::QGrundmann_Moller::init_3D(), libMesh::QGauss::keast_rule(), libMesh::QMonomial::kim_rule(), n_points(), print_info(), qp(), scale(), libMesh::QMonomial::stroud_rule(), tensor_product_hex(), tensor_product_prism(), tensor_product_quad(), and libMesh::QMonomial::wissmann_rule().
|
protected |
The type of element for which the current values have been computed.
Definition at line 391 of file quadrature.h.
Referenced by get_elem_type(), init(), libMesh::QNodal::init_1D(), libMesh::QGaussLobatto::init_2D(), libMesh::QClough::init_2D(), libMesh::QSimpson::init_2D(), libMesh::QTrap::init_2D(), libMesh::QGauss::init_2D(), libMesh::QGrid::init_2D(), libMesh::QConical::init_2D(), libMesh::QNodal::init_2D(), libMesh::QMonomial::init_2D(), libMesh::QGrundmann_Moller::init_2D(), libMesh::QGaussLobatto::init_3D(), libMesh::QClough::init_3D(), libMesh::QTrap::init_3D(), libMesh::QSimpson::init_3D(), libMesh::QGauss::init_3D(), libMesh::QGrid::init_3D(), libMesh::QConical::init_3D(), libMesh::QNodal::init_3D(), libMesh::QMonomial::init_3D(), and libMesh::QGrundmann_Moller::init_3D().
|
protected |
The quadrature weights.
The order of the weights matches the ordering of the _points vector.
Definition at line 415 of file quadrature.h.
Referenced by libMesh::QConical::conical_product_pyramid(), libMesh::QConical::conical_product_tet(), libMesh::QConical::conical_product_tri(), libMesh::QGauss::dunavant_rule(), libMesh::QGauss::dunavant_rule2(), get_weights(), libMesh::QGrundmann_Moller::gm_rule(), init_0D(), libMesh::QGaussLobatto::init_1D(), libMesh::QClough::init_1D(), libMesh::QGauss::init_1D(), libMesh::QSimpson::init_1D(), libMesh::QTrap::init_1D(), libMesh::QGrid::init_1D(), libMesh::QConical::init_1D(), libMesh::QNodal::init_1D(), libMesh::QJacobi::init_1D(), libMesh::QMonomial::init_1D(), libMesh::QGrundmann_Moller::init_1D(), libMesh::QGaussLobatto::init_2D(), libMesh::QClough::init_2D(), libMesh::QGauss::init_2D(), libMesh::QTrap::init_2D(), libMesh::QSimpson::init_2D(), libMesh::QGrid::init_2D(), libMesh::QNodal::init_2D(), libMesh::QMonomial::init_2D(), libMesh::QGaussLobatto::init_3D(), libMesh::QSimpson::init_3D(), libMesh::QGauss::init_3D(), libMesh::QTrap::init_3D(), libMesh::QGrid::init_3D(), libMesh::QNodal::init_3D(), libMesh::QMonomial::init_3D(), libMesh::QGrundmann_Moller::init_3D(), libMesh::QGauss::keast_rule(), libMesh::QMonomial::kim_rule(), print_info(), scale(), libMesh::QMonomial::stroud_rule(), tensor_product_hex(), tensor_product_prism(), tensor_product_quad(), w(), and libMesh::QMonomial::wissmann_rule().
bool libMesh::QBase::allow_nodal_pyramid_quadrature |
The flag's value defaults to false so that one does not accidentally use a nodal quadrature rule on Pyramid elements, since evaluating the inverse element Jacobian (e.g.
dphi) is not well-defined at the Pyramid apex because the element Jacobian is zero there.
We do not want to completely prevent someone from using a nodal quadrature rule on Pyramids, however, since there are legitimate use cases (lumped mass matrix) so the flag can be set to true to override this behavior.
Definition at line 314 of file quadrature.h.
Referenced by libMesh::QSimpson::init_3D(), libMesh::QTrap::init_3D(), and libMesh::QNodal::init_3D().
bool libMesh::QBase::allow_rules_with_negative_weights |
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 301 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().