www.mooseframework.org
Public Member Functions | 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 Order _order=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
 
QuadratureType type () const override
 
void setPoints (const std::vector< Point > &points)
 Set the quadrature points. More...
 
void setWeights (const std::vector< Real > &weights)
 Set the quadrature weights. More...
 
virtual bool shapes_need_reinit () override
 
virtual std::unique_ptr< QBase > clone () const override
 

Private Member Functions

void init_1D (const ElemType _type=INVALID_ELEM, unsigned int p_level=0) override
 These functions must be defined to fulfill the interface expected by the quadrature initialization routines. More...
 
void init_2D (const ElemType _type=INVALID_ELEM, unsigned int p_level=0) override
 
void init_3D (const ElemType _type=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 Order  _order = INVALID_ORDER 
)

Definition at line 15 of file ArbitraryQuadrature.C.

15 : QBase(d, o) {}

◆ 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

Definition at line 18 of file ArbitraryQuadrature.C.

19 {
20  return std::make_unique<ArbitraryQuadrature>(*this);
21 }

◆ init_1D()

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

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

Please do not modify the function names or signatures.

Definition at line 43 of file ArbitraryQuadrature.C.

44 {
45  this->_type = _type;
46  this->_p_level = p_level;
47 }

◆ init_2D()

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

Definition at line 50 of file ArbitraryQuadrature.C.

51 {
52  this->_type = _type;
53  this->_p_level = p_level;
54 }

◆ init_3D()

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

Definition at line 57 of file ArbitraryQuadrature.C.

58 {
59  this->_type = _type;
60  this->_p_level = p_level;
61 }

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ setPoints()

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

Set the quadrature points.

Note that this also sets the quadrature weights to unity

Definition at line 30 of file ArbitraryQuadrature.C.

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

31 {
32  _points = points;
33  _weights.resize(points.size(), 1.0);
34 }

◆ setWeights()

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

Set the quadrature weights.

Definition at line 37 of file ArbitraryQuadrature.C.

Referenced by Assembly::reinitLowerDElem().

38 {
39  _weights = weights;
40 }

◆ shapes_need_reinit()

virtual bool ArbitraryQuadrature::shapes_need_reinit ( )
inlineoverridevirtual

Definition at line 48 of file ArbitraryQuadrature.h.

48 { return true; }

◆ type()

QuadratureType ArbitraryQuadrature::type ( ) const
override

Definition at line 24 of file ArbitraryQuadrature.C.

25 {
26  return INVALID_Q_RULE;
27 }
INVALID_Q_RULE

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