Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
BoundaryCellsInformation< dim > Class Template Reference

#include <find_boundary_cells_information.h>

Public Member Functions

 BoundaryCellsInformation ()
void build (const parallel::distributed::Triangulation< dim > &triangulation, const Parameters::Lagrangian::FloatingWalls< dim > &floating_wall_properties, const std::set< types::boundary_id > &outlet_boundaries, const bool &check_diamond_cells, const bool &expand_particle_wall_contact_search, const ConditionalOStream &pcout)
void build (const parallel::distributed::Triangulation< dim > &triangulation, const std::set< types::boundary_id > &outlet_boundaries, const bool &check_diamond_cells, const ConditionalOStream &pcout)
std::map< int, boundary_cells_info_struct< dim > > & get_boundary_cells_information ()
std::unordered_map< std::string, cell_point_info< dim > > & get_boundary_cells_with_points ()
std::unordered_map< std::string, cell_line_info< dim > > & get_boundary_cells_with_lines ()
std::unordered_map< types::particle_index, std::set< typename Triangulation< dim >::active_cell_iterator > > & get_boundary_cells_with_floating_walls ()
void update_boundary_info_after_grid_motion (typename DEM::dem_data_structures< dim >::boundary_points_and_normal_vectors &new_boundary_points_and_normal_vectors)

Private Member Functions

void find_boundary_cells_information (const parallel::distributed::Triangulation< dim > &triangulation, const std::set< types::boundary_id > &outlet_boundaries)
void find_global_boundary_cells_with_faces (const parallel::distributed::Triangulation< dim > &triangulation, const std::set< types::boundary_id > &outlet_boundaries)
void find_particle_point_and_line_contact_cells (const parallel::distributed::Triangulation< dim > &triangulation)
void add_cells_with_boundary_lines_to_boundary_cells (const parallel::distributed::Triangulation< dim > &triangulation, const std::set< types::boundary_id > &outlet_boundaries, const bool &check_diamond_cells, const ConditionalOStream &pcout)
void find_boundary_cells_for_floating_walls (const parallel::distributed::Triangulation< dim > &triangulation, const Parameters::Lagrangian::FloatingWalls< dim > &floating_wall_properties, const double maximum_cell_diameter)
void add_boundary_neighbors_of_boundary_cells (const parallel::distributed::Triangulation< dim > &triangulation, const std::set< types::boundary_id > &outlet_boundaries, std::map< int, boundary_cells_info_struct< dim > > &boundary_cells_information, const std::map< int, boundary_cells_info_struct< dim > > &global_boundary_cells_information)

Private Attributes

std::map< int, boundary_cells_info_struct< dim > > boundary_cells_information
std::map< int, boundary_cells_info_struct< dim > > global_boundary_cells_information
std::unordered_map< std::string, cell_line_info< dim > > boundary_cells_with_lines
std::vector< typename Triangulation< dim >::active_cell_iterator > local_cells_with_boundary_lines
std::unordered_map< std::string, cell_point_info< dim > > boundary_cells_with_points
std::unordered_map< types::global_dof_index, std::set< typename Triangulation< dim >::active_cell_iterator > > boundary_cells_for_floating_walls
std::vector< typename Triangulation< dim >::active_cell_iterator > boundary_cells_with_faces
std::vector< typename Triangulation< dim >::active_cell_iterator > global_boundary_cells_with_faces
std::map< unsigned int, std::pair< Tensor< 1, dim >, Point< dim > > > updated_boundary_points_and_normal_vectors
bool display_diamond_cells_warning = true
bool display_pw_contact_expansion_warning = true

Detailed Description

template<int dim>
class BoundaryCellsInformation< dim >

Finds all the boundary cells and faces in the triangulation, for each cell the boundary face is specified and the normal vector as well as a point on the boundary face are obtained.

Definition at line 28 of file find_boundary_cells_information.h.

Constructor & Destructor Documentation

◆ BoundaryCellsInformation()

template<int dim>
BoundaryCellsInformation< dim >::BoundaryCellsInformation ( )
default

Member Function Documentation

◆ add_boundary_neighbors_of_boundary_cells()

