10template <
int dim,
typename PropertiesIndex>
17template <
int dim,
typename PropertiesIndex>
25template <
int dim,
typename PropertiesIndex>
35template <
int dim,
typename PropertiesIndex>
41 unsigned int maximum_particle_number_on_proc =
44 unsigned int minimum_particle_number_on_proc =
47 unsigned int average_particle_number_on_proc =
52 if ((maximum_particle_number_on_proc - minimum_particle_number_on_proc) >
58template <
int dim,
typename PropertiesIndex>
68 double load_weight = 0.0;
70 for (
const auto &cell :
triangulation->active_cell_iterators())
72 if (cell->is_locally_owned())
75 Point<dim> cell_barycenter = cell->center();
80 const unsigned int cell_mobility_status =
82 const unsigned int n_particles_in_cell =
89 if (cell_mobility_status ==
91 PropertiesIndex>::static_active ||
92 cell_mobility_status ==
94 PropertiesIndex>::advected_active)
98 else if (cell_mobility_status ==
100 PropertiesIndex>::inactive ||
101 cell_mobility_status ==
114 double maximum_load_on_proc =
118 double minimum_load_on_proc =
124 if ((maximum_load_on_proc - minimum_load_on_proc) >
138template <
int dim,
typename PropertiesIndex>
141 const typename parallel::distributed::Triangulation<dim>::cell_iterator &cell,
142 const CellStatus status)
const
145 if (!cell->is_locally_owned())
150 case CellStatus::cell_will_persist:
151 case CellStatus::cell_will_be_refined:
154 const unsigned int n_particles_in_cell =
158 case CellStatus::cell_invalid:
161 case CellStatus::children_will_be_coarsened:
163 unsigned int n_particles_in_cell = 0;
165 for (
unsigned int child_index = 0;
166 child_index < GeometryInfo<dim>::max_children_per_cell;
168 n_particles_in_cell +=
174 Assert(
false, ExcInternalError());
181template <
int dim,
typename PropertiesIndex>
185 const typename parallel::distributed::Triangulation<dim>::cell_iterator
187 const CellStatus status)
const
190 if (!cell->is_locally_owned())
194 const unsigned int cell_mobility_status =
200 if (cell_mobility_status ==
202 cell_mobility_status ==
207 else if (cell_mobility_status ==
209 cell_mobility_status ==
217 case dealii::CellStatus::cell_will_persist:
218 case dealii::CellStatus::cell_will_be_refined:
220 const unsigned int n_particles_in_cell =
222 return static_cast<int>(alpha * n_particles_in_cell *
225 case dealii::CellStatus::cell_invalid:
227 case dealii::CellStatus::children_will_be_coarsened:
229 unsigned int n_particles_in_cell = 0;
231 for (
unsigned int child_index = 0;
232 child_index < GeometryInfo<dim>::max_children_per_cell;
234 n_particles_in_cell +=
237 return static_cast<int>(alpha * n_particles_in_cell *
241 Assert(
false, ExcInternalError());
static DEMActionManager * get_action_manager()
Getter of the unique instance of the DEMActionManager.
void load_balance_step()
Set triggers for actions to be performed in the current iteration because it is a load balancing step...
Manages the load balancing (repartitioning), of the domain according to the computational load of the...
Particles::ParticleHandler< dim > * particle_handler
Pointer to the particle handler object.
AdaptiveSparseContacts< dim, PropertiesIndex > * adaptive_sparse_contacts
Pointer to the adaptive sparse contacts object.
void connect_mobility_status_weight_signals()
Connects the weight signals of the cells to the triangulation with the mobility status....
const unsigned int this_mpi_process
Rank of the current MPI process.
std::shared_ptr< SimulationControl > simulation_control
Pointer to the simulation control object.
double active_status_factor
Load weight factor of particle weight in a cell with an active mobility status (only with ASC).
const unsigned int n_mpi_processes
Number of MPI processes.
unsigned int load_balance_step
Iteration number for load balancing execution, only when method is once.
parallel::distributed::Triangulation< dim > * triangulation
Pointer to the triangulation object.
double inactive_status_factor
Load weight factor of particle weight in a cell with an inactive mobility status (only with ASC).
std::shared_ptr< Function< dim > > cell_weight_function
unsigned int load_balance_frequency
void check_load_balance_once() const
Determines whether the present iteration is the load balance step when load balance method is once.
unsigned int dynamic_check_frequency
Frequency of check for the load balancing execution, only when method is dynamic.
unsigned int particle_weight
Load weight of a particle, the default parameters is 10000.
void check_load_balance_with_sparse_contacts()
Determines whether the present is the load balance step when load balance method is dynamic_with_spar...
unsigned int calculate_total_cell_weight(const typename parallel::distributed::Triangulation< dim >::cell_iterator &cell, const CellStatus status) const
Indicates to the triangulation how much computational work is expected to happen on this cell,...
double load_threshold
Threshold (\beta) for the check load balancing execution, only when method is dynamic.
unsigned int calculate_total_cell_weight_with_mobility_status(const typename parallel::distributed::Triangulation< dim >::cell_iterator &cell, const CellStatus status) const
Indicates to the triangulation how much computational work is expected to happen on this cell,...
LagrangianLoadBalancing()
void check_load_balance_dynamic()
Determines whether the present iteration is the load balance step when load balance method is dynamic...
MPI_Comm mpi_communicator
MPI communicator.
void check_load_balance_frequent() const
Determines whether the present iteration is the load balance step when load balance method is frequen...
PropertiesIndex
Particle property indices for CFD-DEM multiphysics simulations.
PropertiesIndex
Particle property indices for CFD-DEM simulations.
PropertiesIndex
Particle property indices for DEM multiphysics simulations.