Skip to main content
#include <rocky_sph_interaction_api.hpp> IRockySPHElementInteraction is a code representation of a pair of neighbor SPH elements within the support region of each other, i.e. they have a force interaction between them. Within Rocky, this pair is usually called SPH element interaction.

Members

Public functions

Function calculate_elements_distance

Returns: The vector that joins the points at which the two neighbor SPH elements are located. Return type: ROCKY_FUNCTIONS float3

Function calculate_elements_relative_velocity

Returns: The relative velocity vector between the two neighbor SPH elements. Return type: ROCKY_FUNCTIONS float3

Function get_home_element_velocity

Returns: The velocity vector of the SPH element labeled as home in the SPH interaction. Return type: ROCKY_FUNCTIONS float3

Function get_near_element_velocity

Returns: The velocity vector of the SPH element labeled as near in the SPH interaction. Return type: ROCKY_FUNCTIONS float3

Function get_home_element

Returns: An IRockySPHElement object representing the SPH element labeled as home in the SPH interaction. Return type: ROCKY_FUNCTIONS IRockySPHElement

Function get_near_element

Returns: An IRockySPHElement object representing the SPH element labeled as near in the SPH element interaction. Return type: ROCKY_FUNCTIONS IRockySPHElement

Function add_force

By using this method, a SPH module can pass custom calculated forces to the Rocky solver,: so they are applied to the SPH elements associated to the referred SPH element interaction. Parameters:
  • force: The force to be applied to the SPH elements, expressed in Cartesian coordinates.
Parameters:
  • float3 force
Return type: ROCKY_FUNCTIONS void

Function add_acceleration

By using this method, a SPH module can pass custom calculated accelerations to the Rocky: solver, so they are added to the SPH elements associated in the referred SPH element interaction. Parameters:
  • acceleration: The acceleration to be added to the SPH elements, expressed in Cartesian coordinates.
Parameters:
  • float3 acceleration
Return type: ROCKY_FUNCTIONS void