template<int dim>
void BoundaryCellsInformation< dim >::add_boundary_neighbors_of_boundary_cells ( const parallel::distributed::Triangulation< dim > & triangulation,
const std::set< types::boundary_id > & outlet_boundaries,
std::map< int, boundary_cells_info_struct< dim > > & boundary_cells_information,
const std::map< int, boundary_cells_info_struct< dim > > & global_boundary_cells_information )
private

Carries out adding new elements with the boundary cells (cells with boundary faces) and information (point and normal vector) of their neighbor boundary cells to the boundary_cells_information. By adding these elements, the broad and fine searches will search for potential contacts of the particles in each boundary cell with the boundary neighbors of these cells. This function is used to solve the problem of late contact detection in triangulations with curved boundaries.

Parameters
triangulationTriangulation used in the DEM simulation
boundary_cells_informationA container that contains the information of all the boundary cells with boundary faces
outlet_boundariesA set which contains the outlet boundary IDs
global_boundary_cells_informationA map that contains the geometrical information of all (global) boundary cells

Definition at line 704 of file find_boundary_cells_information.cc.

References boundary_cells_information, boundary_cells_info_struct< dim >::cell, global_boundary_cells_information, boundary_cells_info_struct< dim >::global_face_id, and boundary_cells_info_struct< dim >::point_on_face.

◆ add_cells_with_boundary_lines_to_boundary_cells()

template<int dim>
void BoundaryCellsInformation< dim >::add_cells_with_boundary_lines_to_boundary_cells ( const parallel::distributed::Triangulation< dim > & triangulation,
const std::set< types::boundary_id > & outlet_boundaries,
const bool & check_diamond_cells,
const ConditionalOStream & pcout )
private

Adds the cells with boundary lines to the boundary cells information (boundary_cells_information). First , it loops through the boundary_cells_with_lines vector, then it loops through the neighbors of boundary_cells_with_lines; if a neighbor is a member of boundary_cells_with_faces, then it adds the neighbor cell to the boundary_cells_information with the normal vector and point of the neighbor cell.

Parameters
triangulationTriangulation to access the information of the cells
outlet_boundariesA set which contains the outlet boundary IDs
check_diamond_cellsIf true, the diamond shaped cells are found and added to the particle-wall contact search cells
pcout

Definition at line 486 of file find_boundary_cells_information.cc.

References boundary_cells_information, boundary_cells_info_struct< dim >::cell, display_diamond_cells_warning, find_global_boundary_cells_with_faces(), global_boundary_cells_information, global_boundary_cells_with_faces, boundary_cells_info_struct< dim >::global_face_id, and local_cells_with_boundary_lines.

◆ build() [1/2]

template<int dim>
void BoundaryCellsInformation< dim >::build ( const parallel::distributed::Triangulation< dim > & triangulation,
const Parameters::Lagrangian::FloatingWalls< dim > & floating_wall_properties,
const std::set< types::boundary_id > & outlet_boundaries,
const bool & check_diamond_cells,
const bool & expand_particle_wall_contact_search,
const ConditionalOStream & pcout )

The build function builds all the boundary cell information structure that finds which cell has a boundary face, boundary line or a boundary point. Additionally, it identifies which cells are located in the vicinity (controlled by the max cell diameter) of floating walls.

Parameters
triangulationTriangulation to access the information of the cells
floating_wall_propertiesProperties of floating walls specified in the parameter handler file
outlet_boundariesA set which contains the outlet boundary IDs
check_diamond_cellsIf true, the diamond shaped cells are found and added to the particle-wall contact search cells
expand_particle_wall_contact_searchIf true, expands the particle-wall contact search by adding the contact search between particles in the boundary cells with the boundary neighbors of these boundary cells
pcout

Definition at line 26 of file find_boundary_cells_information.cc.

References add_boundary_neighbors_of_boundary_cells(), add_cells_with_boundary_lines_to_boundary_cells(), boundary_cells_for_floating_walls, boundary_cells_information, boundary_cells_with_faces, boundary_cells_with_lines, boundary_cells_with_points, display_pw_contact_expansion_warning, find_boundary_cells_for_floating_walls(), find_boundary_cells_information(), find_particle_point_and_line_contact_cells(), global_boundary_cells_information, global_boundary_cells_with_faces, and local_cells_with_boundary_lines.

