https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
ArbitraryQuadrature Class Reference

Implements a fake quadrature rule where you can specify the locations (in the reference domain) of the quadrature points. More...

#include <ArbitraryQuadrature.h>

Inheritance diagram for ArbitraryQuadrature:
[legend]

Public Member Functions

 ArbitraryQuadrature (const unsigned int _dim, const libMesh::Order _order=libMesh::INVALID_ORDER)
 
 ArbitraryQuadrature (const ArbitraryQuadrature &)=default
 Copy/move ctor, copy/move assignment operator, and destructor are all explicitly defaulted for this simple class. More...
 
 ArbitraryQuadrature (ArbitraryQuadrature &&)=default
 
ArbitraryQuadratureoperator= (const ArbitraryQuadrature &)=default
 
ArbitraryQuadratureoperator= (ArbitraryQuadrature &&)=default
 
virtual ~ArbitraryQuadrature ()=default
 
libMesh::QuadratureType type () const override
 
void setPoints (const std::vector< libMesh::Point > &points)
 Set the quadrature points. More...
 
void setWeights (const std::vector< libMesh::Real > &weights)
 Set the quadrature weights. More...
 
virtual bool shapes_need_reinit () override
 
virtual std::unique_ptr< libMesh::QBaseclone () const override
 
ElemType get_elem_type () const
 
unsigned int get_p_level () const
 
unsigned int n_points () const
 
unsigned int size () 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 Elem &e, unsigned int p_level=invalid_uint)
 
virtual void init (const ElemType type=INVALID_ELEM, unsigned int p_level=0, bool simple_type_only=false)
 
virtual void init (const QBase &other_rule)
 
virtual void init (const Elem &elem, const std::vector< Real > &vertex_distance_func, unsigned int p_level=0)
 
Order get_order () const
 
Order get_base_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)
 

Static Public Member Functions

static void print_info (std::ostream &out_stream=libMesh::out)
 
static std::unique_ptr< QBasebuild (std::string_view name, const unsigned int dim, const Order order=INVALID_ORDER)
 
static std::unique_ptr< QBasebuild (const QuadratureType qt, const unsigned int dim, const Order order=INVALID_ORDER)
 
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
 
bool allow_nodal_pyramid_quadrature
 

Protected Types

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

Protected Member Functions

virtual void init_0D ()
 
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) noexcept
 
void increment_destructor_count (const std::string &name) noexcept
 

Protected Attributes

unsigned int _dim
 
Order _order
 
ElemType _type
 
const Elem * _elem
 
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
 

Private Member Functions

void init_1D () override
 These functions must be defined to fulfill the interface expected by the quadrature initialization routines. More...
 
void init_2D () override
 
void init_3D () override
 
void init_1D (const libMesh::ElemType _type=libMesh::INVALID_ELEM, unsigned int p_level=0) override
 
void init_2D (const libMesh::ElemType _type=libMesh::INVALID_ELEM, unsigned int p_level=0) override
 
void init_3D (const libMesh::ElemType _type=libMesh::INVALID_ELEM, unsigned int p_level=0) override
 

Detailed Description

Implements a fake quadrature rule where you can specify the locations (in the reference domain) of the quadrature points.

Definition at line 21 of file ArbitraryQuadrature.h.

Constructor & Destructor Documentation

◆ ArbitraryQuadrature() [1/3]

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

◆ ArbitraryQuadrature() [2/3]

ArbitraryQuadrature::ArbitraryQuadrature ( const ArbitraryQuadrature )
default

Copy/move ctor, copy/move assignment operator, and destructor are all explicitly defaulted for this simple class.

◆ ArbitraryQuadrature() [3/3]

ArbitraryQuadrature::ArbitraryQuadrature ( ArbitraryQuadrature &&  )
default

◆ ~ArbitraryQuadrature()

virtual ArbitraryQuadrature::~ArbitraryQuadrature ( )
virtualdefault

Member Function Documentation

◆ clone()

std::unique_ptr< QBase > ArbitraryQuadrature::clone ( ) const
overridevirtual

Reimplemented from libMesh::QBase.

Definition at line 20 of file ArbitraryQuadrature.C.

21 {
22  return std::make_unique<ArbitraryQuadrature>(*this);
23 }

◆ init_1D() [1/2]

void ArbitraryQuadrature::init_1D ( )
overrideprivatevirtual

These functions must be defined to fulfill the interface expected by the quadrature initialization routines.

The names and signatures depend on what version of libMesh we are compiled against.

Implements libMesh::QBase.

Definition at line 46 of file ArbitraryQuadrature.C.

47 {
48 }

◆ init_1D() [2/2]

void ArbitraryQuadrature::init_1D ( const libMesh::ElemType  _type = libMesh::INVALID_ELEM,
unsigned int  p_level = 0 
)
overrideprivate

◆ init_2D() [1/2]

void ArbitraryQuadrature::init_2D ( )
overrideprivatevirtual

Reimplemented from libMesh::QBase.

Definition at line 51 of file ArbitraryQuadrature.C.

52 {
53 }

◆ init_2D() [2/2]

void ArbitraryQuadrature::init_2D ( const libMesh::ElemType  _type = libMesh::INVALID_ELEM,
unsigned int  p_level = 0 
)
overrideprivate

◆ init_3D() [1/2]

void ArbitraryQuadrature::init_3D ( )
overrideprivatevirtual

Reimplemented from libMesh::QBase.

Definition at line 56 of file ArbitraryQuadrature.C.

57 {
58 }

◆ init_3D() [2/2]

void ArbitraryQuadrature::init_3D ( const libMesh::ElemType  _type = libMesh::INVALID_ELEM,
unsigned int  p_level = 0 
)
overrideprivate

◆ operator=() [1/2]

ArbitraryQuadrature& ArbitraryQuadrature::operator= ( const ArbitraryQuadrature )
default

◆ operator=() [2/2]

ArbitraryQuadrature& ArbitraryQuadrature::operator= ( ArbitraryQuadrature &&  )
default

◆ setPoints()

void ArbitraryQuadrature::setPoints ( const std::vector< libMesh::Point > &  points)

Set the quadrature points.

Note that this also sets the quadrature weights to unity

Definition at line 32 of file ArbitraryQuadrature.C.

Referenced by MooseVariableFE< Real >::evaluate(), Assembly::reinitLowerDElem(), and Assembly::reinitNeighborFaceRef().

33 {
34  _points = points;
35  _weights.resize(points.size(), 1.0);
36 }
std::vector< Point > _points
std::vector< Real > _weights

◆ setWeights()

void ArbitraryQuadrature::setWeights ( const std::vector< libMesh::Real > &  weights)

Set the quadrature weights.

Definition at line 39 of file ArbitraryQuadrature.C.

Referenced by Assembly::reinitLowerDElem().

40 {
41  _weights = weights;
42 }
std::vector< Real > _weights

◆ shapes_need_reinit()

virtual bool ArbitraryQuadrature::shapes_need_reinit ( )
inlineoverridevirtual

Reimplemented from libMesh::QBase.

Definition at line 49 of file ArbitraryQuadrature.h.

49 { return true; }

◆ type()

QuadratureType ArbitraryQuadrature::type ( ) const
overridevirtual

Implements libMesh::QBase.

Definition at line 26 of file ArbitraryQuadrature.C.

27 {
29 }

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