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