NetDEM v1.0
Loading...
Searching...
No Matches
netdem::NeighPofP Class Reference

A class representing a particle in contact with another particle or wall. More...

#include <neigh_tuple.hpp>

Public Member Functions

 NeighPofP ()
 Default constructor for the NeighPofP class.
 
 NeighPofP (Particle *const p, int id, ContactPP *const cnt)
 Constructor for the NeighPofP class that initializes the neighbor with a particle and its corresponding contact.
 
NeighPofPGetNeighTuple () const
 Get the tuple of the neigh.
 
ContactPPGetContact () const
 Get the contact.
 
void SetContact (ContactPP *const cnt)
 Set the contact.
 

Public Attributes

Particleparticle {nullptr}
 A pointer to the neighboring particle.
 
int lookup_id {-1}
 The index of this particle in the linked_particle_list of the neighboring particle.
 

Friends

class Particle
 

Detailed Description

A class representing a particle in contact with another particle or wall.

Contains information about neighboring particles and walls and their respective contacts.

  • stores pair info particle: pointer of the neighboring particle lookup_id: index of self in the linked_particle_list of particle contact: pointer of the contact, if is in contact with particle

Constructor & Destructor Documentation

◆ NeighPofP() [1/2]

NeighPofP::NeighPofP ( )

Default constructor for the NeighPofP class.

◆ NeighPofP() [2/2]

NeighPofP::NeighPofP ( Particle *const p,
int id,
ContactPP *const cnt )

Constructor for the NeighPofP class that initializes the neighbor with a particle and its corresponding contact.

Parameters
pA pointer to the neighboring particle.
idThe index of this particle in the linked_particle_list of the neighboring particle.
cntA pointer to the contact between this particle and the neighboring particle, if it exists.

Member Function Documentation

◆ GetContact()

ContactPP * NeighPofP::GetContact ( ) const

Get the contact.

◆ GetNeighTuple()

NeighPofP * NeighPofP::GetNeighTuple ( ) const

Get the tuple of the neigh.

◆ SetContact()

void NeighPofP::SetContact ( ContactPP *const cnt)

Set the contact.

Friends And Related Symbol Documentation

◆ Particle

friend class Particle
friend

Member Data Documentation

◆ lookup_id

int netdem::NeighPofP::lookup_id {-1}

The index of this particle in the linked_particle_list of the neighboring particle.

◆ particle

Particle* netdem::NeighPofP::particle {nullptr}

A pointer to the neighboring particle.


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