milupHPC documentation
Public Member Functions | Public Attributes | List of all members
ParticleHandler Class Reference

#include "particle_handler.h"

+ Collaboration diagram for ParticleHandler:
Collaboration graph

Public Member Functions

 ParticleHandler (integer numParticles, integer numNodes)
 
void initLeapfrog ()
 
void freeLeapfrog ()
 
 ~ParticleHandler ()
 
template<typename T >
T *& getEntry (Entry::Name entry, Execution::Location location=Execution::device)
 
void setPointer (IntegratedParticleHandler *integratedParticleHandler)
 
void resetPointer ()
 
void copyMass (To::Target target=To::device, bool includePseudoParticles=false)
 
void copyUid (To::Target target=To::device)
 
void copyMatId (To::Target target=To::device)
 
void copySML (To::Target target=To::device)
 
void copyPosition (To::Target target=To::device, bool includePseudoParticles=false)
 
void copyVelocity (To::Target target=To::device, bool includePseudoParticles=false)
 
void copyAcceleration (To::Target target=To::device, bool includePseudoParticles=false)
 
void copyDistribution (To::Target target=To::device, bool velocity=true, bool acceleration=true, bool includePseudoParticles=false)
 
void copySPH (To::Target target)
 

Public Attributes

bool leapfrog { false }
 
integer numParticles
 (host) number of particles More...
 
integer numNodes
 (host) number of nodes More...
 
real * h_mass
 host mass More...
 
real * h_x
 host x position More...
 
real * _h_x
 
real * h_vx
 host x velocity More...
 
real * _h_vx
 
real * h_ax
 host x acceleration More...
 
real * _h_ax
 
real * h_g_ax
 
real * h_ax_old
 
real * h_g_ax_old
 
real * h_y
 host y position More...
 
real * _h_y
 
real * h_vy
 host y velocity More...
 
real * _h_vy
 
real * h_ay
 host y acceleration More...
 
real * _h_ay
 
real * h_g_ay
 
real * h_ay_old
 
real * h_g_ay_old
 
real * h_z
 host z position More...
 
real * _h_z
 
real * h_vz
 host z velocity More...
 
real * _h_vz
 
real * h_az
 host z acceleration More...
 
real * _h_az
 
real * h_g_az
 
real * h_az_old
 
real * h_g_az_old
 
integer * h_nodeType
 
integer * h_level
 
idInteger * h_uid
 host unique identifier More...
 
idInteger * _h_uid
 
integer * h_materialId
 host material identifier More...
 
real * h_sml
 host smoothing length More...
 
real * _h_sml
 
integer * h_nnl
 host near(est) neighbor list More...
 
integer * h_noi
 host number of interactions More...
 
real * h_e
 host internal energy More...
 
real * _h_e
 
real * h_dedt
 host time derivative of internal energy More...
 
real * _h_dedt
 
real * h_u
 energy More...
 
real * h_cs
 host speed of sound More...
 
real * _h_cs
 
real * h_rho
 host density More...
 
real * _h_rho
 
real * h_p
 host pressure More...
 
real * _h_p
 
real * h_muijmax
 host max(mu_ij) More...
 
real * h_drhodt
 host time derivative of density More...
 
real * _h_drhodt
 
integer * d_numParticles
 device number of particles More...
 
integer * d_numNodes
 device number of nodes More...
 
real * d_mass
 device mass array More...
 
real * d_x
 device x position More...
 
real * _d_x
 
real * d_vx
 device x velocity More...
 
real * _d_vx
 
real * d_ax
 device x acceleration More...
 
real * _d_ax
 
real * d_g_ax
 
real * d_ax_old
 
real * d_g_ax_old
 
real * d_y
 device y position More...
 
real * _d_y
 
real * d_vy
 device y velocity More...
 
real * _d_vy
 
real * d_ay
 device y acceleration More...
 
real * _d_ay
 
real * d_g_ay
 
real * d_ay_old
 
real * d_g_ay_old
 
real * d_z
 device z position More...
 
real * _d_z
 
real * d_vz
 device z velocity More...
 
real * _d_vz
 
real * d_az
 device z acceleration More...
 
real * _d_az
 
real * d_g_az
 
real * d_az_old
 
real * d_g_az_old
 
integer * d_nodeType
 
integer * d_level
 
idInteger * d_uid
 device unique identifier More...
 
idInteger * _d_uid
 
integer * d_materialId
 device material identifier More...
 
