57 std::vector<BoundingBox<dim>> all_boxes;
60 if (cell->is_locally_owned())
61 all_boxes.emplace_back(cell->bounding_box());
63 const auto local_boxes =
66 global_bounding_boxes =
70 Assert(!global_bounding_boxes.empty(),
72 "I was expecting the "
73 "global_bounding_boxes to be filled at this stage. "
74 "Make sure you fill this vector before trying to use it "
75 "here. Bailing out."));
81std::vector<std::vector<BoundingBox<dim>>>
99std::map<unsigned int, IndexSet>
102 const std::vector<std::vector<double>> &properties)
105 auto local_indices_map =
106 particles.insert_global_particles(points,
109 return local_indices_map;
void write_vtu_in_parallel(const std::string &filename, const MPI_Comm comm) const
ParameterAcceptor(const std::string §ion_name="")
void add_parameter(const std::string &entry, ParameterType ¶meter, const std::string &documentation="", ParameterHandler &prm_=prm, const Patterns::PatternBase &pattern=*Patterns::Tools::Convert< ParameterType >::to_pattern())
void build_patches(const Particles::ParticleHandler< dim, spacedim > &particles, const std::vector< std::string > &data_component_names={}, const std::vector< DataComponentInterpretation::DataComponentInterpretation > &data_component_interpretations={})
SmartPointer< const Mapping< dim > > mapping
Smart pointer to the mapping associated with the triangulation.
std::vector< std::vector< BoundingBox< dim > > > global_bounding_boxes
void output_particles(const std::string &output_name) const
Outputs the current state of the particles to a file.
std::map< unsigned int, IndexSet > insert_points(const std::vector< Point< dim > > &points, const std::vector< std::vector< double > > &properties={})
std::vector< std::vector< BoundingBox< dim > > > get_global_bounding_boxes() const
const Particles::ParticleHandler< dim > & get_particles() const
MPI_Comm mpi_communicator
Get the MPI communicator associated with the triangulation.
SmartPointer< const parallel::TriangulationBase< dim > > tria_background
Smart pointer to the background triangulation.
Particles::ParticleHandler< dim > particles
Handler for managing particles in the simulation.
const ParticleCouplingParameters< dim > & par
Parameters for particle coupling.
void initialize_particle_handler(const parallel::TriangulationBase< dim > &tria_background, const Mapping< dim > &mapping=StaticMappingQ1< dim >::mapping)
ParticleCoupling(const ParticleCouplingParameters< dim > &par)
Constructor.
Stores parameters related to particle coupling in a simulation.
ParticleCouplingParameters()
Constructor that initializes the parameters.
unsigned int rtree_extraction_level
unsigned int n_locally_owned_active_cells() const
IteratorRange< active_cell_iterator > active_cell_iterators() const
#define Assert(cond, exc)
#define AssertThrow(cond, exc)
std::vector< T > all_gather(const MPI_Comm comm, const T &object_to_send)
std::vector< BoundingBox< boost::geometry::dimension< typename Rtree::indexable_type >::value > > extract_rtree_level(const Rtree &tree, const unsigned int level)
RTree< typename LeafTypeIterator::value_type, IndexType, IndexableGetter > pack_rtree(const LeafTypeIterator &begin, const LeafTypeIterator &end)