11#include "libmesh/quadrature_gauss.h"
25 "Type of the quadrature rule");
28 "Order of the volumetric quadrature. If unspecified, defaults to the "
29 "local element default order. This is not the problem default, which "
30 "is based on the order of the variables in the system.");
33 params.
set<
bool>(
"auto_sort") =
false;
35 params.
set<
bool>(
"auto_broadcast") =
true;
43 _mesh(_subproblem.
mesh()),
44 _q_type(
Moose::stringToEnum<QuadratureType>(getParam<
MooseEnum>(
"quadrature_type"))),
45 _q_order(
Moose::stringToEnum<Order>(getParam<
MooseEnum>(
"quadrature_order")))
63 unsigned int b_index = 0;
64 for (
const auto & sub_id :
blockIDs())
66 for (
const auto & elem :
_mesh.
getMesh().active_local_subdomain_elements_ptr_range(sub_id))
69 const FEFamily mapping_family = FEMap::map_fe_type(*elem);
70 const FEType fe_type(elem->default_order(), mapping_family);
71 std::unique_ptr<FEBase> fe = FEBase::build(elem->dim(), fe_type);
74 auto qrule = QBase::build(
_q_type, elem->dim(), q_order);
75 fe->attach_quadrature_rule(qrule.get());
76 const auto & q_points = fe->get_xyz();
79 for (
const auto & q : q_points)
91 for (
const auto & elem :
_mesh.
getMesh().active_local_element_ptr_range())
94 const FEFamily mapping_family = FEMap::map_fe_type(*elem);
95 const FEType fe_type(elem->default_order(), mapping_family);
96 std::unique_ptr<FEBase> fe = FEBase::build(elem->dim(), fe_type);
99 auto qrule = QBase::build(
_q_type, elem->dim(), q_order);
100 fe->attach_quadrature_rule(qrule.get());
101 const auto & q_points = fe->get_xyz();
104 for (
const auto & q : q_points)
registerMooseObject("MooseApp", QuadraturePointsPositions)
An interface that restricts an object to subdomains via the 'blocks' input parameter.
virtual const std::set< SubdomainID > & blockIDs() const
Return the block subdomain ids for this object Note, if this is not block restricted,...
unsigned int numBlocks() const
Return the number of blocks for this object.
virtual bool blockRestricted() const
Returns true if this object has been restricted to a block.
static InputParameters validParams()
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Positions objects are under the hood Reporters.
std::vector< std::vector< Point > > _positions_2d
2D storage for all the positions
void clearPositions()
Clear all positions vectors.
std::vector< Point > & _positions
For now, only the 1D vector will be shared across all ranks.
static InputParameters validParams()
virtual void finalize() override
In charge of reduction across all ranks & sorting for consistent output.
bool _initialized
Whether the positions object has been initialized. This must be set by derived objects.
Positions of all the quadrature points.
libMesh::QuadratureType _q_type
Type of the quadrature.
static InputParameters validParams()
const MooseMesh & _mesh
Reference to the mesh.
virtual void initialize() override
In charge of computing / loading the positions.
QuadraturePointsPositions(const InputParameters ¶meters)
libMesh::Order _q_order
Order of the quadrature.
static MooseEnum getQuadratureOrderEnum()
Return the potential selections for the order of the quadrature, with an 'auto' default.
static MooseEnum getQuadratureTypesEnum()
Return the possible selections for the type of the quadrature.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...