◆ build() [2/2]

template<int dim>
void BoundaryCellsInformation< dim >::build ( const parallel::distributed::Triangulation< dim > & triangulation,
const std::set< types::boundary_id > & outlet_boundaries,
const bool & check_diamond_cells,
const ConditionalOStream & pcout )

◆ find_boundary_cells_for_floating_walls()

template<int dim>
void BoundaryCellsInformation< dim >::find_boundary_cells_for_floating_walls ( const parallel::distributed::Triangulation< dim > & triangulation,
const Parameters::Lagrangian::FloatingWalls< dim > & floating_wall_properties,
const double maximum_cell_diameter )
private

Loops over all the cells to find cells which should be searched for particle-floating wall contact, normal vector of each cell is also obtained

Parameters
triangulationTriangulation to access the information of the cells
floating_wall_propertiesProperties of floating walls specified in the parameter handler file
maximum_cell_diameterMaximum cell length in the triangulation

Definition at line 654 of file find_boundary_cells_information.cc.

References boundary_cells_for_floating_walls, Parameters::Lagrangian::FloatingWalls< dim >::floating_walls_normal_vectors, Parameters::Lagrangian::FloatingWalls< dim >::floating_walls_number, and Parameters::Lagrangian::FloatingWalls< dim >::points_on_walls.

◆ find_boundary_cells_information()

template<int dim>
void BoundaryCellsInformation< dim >::find_boundary_cells_information ( const parallel::distributed::Triangulation< dim > & triangulation,
const std::set< types::boundary_id > & outlet_boundaries )
private

Loops over all the cells to find boundary cells, find the boundary faces of boundary cells and for the boundary faces the normal vector and a point locating on the face are obtained

Parameters
triangulationTriangulation to access the information of the cells
outlet_boundariesA set which contains the outlet boundary IDs

Definition at line 128 of file find_boundary_cells_information.cc.

References boundary_cells_information, boundary_cells_with_faces, boundary_cells_info_struct< dim >::boundary_id, boundary_cells_info_struct< dim >::cell, global_boundary_cells_information, boundary_cells_info_struct< dim >::global_face_id, boundary_cells_info_struct< dim >::normal_vector, and boundary_cells_info_struct< dim >::point_on_face.

◆ find_global_boundary_cells_with_faces()

template<int dim>
void BoundaryCellsInformation< dim >::find_global_boundary_cells_with_faces ( const parallel::distributed::Triangulation< dim > & triangulation,
const std::set< types::boundary_id > & outlet_boundaries )
private

Loops over all the cells to find boundary cells, find the global boundary cells with faces. Note that the boundary_cells_with_faces container only stores the local boundary cells, while global_boundary_cells_with_faces stores all the boundary cells with faces.

Parameters
triangulationTriangulation to access the information of the cells
outlet_boundariesA set which contains the outlet boundary IDs

Definition at line 460 of file find_boundary_cells_information.cc.

References global_boundary_cells_with_faces.

◆ find_particle_point_and_line_contact_cells()

template<int dim>
void BoundaryCellsInformation< dim >::find_particle_point_and_line_contact_cells ( const parallel::distributed::Triangulation< dim > & triangulation)
private

Loops over all the cells to find cells which should be searched for particle-line contact, boundary lines and a point locating on each line are obtained

Parameters
triangulationTriangulation to access the information of the cells

Definition at line 285 of file find_boundary_cells_information.cc.

References boundary_cells_with_lines, boundary_cells_with_points, local_cells_with_boundary_lines, and point_nd_to_3d().

◆ get_boundary_cells_information()

template<int dim>
std::map< int, boundary_cells_info_struct< dim > > & BoundaryCellsInformation< dim >::get_boundary_cells_information ( )
inline

Definition at line 67 of file find_boundary_cells_information.h.

References boundary_cells_information.

◆ get_boundary_cells_with_floating_walls()

template<int dim>
std::unordered_map< types::particle_index, std::set< typename Triangulation< dim >::active_cell_iterator > > & BoundaryCellsInformation< dim >::get_boundary_cells_with_floating_walls ( )
inline

