https://mooseframework.inl.gov
ArbitraryQuadrature.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 // MOOSE includes
13 #include "Moose.h"
14 
15 #include "libmesh/quadrature.h"
16 
22 {
23 public:
24  ArbitraryQuadrature(const unsigned int _dim,
26 
31  ArbitraryQuadrature(const ArbitraryQuadrature &) = default;
35  virtual ~ArbitraryQuadrature() = default;
36 
37  libMesh::QuadratureType type() const override;
38 
42  void setPoints(const std::vector<libMesh::Point> & points);
43 
47  void setWeights(const std::vector<libMesh::Real> & weights);
48 
49  virtual bool shapes_need_reinit() override { return true; }
50 
51  virtual std::unique_ptr<libMesh::QBase> clone() const override;
52 
53 private:
60 #ifdef LIBMESH_QBASE_INIT_ARGUMENTS_REMOVED
61  void init_1D() override;
62  void init_2D() override;
63  void init_3D() override;
64 #else
66  unsigned int p_level = 0) override;
68  unsigned int p_level = 0) override;
70  unsigned int p_level = 0) override;
71 #endif // LIBMESH_QBASE_INIT_ARGUMENTS_REMOVED
72 };
libMesh::QuadratureType type() const override
void init_1D() override
These functions must be defined to fulfill the interface expected by the quadrature initialization ro...
void init_2D() override
ElemType _type
ArbitraryQuadrature & operator=(const ArbitraryQuadrature &)=default
unsigned int _dim
void setWeights(const std::vector< libMesh::Real > &weights)
Set the quadrature weights.
virtual ~ArbitraryQuadrature()=default
Implements a fake quadrature rule where you can specify the locations (in the reference domain) of th...
void setPoints(const std::vector< libMesh::Point > &points)
Set the quadrature points.
virtual std::unique_ptr< libMesh::QBase > clone() const override
ArbitraryQuadrature(const unsigned int _dim, const libMesh::Order _order=libMesh::INVALID_ORDER)
void init_3D() override
virtual bool shapes_need_reinit() override