Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
contact_info.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2022-2026 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
4#ifndef lethe_contact_info_h
5#define lethe_contact_info_h
6
7#include <deal.II/base/point.h>
8#include <deal.II/base/tensor.h>
9
10#include <deal.II/particles/particle_iterator.h>
11
12using namespace dealii;
13
14/**
15 * @brief Handle the information related to the calculation of the
16 * particle-particle contact force. Notably it is responsible for storing
17 * information that has to be preserved over multiple iterations of a contact,
18 * namely everything related to tangential displacements.
19 *
20 * The iterator to "particle one" is not stored here. Since all the contacts of
21 * a given particle one share the same iterator, it is stored only once in the
22 * enclosing adjacency container (see data_containers.h) instead of being
23 * duplicated in every contact.
24 */
25template <int dim>
27{
28 Particles::ParticleIterator<dim> particle_two;
31};
32
33/**
34 * @brief Derived struct of the base struct particle_particle_contact_info for
35 * periodic particle-particle contacts. Adds a translation vector that brings
36 * particle_two into contact with particle_one.
37 *
38 * periodic_offset is also reused by particle_particle_fine_search as a
39 * cache of the nearest periodic image found on a previous call: for a
40 * persisting contact this translation is re-validated against the pair's
41 * current positions rather than recomputed from scratch on every call, since
42 * it practically never changes between fine search calls.
43 */
44template <int dim>
50
51/**
52 * @brief Handle the information related to the calculation of the
53 * particle-wall contact forces.
54 */
55template <int dim>
57{
58 Particles::ParticleIterator<dim> particle;
59 Tensor<1, 3> normal_vector;
61 types::boundary_id boundary_id;
64};
65
66/**
67 * @brief Handle information related to the calculation of the particle-line
68 * contact forces.
69 */
70template <int dim>
72{
73 Particles::ParticleIterator<dim> particle;
74 Point<3> point_one;
75 Point<3> point_two;
76};
77
78/**
79 * @brief Handle information related to the calculation of the particle-point
80 * contact forces.
81 */
82template <int dim>
84{
85 Particles::ParticleIterator<dim> particle;
86 Point<3> point;
87};
88
89/**
90 * @brief Handle information related to the cell-line matching.
91 */
92template <int dim>
94{
95 typename Triangulation<dim>::active_cell_iterator cell;
96 Point<3> point_one;
97 Point<3> point_two;
98};
99
100/**
101 * @brief Handle information related to the cell-point matching.
102 */
103template <int dim>
105{
106 typename Triangulation<dim>::active_cell_iterator cell;
107 Point<3> point;
108};
109
110#endif
Handle information related to the cell-line matching.
Triangulation< dim >::active_cell_iterator cell
Point< 3 > point_one
Point< 3 > point_two
Handle information related to the cell-point matching.
Point< 3 > point
Triangulation< dim >::active_cell_iterator cell
Handle information related to the calculation of the particle-line contact forces.
Particles::ParticleIterator< dim > particle
Handle the information related to the calculation of the particle-particle contact force....
Particles::ParticleIterator< dim > particle_two
Tensor< 1, 3 > tangential_displacement
Tensor< 1, 3 > rolling_resistance_spring_torque
Handle information related to the calculation of the particle-point contact forces.
Particles::ParticleIterator< dim > particle
Handle the information related to the calculation of the particle-wall contact forces.
types::boundary_id boundary_id
Tensor< 1, 3 > normal_vector
Tensor< 1, 3 > tangential_displacement
Tensor< 1, 3 > rolling_resistance_spring_torque
Particles::ParticleIterator< dim > particle
Derived struct of the base struct particle_particle_contact_info for periodic particle-particle conta...