GET_NCONTACTS

Utility/Data Access SubroutineExtract the number of body contacts during a simulation.

Use

This subroutine can be used to extract the number of active rigid or flexible body contacts in MotionSolve

Format

Fortran Calling Syntax
CALL GET_NCONTACTS(ID, I_GRA_ID, J_GRA_ID, NCONTACTS, ERRFLG)
C/C++ Calling Syntax
c_get_ncontacts(id, i_gra_id, j_gra_id, ncontacts, errflg)
Python Calling Syntax
[ncontacts, errflg] = py_get_ncontacts(id, i_gra_id, j_gra_id):

Attributes

ID
[integer]
The ID of the contact force modeling element (Force_Contact in the XML) for which the results are desired.
I_GRA_ID
[integer]
The ID of the I body's graphic representation. If the body is flexible, this attribute is ignored, and any integer value can be provided.
J_GRA_ID
[integer]
The ID of the J body's graphic representation. If the body is flexible, this attribute is ignored, and any integer value can be provided.

Output

NCONTACTS
[integer]
An integer value that represents the number of active contacts at the current time step.
ERRFLG
[logical]
A value that is true if an error occurs during the call to GET_NCONTACTS

Comments

  1. The GET_NCONTACTS utility function can only be used within a CONTACTPOST subroutine to retrieve the number of active contacts within the model at the current time step.
  2. This utility function is often called in conjunction with the GET_CONTACT_POST utility function.