16#include "libmesh/parallel_algebra.h"
28 "Automatically generates Sub-App positions from centroids of elements in the parent app "
46 for (
const auto & elem_ptr : parent_app_mesh.
getMesh().active_local_element_ptr_range())
48 _positions.push_back(elem_ptr->vertex_average());
registerMooseObject("MooseApp", CentroidMultiApp)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
An interface that restricts an object to subdomains via the 'blocks' input parameter.
bool hasBlocks(const SubdomainName &name) const
Test if the supplied block name is valid for this object.
static InputParameters validParams()
Automatically generates Sub-App positions from centroids of elements in the master mesh.
static InputParameters validParams()
virtual void fillPositions() override
fill in _positions with the positions of the sub-aps
CentroidMultiApp(const InputParameters ¶meters)
virtual MooseMesh & mesh() override
const std::string & _name
The name of this class.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
FEProblemBase & _fe_problem
The FEProblemBase this MultiApp is part of.
std::vector< Point > _positions
The positions of all of the apps, using input constant vectors (to be deprecated)
void allgather(const T &send_data, std::vector< T, A > &recv_data) const
MultiApp Implementation for Transient Apps.
static InputParameters validParams()
const Parallel::Communicator & comm() const