DEMParticleAccessor< dim, number > Class Template Reference
|
Developer Documentation
|
#include <particle_accessor.hpp>
Public Member Functions | |
| DEMParticleAccessor (dealii::Particles::ParticleAccessor< dim > &particle) | |
| DEMParticleAccessor (dealii::Point< dim, number > &location, dealii::ArrayView< number > properties, dealii::types::particle_index particle_id) | |
| DEMParticleAccessor (dealii::Particles::PropertyPool< dim > &property_pool, const typename dealii::Particles::PropertyPool< dim >::Handle handle) noexcept | |
| Construct accessor from a PropertyPool handle. | |
| DEMParticleAccessor (const DEMParticleAccessor &other) noexcept=default | |
| DEMParticleAccessor (DEMParticleAccessor &&other) noexcept=default | |
| DEMParticleAccessor & | operator= (DEMParticleAccessor &&other) noexcept=default |
| DEMParticleAccessor & | operator= (const DEMParticleAccessor &other) noexcept=default |
| dealii::Point< dim, number > & | get_location () |
| const dealii::Point< dim, number > & | get_location () const |
| dealii::Tensor< 1, dim, number > | linear_velocity () const |
| number & | linear_velocity (const unsigned int dimension) |
| const number & | linear_velocity (const unsigned int dimension) const |
| number & | linear_acceleration (const unsigned int dimension) |
| dealii::Tensor< 1, axial_dim< dim >, number > | get_angular_velocity () const |
| number & | angular_acceleration (const unsigned int dimension) |
| number & | angular_velocity (const unsigned int dimension) |
| const number & | angular_velocity (const unsigned int dimension) const |
| dealii::Tensor< 1, axial_dim< dim >, number > | angular_velocity () const |
| number & | force (const unsigned int dimension) |
| const number & | force (const unsigned int dimension) const |
| dealii::Tensor< 1, dim, number > | force () const |
| void | set_force (const dealii::Tensor< 1, dim, number > &force) |
| void | add_force (const dealii::Tensor< 1, dim, number > &force) |
| void | set_torque (const dealii::Tensor< 1, axial_dim< dim >, number > &torque) |
| void | add_torque (const dealii::Tensor< 1, axial_dim< dim >, number > &torque) |
| number & | torque (const unsigned int dimension) |
| const number & | torque (const unsigned int dimension) const |
| dealii::Tensor< 1, axial_dim< dim >, number > | torque () const |
| dealii::types::particle_index | id () const |
| dealii::types::particle_index | local_id () const |
| number & | radius () |
| const number & | radius () const |
| number & | mass () |
| const number & | mass () const |
| number & | density () |
| const number & | density () const |
| number & | get_property (const typename SphericalParticle< dim, number >::Properties property) |
| const number & | get_property (const typename SphericalParticle< dim, number >::Properties property) const |
| dealii::Triangulation< dim >::active_cell_iterator | get_surrounding_cell () const |
Private Attributes | |
| std::reference_wrapper< dealii::Point< dim, number > > | location |
| Reference to the particle location. | |
| dealii::ArrayView< number > | properties |
| View to the particle properties (velocity, force etc.). | |
| dealii::Triangulation< dim >::active_cell_iterator | surrounding_cell |
| dealii::types::particle_index | particle_id |
| The global unique identifier of the particle. | |
| dealii::types::particle_index | local_particle_id = dealii::numbers::invalid_unsigned_int |
Detailed Description
class MeltPoolDG::DEMParticleAccessor< dim, number >
This class acts as a lightweight wrapper around deal.II's ParticleAccessor or PropertyPool handles. It allows read/write access to particle properties (velocity, angular velocity, forces, etc.) and to the particle's spatial location.
Constructor & Destructor Documentation
◆ DEMParticleAccessor() [1/5]
| MeltPoolDG::DEMParticleAccessor< dim, number >::DEMParticleAccessor | ( | dealii::Particles::ParticleAccessor< dim > & | particle | ) |
Construct accessor from a deal.II ParticleAccessor.
- Parameters
-
particle Reference to a deal.II particle accessor.
◆ DEMParticleAccessor() [2/5]
| MeltPoolDG::DEMParticleAccessor< dim, number >::DEMParticleAccessor | ( | dealii::Point< dim, number > & | location, |
| dealii::ArrayView< number > | properties, | ||
| dealii::types::particle_index | particle_id | ||
| ) |
Construct accessor from a location and properties view.
- Parameters
-
location Reference to the particle location. properties View to the particle properties. particle_id The unique identifier for the particle.
◆ DEMParticleAccessor() [3/5]
|
noexcept |
Construct accessor from a PropertyPool handle.
- Parameters
-
property_pool Reference to the deal.II property pool. handle Handle/index of the particle within the property pool.
◆ DEMParticleAccessor() [4/5]
|
defaultnoexcept |
Copy constructor.
◆ DEMParticleAccessor() [5/5]
|
defaultnoexcept |
Move constructor.
Member Function Documentation
◆ add_force()
| void MeltPoolDG::DEMParticleAccessor< dim, number >::add_force | ( | const dealii::Tensor< 1, dim, number > & | force | ) |
Accumulates the specified force vector to the particle by adding its components into the particle's property array.
- Parameters
-
force The force vector to be added.
◆ add_torque()
| void MeltPoolDG::DEMParticleAccessor< dim, number >::add_torque | ( | const dealii::Tensor< 1, axial_dim< dim >, number > & | torque | ) |
Accumulates the specified torque vector to the particle by adding its components into the internal torque vector.
- Parameters
-
torque The torque vector to be added.
◆ angular_acceleration()
| number & MeltPoolDG::DEMParticleAccessor< dim, number >::angular_acceleration | ( | const unsigned int | dimension | ) |
Returns the angular acceleration of the given particle in the specified dimension.
- Parameters
-
dimension The dimension for which to return the acceleration.
- Returns
- The angular acceleration in the specified dimension.
◆ angular_velocity() [1/3]
| dealii::Tensor< 1, axial_dim< dim >, number > MeltPoolDG::DEMParticleAccessor< dim, number >::angular_velocity | ( | ) | const |
Returns the angular velocity tensor of the given particle.
- Returns
- A tensor representing the angular velocity of the particle.
◆ angular_velocity() [2/3]
| number & MeltPoolDG::DEMParticleAccessor< dim, number >::angular_velocity | ( | const unsigned int | dimension | ) |
Returns the angular velocity of the given particle in the specified dimension.
- Parameters
-
dimension The dimension for which to return the angular velocity.
- Returns
- The angular velocity in the specified dimension.
◆ angular_velocity() [3/3]
| const number & MeltPoolDG::DEMParticleAccessor< dim, number >::angular_velocity | ( | const unsigned int | dimension | ) | const |
Same as above but for const access.
◆ density() [1/2]
| number & MeltPoolDG::DEMParticleAccessor< dim, number >::density | ( | ) |
Returns the density of the particle.
- Returns
- The density of the particle.
◆ density() [2/2]
| const number & MeltPoolDG::DEMParticleAccessor< dim, number >::density | ( | ) | const |
Same as above but for const access.
◆ force() [1/3]
| dealii::Tensor< 1, dim, number > MeltPoolDG::DEMParticleAccessor< dim, number >::force | ( | ) | const |
Returns the force vector of the given particle.
- Returns
- A tensor representing the force of the particle.
◆ force() [2/3]
| number & MeltPoolDG::DEMParticleAccessor< dim, number >::force | ( | const unsigned int | dimension | ) |
Returns the force acting on the given particle in the specified dimension.
- Parameters
-
dimension The dimension for which to return the force.
- Returns
- The force in the specified dimension.
◆ force() [3/3]
| const number & MeltPoolDG::DEMParticleAccessor< dim, number >::force | ( | const unsigned int | dimension | ) | const |
Same as above but for const access.
◆ get_angular_velocity()
| dealii::Tensor< 1, axial_dim< dim >, number > MeltPoolDG::DEMParticleAccessor< dim, number >::get_angular_velocity | ( | ) | const |
Returns the angular velocity of the given particle.
- Returns
- A tensor representing the angular velocity of the particle.
◆ get_location() [1/2]
| dealii::Point< dim, number > & MeltPoolDG::DEMParticleAccessor< dim, number >::get_location | ( | ) |
Returns a reference to the location of the particle.
- Returns
- Reference to the particle location.
◆ get_location() [2/2]
| const dealii::Point< dim, number > & MeltPoolDG::DEMParticleAccessor< dim, number >::get_location | ( | ) | const |
Same as above but for const access.
◆ get_property() [1/2]
| number & MeltPoolDG::DEMParticleAccessor< dim, number >::get_property | ( | const typename SphericalParticle< dim, number >::Properties | property | ) |
This function returns the value of a single-valued property stored in the given particle.
- Parameters
-
property The property to retrieve.
- Returns
- The value of the specified property.
- Note
- This function should be used only for scalar properties. For vector-valued properties such as translational or angular velocity, use the functions
get_velocity()andget_angular_velocity().
◆ get_property() [2/2]
| const number & MeltPoolDG::DEMParticleAccessor< dim, number >::get_property | ( | const typename SphericalParticle< dim, number >::Properties | property | ) | const |
Same as above but for const access.
◆ get_surrounding_cell()
| dealii::Triangulation< dim >::active_cell_iterator MeltPoolDG::DEMParticleAccessor< dim, number >::get_surrounding_cell | ( | ) | const |
Return the surrounding active cell of the particle center location. This function can only be called for locally owned particles as the surrounding active cell might not be locally available for ghost particles.
◆ id()
| dealii::types::particle_index MeltPoolDG::DEMParticleAccessor< dim, number >::id | ( | ) | const |
Returns the unique identifier of the particle.
- Returns
- The particle ID.
◆ linear_acceleration()
| number & MeltPoolDG::DEMParticleAccessor< dim, number >::linear_acceleration | ( | const unsigned int | dimension | ) |
Returns the linear acceleration of the given particle in the specified dimension.
- Parameters
-
dimension The dimension for which to return the acceleration.
- Returns
- The linear acceleration in the specified dimension.
◆ linear_velocity() [1/3]
| dealii::Tensor< 1, dim, number > MeltPoolDG::DEMParticleAccessor< dim, number >::linear_velocity | ( | ) | const |
Returns the linear velocity of the given particle, i.e., the translational velocity at the particle center of mass.
- Returns
- A tensor representing the linear velocity of the particle.
◆ linear_velocity() [2/3]
| number & MeltPoolDG::DEMParticleAccessor< dim, number >::linear_velocity | ( | const unsigned int | dimension | ) |
Returns the linear velocity of the given particle in the specified dimension.
- Parameters
-
dimension The dimension for which to return the velocity.
- Returns
- The linear velocity in the specified dimension.
◆ linear_velocity() [3/3]
| const number & MeltPoolDG::DEMParticleAccessor< dim, number >::linear_velocity | ( | const unsigned int | dimension | ) | const |
Same as above but for const access.
◆ local_id()
| dealii::types::particle_index MeltPoolDG::DEMParticleAccessor< dim, number >::local_id | ( | ) | const |
Returns the rank local particle index of the particle, which can be used for array access.
- Returns
- The rank local particle index.
◆ mass() [1/2]
| number & MeltPoolDG::DEMParticleAccessor< dim, number >::mass | ( | ) |
Returns the mass of the particle.
- Returns
- The mass of the particle.
◆ mass() [2/2]
| const number & MeltPoolDG::DEMParticleAccessor< dim, number >::mass | ( | ) | const |
Same as above but for const access.
◆ operator=() [1/2]
|
defaultnoexcept |
Copy assignment operator.
◆ operator=() [2/2]
|
defaultnoexcept |
Move assignment operator.
◆ radius() [1/2]
| number & MeltPoolDG::DEMParticleAccessor< dim, number >::radius | ( | ) |
Returns the radius of the particle.
- Returns
- The radius of the particle.
◆ radius() [2/2]
| const number & MeltPoolDG::DEMParticleAccessor< dim, number >::radius | ( | ) | const |
Same as above but for const access.
◆ set_force()
| void MeltPoolDG::DEMParticleAccessor< dim, number >::set_force | ( | const dealii::Tensor< 1, dim, number > & | force | ) |
Sets the specified force vector to the particle by assigning its components into the particle's property array.
- Parameters
-
force The force vector to assign to the particle.
◆ set_torque()
| void MeltPoolDG::DEMParticleAccessor< dim, number >::set_torque | ( | const dealii::Tensor< 1, axial_dim< dim >, number > & | torque | ) |
Sets the specified torque vector to the particle by assigning its components into the particle's property array.
- Parameters
-
torque The torque vector to assign to the particle.
◆ torque() [1/3]
| dealii::Tensor< 1, axial_dim< dim >, number > MeltPoolDG::DEMParticleAccessor< dim, number >::torque | ( | ) | const |
Returns the torque vector of the given particle.
- Returns
- A tensor representing the torque of the particle.
◆ torque() [2/3]
| number & MeltPoolDG::DEMParticleAccessor< dim, number >::torque | ( | const unsigned int | dimension | ) |
Returns the torque acting on the given particle in the specified dimension.
- Parameters
-
dimension The dimension for which to return the torque.
- Returns
- The torque in the specified dimension.
◆ torque() [3/3]
| const number & MeltPoolDG::DEMParticleAccessor< dim, number >::torque | ( | const unsigned int | dimension | ) | const |
Same as above but for const access.
Member Data Documentation
◆ local_particle_id
|
private |
The MPI rank local particle index which can be used e.g. for array access (only available for locally owned particles).
◆ location
|
private |
Reference to the particle location.
◆ particle_id
|
private |
The global unique identifier of the particle.
◆ properties
|
private |
View to the particle properties (velocity, force etc.).
◆ surrounding_cell
|
private |
The surrounding active cell of the particle center location. This is only valid for locally owned particles.
The documentation for this class was generated from the following file:
- include/meltpooldg/particles/particle_accessor.hpp
Generated by