17#include "libmesh/data_type.h"
43 virtual void execute()
override;
63 QPData(
const Point & q_point, dof_id_type elem_id,
short qp, Real volume, Real value)
69 using Result = std::map<dof_id_type, std::vector<Real>>;
99 nanoflann::L2_Simple_Adaptor<Real, PointListAdaptor<QPData>>,
const InputParameters & parameters() const
Get the parameters of the object.
Gather and communicate a full list of all quadrature points and the values of a selected material pro...
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
enum RadialAverage::WeightsType _weights_type
std::vector< std::vector< const Elem * > > _nodes_to_elem_map
The data structure used to find neighboring elements give a node ID.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
const Real _radius
cut-off radius
std::vector< std::set< std::size_t > > _communication_lists
QPData indices to send to the various processors.
std::set< Point > _boundary_nodes
set of nodes on the boundary of the current processor domain
const Real _padding
communication padding distance
virtual void execute() override
Execute method.
processor_id_type _my_pid
std::map< dof_id_type, std::vector< Real > > Result
bool _update_communication_lists
std::unique_ptr< KDTreeType > _kd_tree
spatial index (nanoflann guarantees this to be threadsafe under read-only operations)
virtual void threadJoin(const UserObject &y) override
Must override.
std::vector< processor_id_type > _candidate_procs
processors to send (potentially empty) data to
virtual void meshChanged() override
Called on this object when the mesh changes.
void updateCommunicationLists()
static InputParameters validParams()
Result _average
average result
WeightsType
distance based weight function
virtual void finalize() override
Finalize.
std::set< std::size_t > _boundary_data_indices
set of all _qp_data indices that are within _radius of any _boundary_nodes
const MaterialProperty< Real > & _prop
material to be averaged
nanoflann::KDTreeSingleIndexAdaptor< nanoflann::L2_Simple_Adaptor< Real, PointListAdaptor< QPData > >, PointListAdaptor< QPData >, LIBMESH_DIM, std::size_t > KDTreeType
std::vector< QPData > _qp_data
gathered data
const Result & getAverage() const
RadialAverage threaded loop.
Base class for user-specific data.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
dof_id_type _elem_id
element id
Real _volume
current value * _JxW
short _qp
index of the quadrature point
Point _q_point
physical coordinates of the quadrature point
QPData(const Point &q_point, dof_id_type elem_id, short qp, Real volume, Real value)
Real _value
variable value