    

 ## On this page

  

 

 # IRockyAdhesiveDistanceData Class Reference

 Last update: 16.07.2025 

`#include <<a class="el" href="rocky__timestep__api_8h_source.xhtml">rocky_timestep_api.h</a>>`

Inherits [IRockyInteractionCalculationsData](classIRockyInteractionCalculationsData.xhtml).

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

void [set\_adhesive\_distance](#a7d103731c5133db24f461e91e24e2f7a) (int home\_index, int near\_index, double adhesive\_distance) ![-](/sites/default/files/migrate-content/rocky_solver_sdk_2025_r2_2/closed.png) Public Member Functions inherited from [IRockyInteractionCalculationsData](classIRockyInteractionCalculationsData.xhtml)int [get\_number\_particle\_groups](classIRockyInteractionCalculationsData.xhtml#ab5fb8e3d498bfc78f116eec7b53b22b8) () const int [get\_particle\_material\_index](classIRockyInteractionCalculationsData.xhtml#a700a3993ce6c50786c1323e0b91a7c3a) (int group\_index) const double [get\_particle\_min\_sieve\_size](classIRockyInteractionCalculationsData.xhtml#a1ce09b00f677c903a2d25426f8447300) (int group\_index) const double [get\_particle\_max\_sieve\_size](classIRockyInteractionCalculationsData.xhtml#ac12016128279790932537b32c1c7410d) (int group\_index) const double [get\_particle\_min\_mass](classIRockyInteractionCalculationsData.xhtml#a641adbab81c6c430aa1b0eae6eff29f4) (int group\_index) const int [get\_number\_geometry\_materials](classIRockyInteractionCalculationsData.xhtml#a986da6321cca08d20d20dbd43962a74a) () const int [get\_geometry\_material\_index](classIRockyInteractionCalculationsData.xhtml#a05cb28a940233bc976b806a5893c639c) (int index) const [IRockyMaterial](structIRockyMaterial.xhtml) [get\_material](classIRockyInteractionCalculationsData.xhtml#a609eb08b9a568e07c35953bd616d9551) (int index) const int [get\_material\_interaction\_index](classIRockyInteractionCalculationsData.xhtml#a1cf7ad2b906aa2f033494b390522bbb3) (int home\_index, int near\_index) const [IRockyMaterialInteraction](structIRockyMaterialInteraction.xhtml) [get\_material\_interaction](classIRockyInteractionCalculationsData.xhtml#aeb94fd8ed1f75bd0523634285ad94e4d) (int home\_index, int near\_index) const <a id="details" name="details"></a>## Detailed Description

An `<a class="el" href="classIRockyAdhesiveDistanceData.xhtml">IRockyAdhesiveDistanceData</a>` object provides data and utility methods needed to estimate and set appropriate values of adhesive distance per material interaction. The adhesive distance defines the upper limit for the activation of an adhesive contact between two particles or between a particle and a geometry. An adhesive contact only can exist when the effective gap distance between two entities is below the adhesive distance value stipulated for the corresponding material interaction. Therefore, no adhesive forces will be computed if that effective gap distance is larger than the specified adhesive distance. If a custom module does not implement a special adhesive distance calculation, Rocky will set the adhesive distances of all material interactions to a fixed value equal to 1 mm.

The class `<a class="el" href="classIRockyAdhesiveDistanceData.xhtml">IRockyAdhesiveDistanceData</a>` inherits all public methods of the class `<a class="el" href="classIRockyInteractionCalculationsData.xhtml">IRockyInteractionCalculationsData</a>`.



## Member Function Documentation

<a id="a7d103731c5133db24f461e91e24e2f7a" name="a7d103731c5133db24f461e91e24e2f7a"></a>## [◆ ](#a7d103731c5133db24f461e91e24e2f7a)set\_adhesive\_distance()

 void IRockyAdhesiveDistanceData::set\_adhesive\_distance  ( int *home\_index*,    int *near\_index*,    double *adhesive\_distance* )

This method sets a value of the adhesive distance per material interaction,for a custom adhesive force model.Parameters home\_indexThe index of the first material.near\_indexThe index of the second material.adhesive\_distanceThe value of the adhesive distance just calculated.