NetDEM v1.0
Loading...
Searching...
No Matches
neigh_tuple.hpp
Go to the documentation of this file.
1#pragma once
2
3namespace netdem {
4
5class Particle;
6class Wall;
7class ContactPP;
8class ContactPW;
9class NeighPofW;
10class NeighWofP;
11
25class NeighPofP {
26 friend class Particle;
27
28public:
32 Particle *particle{nullptr};
33
38 int lookup_id{-1};
39
40private:
45 ContactPP *contact{nullptr};
46
47public:
51 NeighPofP();
52
63 NeighPofP(Particle *const p, int id, ContactPP *const cnt);
64
68 NeighPofP *GetNeighTuple() const;
69
73 ContactPP *GetContact() const;
74
78 void SetContact(ContactPP *const cnt);
79
80private:
84 void SetContactRef(ContactPP *const cnt);
85};
86
99class NeighWofP {
100 friend class Particle;
101 friend class Wall;
102 friend class NeighPofW;
103
104public:
108 Wall *wall{nullptr};
109
114 int lookup_id{-1};
115
116private:
121 ContactPW *contact{nullptr};
122
123public:
127 NeighWofP();
128
139 NeighWofP(Wall *const w, int id, ContactPW *const cnt);
140
144 NeighPofW *GetNeighTuple() const;
145
149 ContactPW *GetContact() const;
150
154 void SetContact(ContactPW *const cnt);
155
156private:
160 void SetContactRef(ContactPW *const cnt);
161};
162
176 friend class Particle;
177 friend class Wall;
178 friend class NeighWofP;
179
180public:
185
190 int lookup_id{-1};
191
192private:
197 ContactPW *contact{nullptr};
198
199public:
203 NeighPofW();
204
215 NeighPofW(Particle *const p, int id, ContactPW *const cnt);
216
220 NeighWofP *GetNeighTuple() const;
221
225 ContactPW *GetContact() const;
226
230 void SetContact(ContactPW *const cnt);
231
232private:
236 void SetContactRef(ContactPW *const cnt);
237};
238
239} // namespace netdem
A class representing a contact between two particles.
Definition contact_pp.hpp:20
A class representing a contact between a particle and a wall.
Definition contact_pw.hpp:22
A class representing a particle in contact with another particle or wall.
Definition neigh_tuple.hpp:25
friend class Particle
Definition neigh_tuple.hpp:26
Particle * particle
A pointer to the neighboring particle.
Definition neigh_tuple.hpp:32
int lookup_id
The index of this particle in the linked_particle_list of the neighboring particle.
Definition neigh_tuple.hpp:38
NeighPofP * GetNeighTuple() const
Get the tuple of the neigh.
Definition neigh_tuple.cpp:12
ContactPP * GetContact() const
Get the contact.
Definition neigh_tuple.cpp:16
void SetContact(ContactPP *const cnt)
Set the contact.
Definition neigh_tuple.cpp:18
NeighPofP()
Default constructor for the NeighPofP class.
Definition neigh_tuple.cpp:7
A class representing a particle in contact with a wall.
Definition neigh_tuple.hpp:175
friend class Particle
Definition neigh_tuple.hpp:176
friend class NeighWofP
Definition neigh_tuple.hpp:178
NeighWofP * GetNeighTuple() const
Get the neigh obj of the pair particle.
Definition neigh_tuple.cpp:58
Particle * particle
A pointer to the neighboring particle.
Definition neigh_tuple.hpp:184
int lookup_id
The index of this particle in the linked_wall_list of the neighboring particle.
Definition neigh_tuple.hpp:190
ContactPW * GetContact() const
Get the contact.
Definition neigh_tuple.cpp:62
NeighPofW()
Default constructor for the NeighPofW class.
Definition neigh_tuple.cpp:53
void SetContact(ContactPW *const cnt)
Set the contact.
Definition neigh_tuple.cpp:64
A class representing a wall in contact with a particle.
Definition neigh_tuple.hpp:99
NeighPofW * GetNeighTuple() const
Get the neigh obj of the pair particle.
Definition neigh_tuple.cpp:35
friend class NeighPofW
Definition neigh_tuple.hpp:102
friend class Wall
Definition neigh_tuple.hpp:101
void SetContact(ContactPW *const cnt)
Set the contact.
Definition neigh_tuple.cpp:41
NeighWofP()
Default constructor for the NeighWofP class.
Definition neigh_tuple.cpp:30
int lookup_id
The index of this particle in the linked_particle_list of the neighboring wall.
Definition neigh_tuple.hpp:114
Wall * wall
A pointer to the neighboring wall.
Definition neigh_tuple.hpp:108
ContactPW * GetContact() const
Get the contact.
Definition neigh_tuple.cpp:39
Definition particle.hpp:26
A class representing a wall object in a physics simulation.
Definition wall.hpp:32
Definition bond_entry.hpp:7