MULTIBODY SIMULATION SOFTWARE - API documentation

chrono::ChContactContainerGPUsimple Class Reference

#include <CHcontactContainerGPUsimple.h>

Inheritance diagram for chrono::ChContactContainerGPUsimple:

Inheritance graph
[legend]
Collaboration diagram for chrono::ChContactContainerGPUsimple:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual int GetNcontacts ()
virtual void RemoveAllContacts ()
virtual void BeginAddContact ()
virtual void AddContact (const collision::ChCollisionInfo &mcontact)
virtual void EndAddContact ()
virtual void ReportAllContacts (ChReportContactCallback *mcallback)
virtual int GetDOC_d ()
virtual void Update (double mtime)
virtual void InjectConstraints (ChLcpSystemDescriptor &mdescriptor)
virtual void ConstraintsBiReset ()
virtual void ConstraintsBiLoad_C (double factor=1., double recovery_clamp=0.1, bool do_clamp=false)
virtual void ConstraintsLoadJacobians ()
virtual void ConstraintsLiLoadSuggestedSpeedSolution ()
virtual void ConstraintsLiLoadSuggestedPositionSolution ()
virtual void ConstraintsLiFetchSuggestedSpeedSolution ()
virtual void ConstraintsLiFetchSuggestedPositionSolution ()
virtual void ConstraintsFetch_react (double factor=1.)

Protected Attributes

std::list
< ChContactGPUsimple * > 
contactlist
int n_added
std::list
< ChContactGPUsimple * >
::iterator 
lastcontact


Detailed Description

Class representing a container of many contacts, implemented as a typical linked list of ChContactGPUsimple objects. This contact container must be used for the preliminar CUDA solver that was developed by Ale & Dan, but in future will be replaced by ChContactContainerGPU, and advanced container that does not use linked lists of cpu objects but rather keeps all contact data as GPU buffers on the GPU device.

Member Function Documentation

virtual int chrono::ChContactContainerGPUsimple::GetNcontacts (  )  [virtual]

Tell the number of added contacts.

Implements chrono::ChContactContainerBase.

void chrono::ChContactContainerGPUsimple::RemoveAllContacts (  )  [virtual]

Remove (delete) all contained contact data.

Implements chrono::ChContactContainerBase.

void chrono::ChContactContainerGPUsimple::BeginAddContact (  )  [virtual]

The collision system will call BeginAddContact() before adding all contacts (for example with AddContact() or similar). Instead of simply deleting all list of the previous contacts, this optimized implementation rewinds the link iterator to begin and tries to reuse previous contact objects until possible, to avoid too much allocation/deallocation.

Reimplemented from chrono::ChContactContainerBase.

void chrono::ChContactContainerGPUsimple::AddContact ( const collision::ChCollisionInfo mcontact  )  [virtual]

Add a contact between two frames.

Implements chrono::ChContactContainerBase.

void chrono::ChContactContainerGPUsimple::EndAddContact (  )  [virtual]

The collision system will call BeginAddContact() after adding all contacts (for example with AddContact() or similar). This optimized version purges the end of the list of contacts that were not reused (if any).

Reimplemented from chrono::ChContactContainerBase.

void chrono::ChContactContainerGPUsimple::ReportAllContacts ( ChReportContactCallback mcallback  )  [virtual]

Scans all the contacts and for each contact exacutes the ReportContactCallback() function of the user object inherited from ChReportContactCallback. Child classes of ChContactContainerBase should try to implement this (although in some highly-optimized cases as in ChContactContainerGPU it could be impossible to report all contacts).

Implements chrono::ChContactContainerBase.

virtual int chrono::ChContactContainerGPUsimple::GetDOC_d (  )  [virtual]

Tell the number of scalar bilateral constraints (actually, friction constraints aren't exactly as unilaterals, but count them too)

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChContactContainerGPUsimple::Update ( double  mtime  )  [virtual]

In detail, it computes jacobians, violations, etc. and stores results in inner structures of contacts.

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChContactContainerGPUsimple::InjectConstraints ( ChLcpSystemDescriptor mdescriptor  )  [virtual]

Tell to a system descriptor that there are contraints of type ChLcpConstraint in this object (for further passing it to a LCP solver) Basically does nothing, but maybe that inherited classes may specialize this.

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChContactContainerGPUsimple::ConstraintsBiReset (  )  [virtual]

Sets to zero the known term (b_i) of encapsulated ChLcpConstraints.

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChContactContainerGPUsimple::ConstraintsBiLoad_C ( double  factor = 1.,
double  recovery_clamp = 0.1,
bool  do_clamp = false 
) [virtual]

Adds the current C (constraint violation) to the known term (b_i) of encapsulated ChLcpConstraints

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChContactContainerGPUsimple::ConstraintsLoadJacobians (  )  [virtual]

Adds the current jacobians in encapsulated ChLcpConstraints.

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChContactContainerGPUsimple::ConstraintsLiLoadSuggestedSpeedSolution (  )  [virtual]

Fills the solution of the constraint (the lagrangian multiplier l_i) with an initial guess, if any. This can be used for warm-starting the LCP solver before starting the solution of the SPEED problem, if some approximate solution of constraint impulese l_i already exist (ex. cached from a previous LCP execution) When implementing this in sub classes, if no guess is available, set l_i as 0.

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChContactContainerGPUsimple::ConstraintsLiLoadSuggestedPositionSolution (  )  [virtual]

As ConstraintsLiLoadSuggestedSpeedSolution(), but for the POSITION problem.

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChContactContainerGPUsimple::ConstraintsLiFetchSuggestedSpeedSolution (  )  [virtual]

After the LCP solver has found the l_i lagangian multipliers for the SPEED problem, this function will be called to store the solutions in a cache (to be implemented in ChLink sub classes) so that it can be later retrieved with ConstraintsLiLoadSuggestedSpeedSolution(). If you do not plan to implement a l_i cache, just do not override this function in child classes and do nothing.

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChContactContainerGPUsimple::ConstraintsLiFetchSuggestedPositionSolution (  )  [virtual]

As ConstraintsLiFetchSuggestedSpeedSolution(), but for the POSITION problem.

Reimplemented from chrono::ChPhysicsItem.

void chrono::ChContactContainerGPUsimple::ConstraintsFetch_react ( double  factor = 1.  )  [virtual]

Fetches the reactions from the lagrangian multiplier (l_i) of encapsulated ChLcpConstraints. Mostly used after the LCP provided the solution in ChLcpConstraints. Also, should convert the reactions obtained from dynamical simulation, from link space to intuitive react_force and react_torque.

Reimplemented from chrono::ChPhysicsItem.


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