real * d_sml
 device smoothing length More...
 
real * _d_sml
 
integer * d_nnl
 device near(est) neighbor list More...
 
integer * d_noi
 device number of interaction More...
 
real * d_e
 device internal energy More...
 
real * _d_e
 
real * d_dedt
 device time derivative of internal energy More...
 
real * _d_dedt
 
real * d_u
 energy More...
 
real * d_cs
 device speed of sound More...
 
real * _d_cs
 
real * d_rho
 device density More...
 
real * _d_rho
 
real * d_p
 device pressure More...
 
real * _d_p
 
real * d_muijmax
 device max(mu_ij) More...
 
real * d_drhodt
 device time derivative of density More...
 
real * _d_drhodt
 
Particles * h_particles
 host instance of particles class More...
 
Particles * d_particles
 device instance of particles class More...
 

Detailed Description

Handling Particles class

Allocate and handle both host and device arrays and instances

Definition at line 16 of file particle_handler.h.

Constructor & Destructor Documentation

◆ ParticleHandler()

ParticleHandler::ParticleHandler ( integer  numParticles,
integer  numNodes 
)

Constructor

Parameters
numParticles
numNodes

Definition at line 3 of file particle_handler.cpp.

+ Here is the call graph for this function:

◆ ~ParticleHandler()

ParticleHandler::~ParticleHandler ( )

Destructor

Definition at line 365 of file particle_handler.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ copyAcceleration()

void ParticleHandler::copyAcceleration ( To::Target  target = To::device,
bool  includePseudoParticles = false 
)

copy particle's acceleration(s) to target (host/device)

Parameters
targethost/device

Definition at line 856 of file particle_handler.cpp.

+ Here is the call graph for this function:

◆ copyDistribution()

void ParticleHandler::copyDistribution ( To::Target  target = To::device,
bool  velocity = true,
bool  acceleration = true,
bool  includePseudoParticles = false 
)

copy particle's information to target (host/device)

Parameters
targethost/device
velocityflag whether velocities should be copied
accelerationflag whether accelerations should be copied

Definition at line 873 of file particle_handler.cpp.

+ Here is the call graph for this function:

◆ copyMass()

void ParticleHandler::copyMass ( To::Target  target = To::device,
bool  includePseudoParticles = false 
)

copy particle's mass(es) to target (host/device)

Parameters
targethost/device

Definition at line 796 of file particle_handler.cpp.

+ Here is the call graph for this function:

◆ copyMatId()

void ParticleHandler::copyMatId ( To::Target  target = To::device)

Definition at line 812 of file particle_handler.cpp.

+ Here is the call graph for this function:

◆ copyPosition()

void ParticleHandler::copyPosition ( To::Target  target = To::device,
bool  includePseudoParticles = false 
)

copy particle's position(s) to target (host/device)

Parameters
targethost/device

Definition at line 822 of file particle_handler.cpp.

+ Here is the call graph for this function:

◆ copySML()

void ParticleHandler::copySML ( To::Target  target = To::device)

Definition at line 817 of file particle_handler.cpp.

+ Here is the call graph for this function:

◆ copySPH()

void ParticleHandler::copySPH ( To::Target  target)

Definition at line 889 of file particle_handler.cpp.

+ Here is the call graph for this function:

◆ copyUid()

void ParticleHandler::copyUid ( To::Target  target = To::device)

Definition at line 807 of file particle_handler.cpp.

+ Here is the call graph for this function:

◆ copyVelocity()

void ParticleHandler::copyVelocity ( To::Target  target = To::device,
bool  includePseudoParticles = false 
)

copy particle's velocities to target (host/device)

Parameters
targethost/device

Definition at line 839 of file particle_handler.cpp.

+ Here is the call graph for this function:

◆ freeLeapfrog()

void ParticleHandler::freeLeapfrog ( )

Definition at line 588 of file particle_handler.cpp.

+ Here is the call graph for this function:

◆ getEntry()

template<typename T >
T *& ParticleHandler::getEntry ( Entry::Name  entry,
Execution::Location  location = Execution::device 
)

Definition at line 604 of file particle_handler.cpp.

◆ initLeapfrog()

void ParticleHandler::initLeapfrog ( )

Definition at line 549 of file particle_handler.cpp.

+ Here is the call graph for this function:

◆ resetPointer()

void ParticleHandler::resetPointer ( )

Definition at line 728 of file particle_handler.cpp.