◆ get_boundary_cells_with_lines()

template<int dim>
std::unordered_map< std::string, cell_line_info< dim > > & BoundaryCellsInformation< dim >::get_boundary_cells_with_lines ( )
inline

Definition at line 79 of file find_boundary_cells_information.h.

References boundary_cells_with_lines.

◆ get_boundary_cells_with_points()

template<int dim>
std::unordered_map< std::string, cell_point_info< dim > > & BoundaryCellsInformation< dim >::get_boundary_cells_with_points ( )
inline

Definition at line 73 of file find_boundary_cells_information.h.

References boundary_cells_with_points.

◆ update_boundary_info_after_grid_motion()

template<int dim>
void BoundaryCellsInformation< dim >::update_boundary_info_after_grid_motion ( typename DEM::dem_data_structures< dim >::boundary_points_and_normal_vectors & new_boundary_points_and_normal_vectors)

Carries out updating the boundary information (point on boundary face and its normal vector) after moving the grid.

Parameters
new_boundary_points_and_normal_vectorsNormal vector and a point on the boundary faces which are updated after motion of the grid

Definition at line 224 of file find_boundary_cells_information.cc.

References boundary_cells_with_faces, DEMActionManager::get_action_manager(), point_nd_to_3d(), and tensor_nd_to_3d().

Member Data Documentation

◆ boundary_cells_for_floating_walls

template<int dim>
std::unordered_map< types::global_dof_index, std::set<typename Triangulation<dim>::active_cell_iterator> > BoundaryCellsInformation< dim >::boundary_cells_for_floating_walls
private

Definition at line 229 of file find_boundary_cells_information.h.

◆ boundary_cells_information

template<int dim>
std::map<int, boundary_cells_info_struct<dim> > BoundaryCellsInformation< dim >::boundary_cells_information
private

Definition at line 204 of file find_boundary_cells_information.h.

◆ boundary_cells_with_faces

template<int dim>
std::vector<typename Triangulation<dim>::active_cell_iterator> BoundaryCellsInformation< dim >::boundary_cells_with_faces
private

Definition at line 233 of file find_boundary_cells_information.h.

◆ boundary_cells_with_lines

template<int dim>
std::unordered_map<std::string, cell_line_info<dim> > BoundaryCellsInformation< dim >::boundary_cells_with_lines
private

Definition at line 214 of file find_boundary_cells_information.h.

◆ boundary_cells_with_points

template<int dim>
std::unordered_map<std::string, cell_point_info<dim> > BoundaryCellsInformation< dim >::boundary_cells_with_points
private

Definition at line 223 of file find_boundary_cells_information.h.

◆ display_diamond_cells_warning

template<int dim>
bool BoundaryCellsInformation< dim >::display_diamond_cells_warning = true
private

Definition at line 247 of file find_boundary_cells_information.h.

◆ display_pw_contact_expansion_warning

template<int dim>
bool BoundaryCellsInformation< dim >::display_pw_contact_expansion_warning = true
private

Definition at line 248 of file find_boundary_cells_information.h.

◆ global_boundary_cells_information

template<int dim>
std::map<int, boundary_cells_info_struct<dim> > BoundaryCellsInformation< dim >::global_boundary_cells_information
private

Definition at line 210 of file find_boundary_cells_information.h.

◆ global_boundary_cells_with_faces

template<int dim>
std::vector<typename Triangulation<dim>::active_cell_iterator> BoundaryCellsInformation< dim >::global_boundary_cells_with_faces
private

Definition at line 237 of file find_boundary_cells_information.h.

◆ local_cells_with_boundary_lines

template<int dim>
std::vector<typename Triangulation<dim>::active_cell_iterator> BoundaryCellsInformation< dim >::local_cells_with_boundary_lines
private

Definition at line 219 of file find_boundary_cells_information.h.

◆ updated_boundary_points_and_normal_vectors

template<int dim>
std::map<unsigned int, std::pair<Tensor<1, dim>, Point<dim> > > BoundaryCellsInformation< dim >::updated_boundary_points_and_normal_vectors
private

Definition at line 244 of file find_boundary_cells_information.h.


The documentation for this class was generated from the following files: