Skip to main content
#include <rocky_vicinity_pair_api.hpp> The IRockyVicinityPair class models the vicinity between two distinct simulation entities (particles or triangles) and provide methods to allow the computation of vicinity conditions depending on the custom model that one is implementing.

Members

Public functions

Function get_home_particle

Returns: An IRockyParticle object representing the home particle. This object gives access to several instantaneous properties associated to that particle. Return type: ROCKY_FUNCTIONS IRockyParticle

Function get_near_particle

Returns: An IRockyParticle object representing the near particle. This object gives access to several instantaneous properties associated to that particle. Return type: ROCKY_FUNCTIONS IRockyParticle

Function get_near_triangle

Returns: An IRockyGeometryTriangle object representing the near triangle. This object gives access to several instantaneous properties associated to that triangle. Return type: ROCKY_FUNCTIONS IRockyGeometryTriangle

Function is_particle_particle

Returns: True if the pair represents a particle-to-particle vicinity, false otherwise. Return type: ROCKY_FUNCTIONS bool

Function is_particle_triangle

Returns: True if the pair represents a particle-to-triangle vicinity, false otherwise. Return type: ROCKY_FUNCTIONS bool

Function get_distance

Returns: The distance between the centroids of the two entities in the vicinity. Return type: ROCKY_FUNCTIONS double

Function get_squared_distance

!> Attention
This method performs better than IRockyVicinityPair because it don’t require a computational costly computation of a square root of the squared distance between entities centroids.
Returns: The squared distance between the centroids of the two entities in the vicinity. Return type: ROCKY_FUNCTIONS double