+ Here is the call graph for this function:

◆ setPointer()

void ParticleHandler::setPointer ( IntegratedParticleHandler *  integratedParticleHandler)

Definition at line 661 of file particle_handler.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ _d_ax

real * ParticleHandler::_d_ax

Definition at line 197 of file particle_handler.h.

◆ _d_ay

real * ParticleHandler::_d_ay

Definition at line 206 of file particle_handler.h.

◆ _d_az

real * ParticleHandler::_d_az

Definition at line 215 of file particle_handler.h.

◆ _d_cs

real * ParticleHandler::_d_cs

Definition at line 241 of file particle_handler.h.

◆ _d_dedt

real * ParticleHandler::_d_dedt

Definition at line 237 of file particle_handler.h.

◆ _d_drhodt

real * ParticleHandler::_d_drhodt

Definition at line 251 of file particle_handler.h.

◆ _d_e

real * ParticleHandler::_d_e

Definition at line 235 of file particle_handler.h.

◆ _d_p

real * ParticleHandler::_d_p

Definition at line 245 of file particle_handler.h.

◆ _d_rho

real * ParticleHandler::_d_rho

Definition at line 243 of file particle_handler.h.

◆ _d_sml

real * ParticleHandler::_d_sml

Definition at line 229 of file particle_handler.h.

◆ _d_uid

idInteger * ParticleHandler::_d_uid

Definition at line 225 of file particle_handler.h.

◆ _d_vx

real * ParticleHandler::_d_vx

Definition at line 195 of file particle_handler.h.

◆ _d_vy

real * ParticleHandler::_d_vy

Definition at line 204 of file particle_handler.h.

◆ _d_vz

real * ParticleHandler::_d_vz

Definition at line 213 of file particle_handler.h.

◆ _d_x

real * ParticleHandler::_d_x

Definition at line 193 of file particle_handler.h.

◆ _d_y

real * ParticleHandler::_d_y

Definition at line 202 of file particle_handler.h.

◆ _d_z

real * ParticleHandler::_d_z

Definition at line 211 of file particle_handler.h.

◆ _h_ax

real * ParticleHandler::_h_ax

Definition at line 34 of file particle_handler.h.

◆ _h_ay

real * ParticleHandler::_h_ay

Definition at line 43 of file particle_handler.h.

◆ _h_az

real * ParticleHandler::_h_az

Definition at line 52 of file particle_handler.h.

◆ _h_cs

real * ParticleHandler::_h_cs

Definition at line 78 of file particle_handler.h.

◆ _h_dedt

real * ParticleHandler::_h_dedt

Definition at line 74 of file particle_handler.h.

◆ _h_drhodt

real * ParticleHandler::_h_drhodt

Definition at line 88 of file particle_handler.h.

◆ _h_e

real * ParticleHandler::_h_e

Definition at line 72 of file particle_handler.h.

◆ _h_p

real * ParticleHandler::_h_p

Definition at line 82 of file particle_handler.h.

◆ _h_rho

real * ParticleHandler::_h_rho

Definition at line 80 of file particle_handler.h.

◆ _h_sml

real * ParticleHandler::_h_sml

Definition at line 66 of file particle_handler.h.

◆ _h_uid

idInteger * ParticleHandler::_h_uid

Definition at line 62 of file particle_handler.h.

◆ _h_vx

real * ParticleHandler::_h_vx

Definition at line 32 of file particle_handler.h.

◆ _h_vy

real * ParticleHandler::_h_vy

Definition at line 41 of file particle_handler.h.

◆ _h_vz

real * ParticleHandler::_h_vz

Definition at line 50 of file particle_handler.h.

◆ _h_x

real * ParticleHandler::_h_x

Definition at line 30 of file particle_handler.h.

◆ _h_y

real * ParticleHandler::_h_y

Definition at line 39 of file particle_handler.h.

◆ _h_z

real * ParticleHandler::_h_z

Definition at line 48 of file particle_handler.h.

◆ d_ax

real* ParticleHandler::d_ax

device x acceleration

Definition at line 197 of file particle_handler.h.

◆ d_ax_old

real* ParticleHandler::d_ax_old

Definition at line 199 of file particle_handler.h.

◆ d_ay

real* ParticleHandler::d_ay

device y acceleration

Definition at line 206 of file particle_handler.h.

◆ d_ay_old

real* ParticleHandler::d_ay_old

Definition at line 208 of file particle_handler.h.

◆ d_az

real* ParticleHandler::d_az

device z acceleration

Definition at line 215 of file particle_handler.h.

◆ d_az_old

real* ParticleHandler::d_az_old

Definition at line 217 of file particle_handler.h.

◆ d_cs

real* ParticleHandler::d_cs

device speed of sound

Definition at line 241 of file particle_handler.h.

◆ d_dedt

real* ParticleHandler::d_dedt

device time derivative of internal energy

Definition at line 237 of file particle_handler.h.

◆ d_drhodt

real* ParticleHandler::d_drhodt

device time derivative of density

Definition at line 251 of file particle_handler.h.

◆ d_e

real* ParticleHandler::d_e

device internal energy

Definition at line 235 of file particle_handler.h.

◆ d_g_ax

real* ParticleHandler::d_g_ax

Definition at line 198 of file particle_handler.h.

◆ d_g_ax_old

real * ParticleHandler::d_g_ax_old

Definition at line 199 of file particle_handler.h.

◆ d_g_ay

real* ParticleHandler::d_g_ay

Definition at line 207 of file particle_handler.h.

◆ d_g_ay_old

real * ParticleHandler::d_g_ay_old

Definition at line 208 of file particle_handler.h.

◆ d_g_az

real* ParticleHandler::d_g_az

Definition at line 216 of file particle_handler.h.

◆ d_g_az_old

real * ParticleHandler::d_g_az_old

Definition at line 217 of file particle_handler.h.

◆ d_level

integer* ParticleHandler::d_level

Definition at line 223 of file particle_handler.h.

◆ d_mass

real* ParticleHandler::d_mass

device mass array

Definition at line 191 of file particle_handler.h.

◆ d_materialId

integer* ParticleHandler::d_materialId

device material identifier

Definition at line 227 of file particle_handler.h.

◆ d_muijmax

real* ParticleHandler::d_muijmax

device max(mu_ij)

Definition at line 247 of file particle_handler.h.

◆ d_nnl

integer* ParticleHandler::d_nnl

device near(est) neighbor list

Definition at line 231 of file particle_handler.h.

◆ d_nodeType

integer* ParticleHandler::d_nodeType

Definition at line 221 of file particle_handler.h.

◆ d_noi

integer* ParticleHandler::d_noi

device number of interaction

Definition at line 233 of file particle_handler.h.

◆ d_numNodes

integer* ParticleHandler::d_numNodes

device number of nodes

Definition at line 187 of file particle_handler.h.

◆ d_numParticles

integer* ParticleHandler::d_numParticles

device number of particles

Definition at line 185 of file particle_handler.h.

◆ d_p

real* ParticleHandler::d_p

device pressure

Definition at line 245 of file particle_handler.h.

◆ d_particles

Particles* ParticleHandler::d_particles

device instance of particles class

Definition at line 350 of file particle_handler.h.

◆ d_rho

real* ParticleHandler::d_rho

device density

Definition at line 243 of file particle_handler.h.

◆ d_sml

real* ParticleHandler::d_sml

device smoothing length

Definition at line 229 of file particle_handler.h.

◆ d_u

real* ParticleHandler::d_u

energy

Definition at line 239 of file particle_handler.h.

◆ d_uid

idInteger* ParticleHandler::d_uid

device unique identifier

Definition at line 225 of file particle_handler.h.

◆ d_vx

real* ParticleHandler::d_vx

device x velocity

Definition at line 195 of file particle_handler.h.

◆ d_vy

real* ParticleHandler::d_vy

device y velocity

Definition at line 204 of file particle_handler.h.

◆ d_vz

real* ParticleHandler::d_vz

device z velocity

Definition at line 213 of file particle_handler.h.

◆ d_x

real* ParticleHandler::d_x

device x position

Definition at line 193 of file particle_handler.h.

◆ d_y

real* ParticleHandler::d_y

device y position

Definition at line 202 of file particle_handler.h.

◆ d_z

real* ParticleHandler::d_z

device z position

Definition at line 211 of file particle_handler.h.

◆ h_ax

real* ParticleHandler::h_ax

host x acceleration

Definition at line 34 of file particle_handler.h.

◆ h_ax_old

real* ParticleHandler::h_ax_old

Definition at line 36 of file particle_handler.h.

◆ h_ay

real* ParticleHandler::h_ay

host y acceleration

Definition at line 43 of file particle_handler.h.

◆ h_ay_old

real* ParticleHandler::h_ay_old

