MULTIBODY SIMULATION SOFTWARE - API documentation

chrono::ChContactGPUsimple Class Reference

#include <CHcontactGPUsimple.h>

Collaboration diagram for chrono::ChContactGPUsimple:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ChContactGPUsimple (collision::ChCollisionModel *mmodA, collision::ChCollisionModel *mmodB, const ChLcpVariablesBody *varA, const ChLcpVariablesBody *varB, const ChFrame<> *frameA, const ChFrame<> *frameB, const ChVector<> &vpA, const ChVector<> &vpB, const ChVector<> &vN, double mdistance, float *mreaction_cache, float mfriction)
virtual void Reset (collision::ChCollisionModel *mmodA, collision::ChCollisionModel *mmodB, const ChLcpVariablesBody *varA, const ChLcpVariablesBody *varB, const ChFrame<> *frameA, const ChFrame<> *frameB, const ChVector<> &vpA, const ChVector<> &vpB, const ChVector<> &vN, double mdistance, float *mreaction_cache, float mfriction)
virtual ChCoordsys GetContactCoords ()
virtual ChVector GetContactP1 ()
virtual ChVector GetContactP2 ()
virtual ChVector< float > GetContactNormal ()
virtual double GetContactDistance ()
virtual ChVector GetContactForce ()
virtual float GetFriction ()
virtual void SetFriction (float mf)
virtual
collision::ChCollisionModel
GetModelA ()
virtual
collision::ChCollisionModel
GetModelB ()
void InjectConstraints (ChLcpSystemDescriptor &mdescriptor)
void ConstraintsBiReset ()
void ConstraintsBiLoad_C (double factor=1., double recovery_clamp=0.1, bool do_clamp=false)
void ConstraintsFetch_react (double factor)
void ConstraintsLiLoadSuggestedSpeedSolution ()
void ConstraintsLiLoadSuggestedPositionSolution ()
void ConstraintsLiFetchSuggestedSpeedSolution ()
void ConstraintsLiFetchSuggestedPositionSolution ()

Protected Attributes

collision::ChCollisionModelmodA
collision::ChCollisionModelmodB
ChLcpConstraintTwoGPUcontN Nx
ChLcpConstraintTwoGPUcontT Tu
ChLcpConstraintTwoGPUcontT Tv
ChVector react_force


Detailed Description

Class representing an unilateral contact constraint. Such objects are automatically generated by the collision detection engine. This is a 'basic' implementation of contact for the original GPU solver by Dan & Ale. This is used in the ChContactContainerGPUsimple container. (In future, the GPU solver will access directly a more performant ChContactContainerGPUsimple that uses GPU buffers for storing contacts, instead of vectors of structures like this one.)

Constructor & Destructor Documentation

chrono::ChContactGPUsimple::ChContactGPUsimple ( collision::ChCollisionModel mmodA,
collision::ChCollisionModel mmodB,
const ChLcpVariablesBody varA,
const ChLcpVariablesBody varB,
const ChFrame<> *  frameA,
const ChFrame<> *  frameB,
const ChVector<> &  vpA,
const ChVector<> &  vpB,
const ChVector<> &  vN,
double  mdistance,
float *  mreaction_cache,
float  mfriction 
)

< pass A vars

< pass B vars

< pass A frame

< pass B frame

< pass coll.point on A

< pass coll.point on B

< pass coll.normal, respect to A

< pass the distance (negative for penetration)

< pass the pointer to array of N,U,V reactions: a cache in contact manifold. If not available=0.

< friction coeff.

Parameters:
mmodA  model A
mmodB  model B
varA  pass A vars
varB  pass B vars
frameA  pass A frame
frameB  pass B frame
vpA  pass coll.point on A
vpB  pass coll.point on B
vN  pass coll.normal, respect to A
mdistance  pass the distance (negative for penetration)
mreaction_cache  pass the pointer to array of N,U,V reactions: a cache in contact manifold. If not available=0.
mfriction  friction coeff.


Member Function Documentation

void chrono::ChContactGPUsimple::Reset ( collision::ChCollisionModel mmodA,
collision::ChCollisionModel mmodB,
const ChLcpVariablesBody varA,
const ChLcpVariablesBody varB,
const ChFrame<> *  frameA,
const ChFrame<> *  frameB,
const ChVector<> &  vpA,
const ChVector<> &  vpB,
const ChVector<> &  vN,
double  mdistance,
float *  mreaction_cache,
float  mfriction 
) [virtual]

Initialize again this constraint.

Parameters:
mmodA  model A
mmodB  model B
varA  pass A vars
varB  pass B vars
frameA  pass A frame
frameB  pass B frame
vpA  pass coll.point on A
vpB  pass coll.point on B
vN  pass coll.normal, respect to A
mdistance  pass the distance (negative for penetration)
mreaction_cache  pass the pointer to array of N,U,V reactions: a cache in contact manifold. If not available=0.
mfriction  friction coeff.

ChCoordsys chrono::ChContactGPUsimple::GetContactCoords (  )  [virtual]

Get the contact coordinate system, expressed in absolute frame. This represents the 'main' reference of the link: reaction forces are expressed in this coordinate system. Its origin is point P2. (It is the coordinate system of the contact plane and normal)

virtual ChVector chrono::ChContactGPUsimple::GetContactP1 (  )  [virtual]

Get the contact point 1, in absolute coordinates.

Returns the pointer to a contained 3x3 matrix representing the UV and normal directions of the contact. In detail, the X versor (the 1s column of the matrix) represents the direction of the contact normal.

virtual ChVector chrono::ChContactGPUsimple::GetContactP2 (  )  [virtual]

Get the contact point 2, in absolute coordinates.

virtual ChVector<float> chrono::ChContactGPUsimple::GetContactNormal (  )  [virtual]

Get the contact normal, in absolute coordinates.

virtual double chrono::ChContactGPUsimple::GetContactDistance (  )  [virtual]

Get the contact distance.

virtual ChVector chrono::ChContactGPUsimple::GetContactForce (  )  [virtual]

Get the contact force, if computed, in contact coordinate system.

virtual float chrono::ChContactGPUsimple::GetFriction (  )  [virtual]

Get the contact friction coefficient.

virtual void chrono::ChContactGPUsimple::SetFriction ( float  mf  )  [virtual]

Set the contact friction coefficient.

virtual collision::ChCollisionModel* chrono::ChContactGPUsimple::GetModelA (  )  [virtual]

Get the collision model A, with point P1.

virtual collision::ChCollisionModel* chrono::ChContactGPUsimple::GetModelB (  )  [virtual]

Get the collision model B, with point P2.


Member Data Documentation

collision::ChCollisionModel* chrono::ChContactGPUsimple::modA [protected]

model A

collision::ChCollisionModel* chrono::ChContactGPUsimple::modB [protected]

model B


CHRONO::ENGINE
C++ library for multibody simulation, (C) Alessandro Tasora
This API documentation has been generated on 17 Jul 2009 by Doxygen