Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
particle_wall_broad_search.cc
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2020-2026 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
5
6using namespace dealii;
7
8template <int dim>
9void
11 const std::map<int, boundary_cells_info_struct<dim>>
12 &boundary_cells_information,
13 const Particles::ParticleHandler<dim> &particle_handler,
15 &particle_wall_contact_candidates)
16{
17 // Clearing particle_wall_contact_candidates (output of this function)
18 particle_wall_contact_candidates.clear();
19
20 // Iterating over the boundary_cells_information, which is the output of
21 // the find_boundary_cells_information find_boundary_cells_information class.
22 // This map contains all the required information of the system boundary
23 // cells and faces. In this loop we find the particles located in each of
24 // these boundary cells
25 for (auto boundary_cells_information_iterator =
26 boundary_cells_information.begin();
27 boundary_cells_information_iterator != boundary_cells_information.end();
28 ++boundary_cells_information_iterator)
29 {
30 auto boundary_cells_content = boundary_cells_information_iterator->second;
31 auto cell = boundary_cells_content.cell;
32
33 // Finding particles located in the corresponding cell
34 // (boundary_cells_content.cell)
35 typename Particles::ParticleHandler<dim>::particle_iterator_range
36 particles_in_cell = particle_handler.particles_in_cell(cell);
37
38 const bool particles_exist_in_main_cell = !particles_in_cell.empty();
39
40 // If the main cell is not empty
41 if (particles_exist_in_main_cell)
42 {
43 for (typename Particles::ParticleHandler<dim>::
44 particle_iterator_range::iterator particle_in_cell_iterator =
45 particles_in_cell.begin();
46 particle_in_cell_iterator != particles_in_cell.end();
47 ++particle_in_cell_iterator)
48 {
49 // Store particles candidate to wall with boundary cell info
50 store_candidates(particle_in_cell_iterator,
51 boundary_cells_content,
52 particle_wall_contact_candidates);
53 }
54 }
55 }
56}
57
58template <int dim>
59void
61 const std::unordered_map<
62 types::global_dof_index,
63 std::set<typename Triangulation<dim>::active_cell_iterator>>
64 &boundary_cells_for_floating_walls,
65 const Particles::ParticleHandler<dim> &particle_handler,
66 const Parameters::Lagrangian::FloatingWalls<dim> &floating_wall_properties,
67 const double simulation_time,
69 &particle_floating_wall_candidates)
70{
71 // Clearing particle_floating_wall_candidates(output of this function)
72 particle_floating_wall_candidates.clear();
73
74 // Iterating over the boundary_cells_for_floating_walls, which is the output
75 // of the find_boundary_cells_for_floating_walls function in
76 // find_boundary_cells_information class. This unordered_map contains all the
77 // boundary cells of floating walls. In this loop
78 // we find the particles located in boundary cells of floating
79 // walls
80 for (auto fw_boundary_cells_information_iterator =
81 boundary_cells_for_floating_walls.begin();
82 fw_boundary_cells_information_iterator !=
83 boundary_cells_for_floating_walls.end();
84 ++fw_boundary_cells_information_iterator)
85 {
86 auto floating_wall_id = fw_boundary_cells_information_iterator->first;
87
88 // Checking simulation time for temporary floating walls
89 if (simulation_time >=
90 floating_wall_properties.time_start[floating_wall_id] &&
91 simulation_time <=
92 floating_wall_properties.time_end[floating_wall_id])
93 {
94 auto boundary_cells_content =
95 fw_boundary_cells_information_iterator->second;
96
97 for (auto cell = boundary_cells_content.begin();
98 cell != boundary_cells_content.end();
99 ++cell)
100 {
101 // Finding particles located in the corresponding cell
102 typename Particles::ParticleHandler<dim>::particle_iterator_range
103 particles_in_cell = particle_handler.particles_in_cell(*cell);
104
105 const bool particles_exist_in_main_cell =
106 !particles_in_cell.empty();
107
108 // If the main cell is not empty
109 if (particles_exist_in_main_cell)
110 {
111 for (typename Particles::ParticleHandler<
112 dim>::particle_iterator_range::iterator
113 particle_in_cell_iterator = particles_in_cell.begin();
114 particle_in_cell_iterator != particles_in_cell.end();
115 ++particle_in_cell_iterator)
116 {
117 store_candidates<dim>(particle_in_cell_iterator,
118 floating_wall_id,
119 particle_floating_wall_candidates);
120 }
121 }
122 }
123 }
124 }
125}
126
127template <int dim>
128void
131 &solid_surfaces_mesh_information,
132 const Particles::ParticleHandler<dim> &particle_handler,
134 &particle_floating_mesh_contact_candidates,
136 &cells_total_neighbor_list)
137{
138 // Clear the candidate container
139 particle_floating_mesh_contact_candidates.clear();
140 particle_floating_mesh_contact_candidates.resize(
141 solid_surfaces_mesh_information.size());
142
143 for (unsigned int solid_counter = 0;
144 solid_counter < solid_surfaces_mesh_information.size();
145 ++solid_counter)
146 {
147 auto &candidates =
148 particle_floating_mesh_contact_candidates[solid_counter];
149
150 // BB NOTE
151 // To look more into this, I am not sure to which extent this is true
152 // The code has never really been tested with more than one floating solid
153
154 // "I am assuming that triangles in different solids have different unique
155 // global ids. If it's not the case, we have to modify the code" - ???
156
157 // Loop through solids
158 auto &solid_iterator = solid_surfaces_mesh_information[solid_counter];
159
160 // Loop through the pairs (first -> background cell, second -> floating
161 // cell)
162 for (auto floating_mesh_iterator = solid_iterator.begin();
163 floating_mesh_iterator != solid_iterator.end();
164 ++floating_mesh_iterator)
165 {
166 // Get background cell
167 auto background_cell = floating_mesh_iterator->first;
168
169 if (background_cell->is_locally_owned() ||
170 background_cell->is_ghost())
171 {
172 // Get cut cells (floating mesh cells)
173 auto cut_cells = floating_mesh_iterator->second;
174
175 // Get neighbors of the background cell
176 const auto &cell_list = cells_total_neighbor_list.at(
177 background_cell->global_active_cell_index());
178
179 // Loop through neighbors
180 for (auto &cell_iterator : cell_list)
181 {
182 // Find particles located in cell
183 typename Particles::ParticleHandler<
184 dim>::particle_iterator_range particles_in_cell =
185 particle_handler.particles_in_cell(cell_iterator);
186
187 const bool particles_exist_in_cell =
188 !particles_in_cell.empty();
189
190 // If the main cell is not empty
191 if (particles_exist_in_cell)
192 {
193 // Get the contact candidates of the cut cell
194 auto &cut_cell_candidates = candidates[cut_cells];
195
196 // Loop through particles in the main cell and build
197 // contact candidate pairs
198 for (typename Particles::ParticleHandler<
199 dim>::particle_iterator_range::iterator
200 particle_in_cell_iterator =
201 particles_in_cell.begin();
202 particle_in_cell_iterator != particles_in_cell.end();
203 ++particle_in_cell_iterator)
204 {
205 cut_cell_candidates.insert(
206 {particle_in_cell_iterator->get_id(),
207 particle_in_cell_iterator});
208 }
209 }
210 }
211 }
212 }
213 }
214}
215
216template <int dim, typename PropertiesIndex>
217void
219 const std::map<int, boundary_cells_info_struct<dim>>
220 &boundary_cells_information,
221 const Particles::ParticleHandler<dim> &particle_handler,
223 &particle_wall_contact_candidates,
224 const AdaptiveSparseContacts<dim, PropertiesIndex> &sparse_contacts_object)
225{
226 // Clearing particle_wall_contact_candidates (output of this function)
227 particle_wall_contact_candidates.clear();
228
229 // Iterating over the boundary_cells_information, which is the output of
230 // the find_boundary_cells_information find_boundary_cells_information class.
231 // This map contains all the required information of the system boundary
232 // cells and faces. In this loop we find the particles located in each of
233 // these boundary cells
234 for (auto boundary_cells_information_iterator =
235 boundary_cells_information.begin();
236 boundary_cells_information_iterator != boundary_cells_information.end();
237 ++boundary_cells_information_iterator)
238 {
239 auto boundary_cells_content = boundary_cells_information_iterator->second;
240 auto cell = boundary_cells_content.cell;
241
242 // If main cell has status other than mobile, skip to next cell
243 // No needs to check if the main cell has any particle after this
244 // step since mobile cells have particles
245 unsigned int main_cell_mobility_status =
246 sparse_contacts_object.check_cell_mobility(cell);
247 if (main_cell_mobility_status !=
249 continue;
250
251 // Finding particles located in the corresponding cell
252 typename Particles::ParticleHandler<dim>::particle_iterator_range
253 particles_in_cell = particle_handler.particles_in_cell(cell);
254
255 for (typename Particles::ParticleHandler<
256 dim>::particle_iterator_range::iterator particle_in_cell_iterator =
257 particles_in_cell.begin();
258 particle_in_cell_iterator != particles_in_cell.end();
259 ++particle_in_cell_iterator)
260 {
261 // Store particles candidate to wall with boundary cell info
262 store_candidates(particle_in_cell_iterator,
263 boundary_cells_content,
264 particle_wall_contact_candidates);
265 }
266 }
267}
268
269template <int dim, typename PropertiesIndex>
270void
272 const std::unordered_map<
273 types::global_dof_index,
274 std::set<typename Triangulation<dim>::active_cell_iterator>>
275 &boundary_cells_for_floating_walls,
276 const Particles::ParticleHandler<dim> &particle_handler,
277 const Parameters::Lagrangian::FloatingWalls<dim> &floating_wall_properties,
278 const double simulation_time,
280 &particle_floating_wall_candidates,
281 const AdaptiveSparseContacts<dim, PropertiesIndex> &sparse_contacts_object)
282{
283 // Clearing particle_floating_wall_candidates(output of this function)
284 particle_floating_wall_candidates.clear();
285
286 // Iterating over the boundary_cells_for_floating_walls, which is the output
287 // of the find_boundary_cells_for_floating_walls function in
288 // find_boundary_cells_information class. This unordered_map contains all the
289 // boundary cells of floating walls. In this loop
290 // we find the particles located in boundary cells of floating
291 // walls
292 for (auto fw_boundary_cells_information_iterator =
293 boundary_cells_for_floating_walls.begin();
294 fw_boundary_cells_information_iterator !=
295 boundary_cells_for_floating_walls.end();
296 ++fw_boundary_cells_information_iterator)
297 {
298 auto floating_wall_id = fw_boundary_cells_information_iterator->first;
299
300 // Checking simulation time for temporary floating walls
301 if (simulation_time >=
302 floating_wall_properties.time_start[floating_wall_id] &&
303 simulation_time <=
304 floating_wall_properties.time_end[floating_wall_id])
305 {
306 auto boundary_cells_content =
307 fw_boundary_cells_information_iterator->second;
308
309 for (auto cell = boundary_cells_content.begin();
310 cell != boundary_cells_content.end();
311 ++cell)
312 {
313 // If main cell has status other than mobile, skip to next cell
314 // No needs to check if the main cell has any particle after this
315 // step since mobile cells have particles
316 unsigned int main_cell_mobility_status =
317 sparse_contacts_object.check_cell_mobility(*cell);
318 if (main_cell_mobility_status !=
320 continue;
321
322 // Finding particles located in the corresponding cell
323 typename Particles::ParticleHandler<dim>::particle_iterator_range
324 particles_in_cell = particle_handler.particles_in_cell(*cell);
325
326 for (typename Particles::ParticleHandler<
327 dim>::particle_iterator_range::iterator
328 particle_in_cell_iterator = particles_in_cell.begin();
329 particle_in_cell_iterator != particles_in_cell.end();
330 ++particle_in_cell_iterator)
331 {
332 store_candidates<dim>(particle_in_cell_iterator,
333 floating_wall_id,
334 particle_floating_wall_candidates);
335 }
336 }
337 }
338 }
339}
340
341template <int dim, typename PropertiesIndex>
342void
345 &solid_surfaces_mesh_information,
346 const Particles::ParticleHandler<dim> &particle_handler,
348 &particle_floating_mesh_contact_candidates,
350 &cells_total_neighbor_list,
351 const AdaptiveSparseContacts<dim, PropertiesIndex> &sparse_contacts_object)
352{
353 // Clear the candidate container
354 particle_floating_mesh_contact_candidates.clear();
355 particle_floating_mesh_contact_candidates.resize(
356 solid_surfaces_mesh_information.size());
357
358 for (unsigned int solid_counter = 0;
359 solid_counter < solid_surfaces_mesh_information.size();
360 ++solid_counter)
361 {
362 auto &candidates =
363 particle_floating_mesh_contact_candidates[solid_counter];
364
365 // I am assuming that triangles in different solids have different unique
366 // global ids. If it's not the case, we have to modify the code
367
368 // Loop through solids
369 auto &solid_iterator = solid_surfaces_mesh_information[solid_counter];
370
371 // Loop through the pairs (first -> background cell, second -> floating
372 // cell)
373 for (auto floating_mesh_iterator = solid_iterator.begin();
374 floating_mesh_iterator != solid_iterator.end();
375 ++floating_mesh_iterator)
376 {
377 // Get background cell
378 auto background_cell = floating_mesh_iterator->first;
379
380 if (background_cell->is_locally_owned() ||
381 background_cell->is_ghost())
382 {
383 // Get cut cells (floating mesh cells)
384 auto cut_cells = floating_mesh_iterator->second;
385
386 // Get neighbors of the background cell
387 const auto &cell_list = cells_total_neighbor_list.at(
388 background_cell->global_active_cell_index());
389
390 // Loop through neighbors
391 for (auto &cell_iterator : cell_list)
392 {
393 // If main cell has status other than mobile, skip to next
394 // cell
395 // No needs to check if the main cell has any particle after
396 // this step since mobile cells have particles
397 unsigned int main_cell_mobility_status =
398 sparse_contacts_object.check_cell_mobility(cell_iterator);
399 if (main_cell_mobility_status !=
401 continue;
402
403 // Find particles located in cell
404 typename Particles::ParticleHandler<
405 dim>::particle_iterator_range particles_in_cell =
406 particle_handler.particles_in_cell(cell_iterator);
407
408 // Get the contact candidates of the cut cell
409 auto &cut_cell_candidates = candidates[cut_cells];
410
411 // Loop through particles in the main cell and build
412 // contact candidate pairs
413 for (auto particle_in_cell_iterator =
414 particles_in_cell.begin();
415 particle_in_cell_iterator != particles_in_cell.end();
416 ++particle_in_cell_iterator)
417 {
418 cut_cell_candidates.insert(
419 {particle_in_cell_iterator->get_id(),
420 particle_in_cell_iterator});
421 }
422 }
423 }
424 }
425 }
426}
427
428template <int dim>
429void
431 const typename Particles::ParticleHandler<
432 dim>::particle_iterator_range::iterator &particle_iterator,
433 const DEM::global_face_id &floating_wall_id,
435 &contact_pair_candidates)
436{
437 // Find the contact candidate container of the particle
438 const types::particle_index particle_id = particle_iterator->get_id();
439 auto candidates_container_it = contact_pair_candidates.find(particle_id);
440
441 // Reserve arbitrary vector capacity and store if the particle does not have
442 // contact candidate yet
443 if (candidates_container_it == contact_pair_candidates.end())
444 {
445 auto pair_it_bool = contact_pair_candidates.emplace(
446 particle_id,
447 std::unordered_map<DEM::global_face_id,
448 Particles::ParticleIterator<dim>>());
449
450 candidates_container_it = pair_it_bool.first;
451 }
452
453 // Store particle ids from the selected particle iterator
454 candidates_container_it->second.emplace(floating_wall_id, particle_iterator);
455}
456
457
458// Explicit Instantiation
459template void
461 const std::map<int, boundary_cells_info_struct<2>>
462 &boundary_cells_information,
463 const Particles::ParticleHandler<2> &particle_handler,
465 &particle_wall_contact_candidates);
466
467template void
469 const std::map<int, boundary_cells_info_struct<3>>
470 &boundary_cells_information,
471 const Particles::ParticleHandler<3> &particle_handler,
473 &particle_wall_contact_candidates);
474
475template void
477 const std::map<int, boundary_cells_info_struct<2>>
478 &boundary_cells_information,
479 const Particles::ParticleHandler<2> &particle_handler,
481 &particle_wall_contact_candidates,
483 &sparse_contacts_object);
484
485template void
487 const std::map<int, boundary_cells_info_struct<3>>
488 &boundary_cells_information,
489 const Particles::ParticleHandler<3> &particle_handler,
491 &particle_wall_contact_candidates,
493 &sparse_contacts_object);
494
495template void
497 const std::map<int, boundary_cells_info_struct<2>>
498 &boundary_cells_information,
499 const Particles::ParticleHandler<2> &particle_handler,
501 &particle_wall_contact_candidates,
503 &sparse_contacts_object);
504
505template void
507 const std::map<int, boundary_cells_info_struct<3>>
508 &boundary_cells_information,
509 const Particles::ParticleHandler<3> &particle_handler,
511 &particle_wall_contact_candidates,
513 &sparse_contacts_object);
514
515template void
517 const std::map<int, boundary_cells_info_struct<2>>
518 &boundary_cells_information,
519 const Particles::ParticleHandler<2> &particle_handler,
521 &particle_wall_contact_candidates,
523 &sparse_contacts_object);
524
525template void
527 const std::map<int, boundary_cells_info_struct<2>>
528 &boundary_cells_information,
529 const Particles::ParticleHandler<2> &particle_handler,
531 &particle_wall_contact_candidates,
533 &sparse_contacts_object);
534
535template void
537 const std::map<int, boundary_cells_info_struct<3>>
538 &boundary_cells_information,
539 const Particles::ParticleHandler<3> &particle_handler,
541 &particle_wall_contact_candidates,
543 &sparse_contacts_object);
544
545template void
547 const std::map<int, boundary_cells_info_struct<3>>
548 &boundary_cells_information,
549 const Particles::ParticleHandler<3> &particle_handler,
551 &particle_wall_contact_candidates,
553 &sparse_contacts_object);
554
555template void
557 const std::unordered_map<
558 types::global_dof_index,
559 std::set<typename Triangulation<2>::active_cell_iterator>>
560 &boundary_cells_for_floating_walls,
561 const Particles::ParticleHandler<2> &particle_handler,
562 const Parameters::Lagrangian::FloatingWalls<2> &floating_wall_properties,
563 const double simulation_time,
565 &particle_floating_wall_candidates);
566
567template void
569 const std::unordered_map<
570 types::global_dof_index,
571 std::set<typename Triangulation<3>::active_cell_iterator>>
572 &boundary_cells_for_floating_walls,
573 const Particles::ParticleHandler<3> &particle_handler,
574 const Parameters::Lagrangian::FloatingWalls<3> &floating_wall_properties,
575 const double simulation_time,
577 &particle_floating_wall_candidates);
578
579template void
582 const std::unordered_map<
583 types::global_dof_index,
584 std::set<typename Triangulation<2>::active_cell_iterator>>
585 &boundary_cells_for_floating_walls,
586 const Particles::ParticleHandler<2> &particle_handler,
587 const Parameters::Lagrangian::FloatingWalls<2> &floating_wall_properties,
588 const double simulation_time,
590 &particle_floating_wall_candidates,
592 &sparse_contacts_object);
593
594template void
597 const std::unordered_map<
598 types::global_dof_index,
599 std::set<typename Triangulation<3>::active_cell_iterator>>
600 &boundary_cells_for_floating_walls,
601 const Particles::ParticleHandler<3> &particle_handler,
602 const Parameters::Lagrangian::FloatingWalls<3> &floating_wall_properties,
603 const double simulation_time,
605 &particle_floating_wall_candidates,
607 &sparse_contacts_object);
608
609template void
611 2,
613 const std::unordered_map<
614 types::global_dof_index,
615 std::set<typename Triangulation<2>::active_cell_iterator>>
616 &boundary_cells_for_floating_walls,
617 const Particles::ParticleHandler<2> &particle_handler,
618 const Parameters::Lagrangian::FloatingWalls<2> &floating_wall_properties,
619 const double simulation_time,
621 &particle_floating_wall_candidates,
623 &sparse_contacts_object);
624
625template void
627 3,
629 const std::unordered_map<
630 types::global_dof_index,
631 std::set<typename Triangulation<3>::active_cell_iterator>>
632 &boundary_cells_for_floating_walls,
633 const Particles::ParticleHandler<3> &particle_handler,
634 const Parameters::Lagrangian::FloatingWalls<3> &floating_wall_properties,
635 const double simulation_time,
637 &particle_floating_wall_candidates,
639 &sparse_contacts_object);
640
641template void
643 2,
645 const std::unordered_map<
646 types::global_dof_index,
647 std::set<typename Triangulation<2>::active_cell_iterator>>
648 &boundary_cells_for_floating_walls,
649 const Particles::ParticleHandler<2> &particle_handler,
650 const Parameters::Lagrangian::FloatingWalls<2> &floating_wall_properties,
651 const double simulation_time,
653 &particle_floating_wall_candidates,
655 &sparse_contacts_object);
656
657template void
659 2,
661 const std::unordered_map<
662 types::global_dof_index,
663 std::set<typename Triangulation<2>::active_cell_iterator>>
664 &boundary_cells_for_floating_walls,
665 const Particles::ParticleHandler<2> &particle_handler,
666 const Parameters::Lagrangian::FloatingWalls<2> &floating_wall_properties,
667 const double simulation_time,
669 &particle_floating_wall_candidates,
671 &sparse_contacts_object);
672
673template void
675 3,
677 const std::unordered_map<
678 types::global_dof_index,
679 std::set<typename Triangulation<3>::active_cell_iterator>>
680 &boundary_cells_for_floating_walls,
681 const Particles::ParticleHandler<3> &particle_handler,
682 const Parameters::Lagrangian::FloatingWalls<3> &floating_wall_properties,
683 const double simulation_time,
685 &particle_floating_wall_candidates,
687 &sparse_contacts_object);
688
689template void
691 3,
693 const std::unordered_map<
694 types::global_dof_index,
695 std::set<typename Triangulation<3>::active_cell_iterator>>
696 &boundary_cells_for_floating_walls,
697 const Particles::ParticleHandler<3> &particle_handler,
698 const Parameters::Lagrangian::FloatingWalls<3> &floating_wall_properties,
699 const double simulation_time,
701 &particle_floating_wall_candidates,
703 &sparse_contacts_object);
704
705template void
708 &solid_surfaces_mesh_information,
709 const Particles::ParticleHandler<2> &particle_handler,
711 &particle_floating_mesh_contact_candidates,
713 &cells_total_neighbor_list);
714
715template void
718 &solid_surfaces_mesh_information,
719 const Particles::ParticleHandler<3> &particle_handler,
721 &particle_floating_mesh_contact_candidates,
723 &cells_total_neighbor_list);
724
725template void
728 &solid_surfaces_mesh_information,
729 const Particles::ParticleHandler<2> &particle_handler,
731 &particle_floating_mesh_contact_candidates,
733 &cells_total_neighbor_list,
735 &sparse_contacts_object);
736
737template void
740 &solid_surfaces_mesh_information,
741 const Particles::ParticleHandler<3> &particle_handler,
743 &particle_floating_mesh_contact_candidates,
745 &cells_total_neighbor_list,
747 &sparse_contacts_object);
748
749template void
753 &solid_surfaces_mesh_information,
754 const Particles::ParticleHandler<2> &particle_handler,
756 &particle_floating_mesh_contact_candidates,
758 &cells_total_neighbor_list,
760 &sparse_contacts_object);
761
762template void
766 &solid_surfaces_mesh_information,
767 const Particles::ParticleHandler<3> &particle_handler,
769 &particle_floating_mesh_contact_candidates,
771 &cells_total_neighbor_list,
773 &sparse_contacts_object);
774
775template void
779 &solid_surfaces_mesh_information,
780 const Particles::ParticleHandler<2> &particle_handler,
782 &particle_floating_mesh_contact_candidates,
784 &cells_total_neighbor_list,
786 &sparse_contacts_object);
787
788template void
790 2,
793 &solid_surfaces_mesh_information,
794 const Particles::ParticleHandler<2> &particle_handler,
796 &particle_floating_mesh_contact_candidates,
798 &cells_total_neighbor_list,
800 &sparse_contacts_object);
801
802template void
806 &solid_surfaces_mesh_information,
807 const Particles::ParticleHandler<3> &particle_handler,
809 &particle_floating_mesh_contact_candidates,
811 &cells_total_neighbor_list,
813 &sparse_contacts_object);
814
815template void
817 3,
820 &solid_surfaces_mesh_information,
821 const Particles::ParticleHandler<3> &particle_handler,
823 &particle_floating_mesh_contact_candidates,
825 &cells_total_neighbor_list,
827 &sparse_contacts_object);
Mechanism that disables contacts computation through mobility status of cells based on granular tempe...
unsigned int check_cell_mobility(const typename Triangulation< dim >::active_cell_iterator &cell) const
Find the mobility status of a cell.
Parameters for floating walls in DEM simulations.
std::vector< double > time_end
Deactivation time of each floating wall.
std::vector< double > time_start
Activation time of each floating wall.
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.
PropertiesIndex
Particle property indices for pure DEM simulations.
unsigned int global_face_id
Defined global face id as a type to ensure that we know what the structures use as index....
template void particle_solid_surfaces_contact_search< 2 >(const DEM::dem_data_structures< 2 >::solid_surfaces_mesh_information &solid_surfaces_mesh_information, const Particles::ParticleHandler< 2 > &particle_handler, DEM::dem_data_structures< 2 >::particle_floating_mesh_candidates &particle_floating_mesh_contact_candidates, DEM::dem_data_structures< 2 >::cells_total_neighbor_list &cells_total_neighbor_list)
void find_particle_wall_contact_pairs(const std::map< int, boundary_cells_info_struct< dim > > &boundary_cells_information, const Particles::ParticleHandler< dim > &particle_handler, typename DEM::dem_data_structures< dim >::particle_wall_candidates &particle_wall_contact_candidates)
Finds unordered map of tuples (tuple of particle located in boundary cells, normal vector of the boun...
template void find_particle_wall_contact_pairs< 2, DEM::CFDDEMProperties::PropertiesIndex >(const std::map< int, boundary_cells_info_struct< 2 > > &boundary_cells_information, const Particles::ParticleHandler< 2 > &particle_handler, DEM::dem_data_structures< 2 >::particle_wall_candidates &particle_wall_contact_candidates, const AdaptiveSparseContacts< 2, DEM::CFDDEMProperties::PropertiesIndex > &sparse_contacts_object)
template void find_particle_wall_contact_pairs< 2, DEM::CFDDEMMPProperties::PropertiesIndex >(const std::map< int, boundary_cells_info_struct< 2 > > &boundary_cells_information, const Particles::ParticleHandler< 2 > &particle_handler, DEM::dem_data_structures< 2 >::particle_wall_candidates &particle_wall_contact_candidates, const AdaptiveSparseContacts< 2, DEM::CFDDEMMPProperties::PropertiesIndex > &sparse_contacts_object)
void find_particle_floating_wall_contact_pairs(const std::unordered_map< types::global_dof_index, std::set< typename Triangulation< dim >::active_cell_iterator > > &boundary_cells_for_floating_walls, const Particles::ParticleHandler< dim > &particle_handler, const Parameters::Lagrangian::FloatingWalls< dim > &floating_wall_properties, const double simulation_time, typename DEM::dem_data_structures< dim >::particle_floating_wall_candidates &particle_floating_wall_candidates)
Find a two-layered unordered map of particle iterators which shows the candidate particle-floating wa...
template void find_particle_floating_wall_contact_pairs< 2 >(const std::unordered_map< types::global_dof_index, std::set< typename Triangulation< 2 >::active_cell_iterator > > &boundary_cells_for_floating_walls, const Particles::ParticleHandler< 2 > &particle_handler, const Parameters::Lagrangian::FloatingWalls< 2 > &floating_wall_properties, const double simulation_time, DEM::dem_data_structures< 2 >::particle_floating_wall_candidates &particle_floating_wall_candidates)
template void find_particle_wall_contact_pairs< 3, DEM::DEMMPProperties::PropertiesIndex >(const std::map< int, boundary_cells_info_struct< 3 > > &boundary_cells_information, const Particles::ParticleHandler< 3 > &particle_handler, DEM::dem_data_structures< 3 >::particle_wall_candidates &particle_wall_contact_candidates, const AdaptiveSparseContacts< 3, DEM::DEMMPProperties::PropertiesIndex > &sparse_contacts_object)
template void find_particle_wall_contact_pairs< 3, DEM::CFDDEMMPProperties::PropertiesIndex >(const std::map< int, boundary_cells_info_struct< 3 > > &boundary_cells_information, const Particles::ParticleHandler< 3 > &particle_handler, DEM::dem_data_structures< 3 >::particle_wall_candidates &particle_wall_contact_candidates, const AdaptiveSparseContacts< 3, DEM::CFDDEMMPProperties::PropertiesIndex > &sparse_contacts_object)
template void find_particle_wall_contact_pairs< 2 >(const std::map< int, boundary_cells_info_struct< 2 > > &boundary_cells_information, const Particles::ParticleHandler< 2 > &particle_handler, DEM::dem_data_structures< 2 >::particle_wall_candidates &particle_wall_contact_candidates)
template void find_particle_wall_contact_pairs< 2, DEM::DEMProperties::PropertiesIndex >(const std::map< int, boundary_cells_info_struct< 2 > > &boundary_cells_information, const Particles::ParticleHandler< 2 > &particle_handler, DEM::dem_data_structures< 2 >::particle_wall_candidates &particle_wall_contact_candidates, const AdaptiveSparseContacts< 2, DEM::DEMProperties::PropertiesIndex > &sparse_contacts_object)
void particle_solid_surfaces_contact_search(const typename DEM::dem_data_structures< dim >::solid_surfaces_mesh_information &solid_surfaces_mesh_information, const Particles::ParticleHandler< dim > &particle_handler, typename DEM::dem_data_structures< dim >::particle_floating_mesh_candidates &particle_floating_mesh_contact_candidates, typename DEM::dem_data_structures< dim >::cells_total_neighbor_list &cells_total_neighbor_list)
Find a two-layered unordered map (particle_floating_mesh_contact_candidates) of particle iterators th...
template void particle_solid_surfaces_contact_search< 2, DEM::DEMProperties::PropertiesIndex >(const DEM::dem_data_structures< 2 >::solid_surfaces_mesh_information &solid_surfaces_mesh_information, const Particles::ParticleHandler< 2 > &particle_handler, DEM::dem_data_structures< 2 >::particle_floating_mesh_candidates &particle_floating_mesh_contact_candidates, DEM::dem_data_structures< 2 >::cells_total_neighbor_list &cells_total_neighbor_list, const AdaptiveSparseContacts< 2, DEM::DEMProperties::PropertiesIndex > &sparse_contacts_object)
template void find_particle_wall_contact_pairs< 2, DEM::DEMMPProperties::PropertiesIndex >(const std::map< int, boundary_cells_info_struct< 2 > > &boundary_cells_information, const Particles::ParticleHandler< 2 > &particle_handler, DEM::dem_data_structures< 2 >::particle_wall_candidates &particle_wall_contact_candidates, const AdaptiveSparseContacts< 2, DEM::DEMMPProperties::PropertiesIndex > &sparse_contacts_object)
template void find_particle_wall_contact_pairs< 3, DEM::DEMProperties::PropertiesIndex >(const std::map< int, boundary_cells_info_struct< 3 > > &boundary_cells_information, const Particles::ParticleHandler< 3 > &particle_handler, DEM::dem_data_structures< 3 >::particle_wall_candidates &particle_wall_contact_candidates, const AdaptiveSparseContacts< 3, DEM::DEMProperties::PropertiesIndex > &sparse_contacts_object)
template void find_particle_floating_wall_contact_pairs< 3 >(const std::unordered_map< types::global_dof_index, std::set< typename Triangulation< 3 >::active_cell_iterator > > &boundary_cells_for_floating_walls, const Particles::ParticleHandler< 3 > &particle_handler, const Parameters::Lagrangian::FloatingWalls< 3 > &floating_wall_properties, const double simulation_time, DEM::dem_data_structures< 3 >::particle_floating_wall_candidates &particle_floating_wall_candidates)
template void particle_solid_surfaces_contact_search< 3, DEM::DEMProperties::PropertiesIndex >(const DEM::dem_data_structures< 3 >::solid_surfaces_mesh_information &solid_surfaces_mesh_information, const Particles::ParticleHandler< 3 > &particle_handler, DEM::dem_data_structures< 3 >::particle_floating_mesh_candidates &particle_floating_mesh_contact_candidates, DEM::dem_data_structures< 3 >::cells_total_neighbor_list &cells_total_neighbor_list, const AdaptiveSparseContacts< 3, DEM::DEMProperties::PropertiesIndex > &sparse_contacts_object)
template void find_particle_wall_contact_pairs< 3, DEM::CFDDEMProperties::PropertiesIndex >(const std::map< int, boundary_cells_info_struct< 3 > > &boundary_cells_information, const Particles::ParticleHandler< 3 > &particle_handler, DEM::dem_data_structures< 3 >::particle_wall_candidates &particle_wall_contact_candidates, const AdaptiveSparseContacts< 3, DEM::CFDDEMProperties::PropertiesIndex > &sparse_contacts_object)
template void particle_solid_surfaces_contact_search< 3 >(const DEM::dem_data_structures< 3 >::solid_surfaces_mesh_information &solid_surfaces_mesh_information, const Particles::ParticleHandler< 3 > &particle_handler, DEM::dem_data_structures< 3 >::particle_floating_mesh_candidates &particle_floating_mesh_contact_candidates, DEM::dem_data_structures< 3 >::cells_total_neighbor_list &cells_total_neighbor_list)
void store_candidates(const typename Particles::ParticleHandler< dim >::particle_iterator_range::iterator &particle_iterator, const DEM::global_face_id &floating_wall_id, typename DEM::dem_data_structures< dim >::particle_floating_wall_candidates &contact_pair_candidates)
Store the candidate particle-floating wall contact pairs.
template void find_particle_wall_contact_pairs< 3 >(const std::map< int, boundary_cells_info_struct< 3 > > &boundary_cells_information, const Particles::ParticleHandler< 3 > &particle_handler, DEM::dem_data_structures< 3 >::particle_wall_candidates &particle_wall_contact_candidates)
void find_particle_floating_wall_contact_pairs(const std::unordered_map< types::global_dof_index, std::set< typename Triangulation< dim >::active_cell_iterator > > &boundary_cells_for_floating_walls, const Particles::ParticleHandler< dim > &particle_handler, const Parameters::Lagrangian::FloatingWalls< dim > &floating_wall_properties, const double simulation_time, typename DEM::dem_data_structures< dim >::particle_floating_wall_candidates &particle_floating_wall_candidates)
Find a two-layered unordered map of particle iterators which shows the candidate particle-floating wa...
void particle_solid_surfaces_contact_search(const typename DEM::dem_data_structures< dim >::solid_surfaces_mesh_information &solid_surfaces_mesh_information, const Particles::ParticleHandler< dim > &particle_handler, typename DEM::dem_data_structures< dim >::particle_floating_mesh_candidates &particle_floating_mesh_contact_candidates, typename DEM::dem_data_structures< dim >::cells_total_neighbor_list &cells_total_neighbor_list)
Find a two-layered unordered map (particle_floating_mesh_contact_candidates) of particle iterators th...
ankerl::unordered_dense::map< types::particle_index, std::unordered_map< global_face_id, Particles::ParticleIterator< dim > > > particle_floating_wall_candidates
std::vector< std::vector< std::pair< typename Triangulation< dim >::active_cell_iterator, typename Triangulation< dim - 1, dim >::active_cell_iterator > > > solid_surfaces_mesh_information
ankerl::unordered_dense::map< types::global_cell_index, std::vector< typename Triangulation< dim >::active_cell_iterator > > cells_total_neighbor_list
std::vector< particle_floating_wall_from_mesh_candidates > particle_floating_mesh_candidates
ankerl::unordered_dense::map< types::particle_index, ankerl::unordered_dense::map< global_face_id, std::tuple< Particles::ParticleIterator< dim >, Tensor< 1, dim >, Point< dim >, global_face_id > > > particle_wall_candidates
Handle the information related to the boundary cells which will be used for particle-wall contact det...