Definition at line 45 of file particle_handler.h.

◆ h_az

real* ParticleHandler::h_az

host z acceleration

Definition at line 52 of file particle_handler.h.

◆ h_az_old

real* ParticleHandler::h_az_old

Definition at line 54 of file particle_handler.h.

◆ h_cs

real* ParticleHandler::h_cs

host speed of sound

Definition at line 78 of file particle_handler.h.

◆ h_dedt

real* ParticleHandler::h_dedt

host time derivative of internal energy

Definition at line 74 of file particle_handler.h.

◆ h_drhodt

real* ParticleHandler::h_drhodt

host time derivative of density

Definition at line 88 of file particle_handler.h.

◆ h_e

real* ParticleHandler::h_e

host internal energy

Definition at line 72 of file particle_handler.h.

◆ h_g_ax

real* ParticleHandler::h_g_ax

Definition at line 35 of file particle_handler.h.

◆ h_g_ax_old

real * ParticleHandler::h_g_ax_old

Definition at line 36 of file particle_handler.h.

◆ h_g_ay

real* ParticleHandler::h_g_ay

Definition at line 44 of file particle_handler.h.

◆ h_g_ay_old

real * ParticleHandler::h_g_ay_old

Definition at line 45 of file particle_handler.h.

◆ h_g_az

real* ParticleHandler::h_g_az

Definition at line 53 of file particle_handler.h.

◆ h_g_az_old

real * ParticleHandler::h_g_az_old

Definition at line 54 of file particle_handler.h.

◆ h_level

integer* ParticleHandler::h_level

Definition at line 60 of file particle_handler.h.

◆ h_mass

real* ParticleHandler::h_mass

host mass

Definition at line 28 of file particle_handler.h.

◆ h_materialId

integer* ParticleHandler::h_materialId

host material identifier

Definition at line 64 of file particle_handler.h.

◆ h_muijmax

real* ParticleHandler::h_muijmax

host max(mu_ij)

Definition at line 84 of file particle_handler.h.

◆ h_nnl

integer* ParticleHandler::h_nnl

host near(est) neighbor list

Definition at line 68 of file particle_handler.h.

◆ h_nodeType

integer* ParticleHandler::h_nodeType

Definition at line 58 of file particle_handler.h.

◆ h_noi

integer* ParticleHandler::h_noi

host number of interactions

Definition at line 70 of file particle_handler.h.

◆ h_p

real* ParticleHandler::h_p

host pressure

Definition at line 82 of file particle_handler.h.

◆ h_particles

Particles* ParticleHandler::h_particles

host instance of particles class

Definition at line 348 of file particle_handler.h.

◆ h_rho

real* ParticleHandler::h_rho

host density

Definition at line 80 of file particle_handler.h.

◆ h_sml

real* ParticleHandler::h_sml

host smoothing length

Definition at line 66 of file particle_handler.h.

◆ h_u

real* ParticleHandler::h_u

energy

Definition at line 76 of file particle_handler.h.

◆ h_uid

idInteger* ParticleHandler::h_uid

host unique identifier

Definition at line 62 of file particle_handler.h.

◆ h_vx

real* ParticleHandler::h_vx

host x velocity

Definition at line 32 of file particle_handler.h.

◆ h_vy

real* ParticleHandler::h_vy

host y velocity

Definition at line 41 of file particle_handler.h.

◆ h_vz

real* ParticleHandler::h_vz

host z velocity

Definition at line 50 of file particle_handler.h.

◆ h_x

real* ParticleHandler::h_x

host x position

Definition at line 30 of file particle_handler.h.

◆ h_y

real* ParticleHandler::h_y

host y position

Definition at line 39 of file particle_handler.h.

◆ h_z

real* ParticleHandler::h_z

host z position

Definition at line 48 of file particle_handler.h.

◆ leapfrog

bool ParticleHandler::leapfrog { false }

Definition at line 20 of file particle_handler.h.

◆ numNodes

integer ParticleHandler::numNodes

(host) number of nodes

Definition at line 25 of file particle_handler.h.

◆ numParticles

integer ParticleHandler::numParticles

(host) number of particles

Definition at line 23 of file particle_handler.h.


The documentation for this class was generated from the following files:
  • include/particle_handler.h
  • src/particle_handler.cpp

milupHPC - ParticleHandler Class Reference
Generated on Wed Aug 31 2022 12:16:53 by Doxygen 1.9.3