AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agx::WireContactConstraint Class Referenceabstract

A one row constraint. More...

#include <WireContactSolver.h>

+ Inheritance diagram for agx::WireContactConstraint:

Public Member Functions

 WireContactConstraint ()
 
bool addWireParticle (WireParticle *wp, size_t contactIndex)
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
void calculateD (Real timestep)
 
void calculateEpsilon (Real timestep)
 
void calculateInitialLambda (Real timestep)
 
virtual void calculateJacobian ()=0
 
virtual void calculateRHS (Real invTimestep, Real violation)
 
virtual void calculateViolation ()=0
 
Real getD () const
 
Real getEpsilon () const
 
size_t getFirstParticleGlobalIndex () const
 
Real getForceOnParticle (size_t globalIndex, Real timestep)
 
bool getHasBounds ()
 
Real getInvMass (size_t particleIndex)
 
bool getJacobian (size_t particleIndex, Real &G)
 
Real getLambda () const
 
Real getLowerBounds () const
 
Real getMass (size_t particleIndex)
 
WireParticleRefVector & getParticles ()
 
bool getReachedBounds ()
 
int getReferenceCount () const
 
Real getRHS () const
 
Real getUpperBounds () const
 
Real getViolation () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
virtual void postCallback (Real)
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void setBounds (RangeReal bounds)
 
void setCompliance (Real compliance)
 
void setLambda (Real lambda)
 
void setReachedBounds (bool reached)
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 

Static Public Member Functions

template<typename T >
static bool ValidateCast (const Referenced *object)
 

Protected Member Functions

virtual ~WireContactConstraint ()
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Static Protected Member Functions

static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 

Protected Attributes

Real m_compliance
 
Real m_damping
 
size_t m_firstParticleGlobalIndex
 
bool m_hasBounds
 
RealVector m_jacobianVector
 
Mutex m_mutex
 
RealVector m_normalForces
 
ObserverContainer m_observers
 
WireParticleRefVector m_particles
 
AtomicValue m_refCount
 
Real m_rhs
 
Real m_violation
 

Detailed Description

A one row constraint.

Definition at line 142 of file WireContactSolver.h.

Constructor & Destructor Documentation

agx::WireContactConstraint::WireContactConstraint ( )
virtual agx::WireContactConstraint::~WireContactConstraint ( )
inlineprotectedvirtual

Definition at line 279 of file WireContactSolver.h.

Member Function Documentation

void agx::Referenced::allocateObserverVector ( ) const
protectedinherited
template<typename T >
T* agx::Referenced::as ( )
inherited

Subclass casting.

Template type must match actual type, dynamic_cast assertion will fail otherwise.

Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), and agx::InternalData::getOrCreate().

template<typename T >
const T* agx::Referenced::as ( ) const
inherited
template<typename T >
T* agx::Referenced::asSafe ( )
inherited

Safe subclass casting, return nullptr if template type does not match.

Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().

template<typename T >
const T* agx::Referenced::asSafe ( ) const
inherited
void agx::WireContactConstraint::calculateD ( Real  timestep)
inline
void agx::WireContactConstraint::calculateEpsilon ( Real  timestep)
inline

Definition at line 253 of file WireContactSolver.h.

References m_compliance, and m_damping.

Referenced by calculateD().

void agx::WireContactConstraint::calculateInitialLambda ( Real  timestep)
inline

Definition at line 153 of file WireContactSolver.h.

References m_compliance, and m_violation.

virtual void agx::WireContactConstraint::calculateJacobian ( )
pure virtual
virtual void agx::WireContactConstraint::calculateRHS ( Real  invTimestep,
Real  violation 
)
inlinevirtual
virtual void agx::WireContactConstraint::calculateViolation ( )
pure virtual
void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited
Real agx::WireContactConstraint::getD ( ) const
inline

Definition at line 222 of file WireContactSolver.h.

static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.
Real agx::WireContactConstraint::getEpsilon ( ) const
inline

Definition at line 221 of file WireContactSolver.h.

Referenced by calculateD().

size_t agx::WireContactConstraint::getFirstParticleGlobalIndex ( ) const
inline

Definition at line 203 of file WireContactSolver.h.

References m_firstParticleGlobalIndex.

Referenced by calculateD().

Real agx::WireContactConstraint::getForceOnParticle ( size_t  globalIndex,
Real  timestep 
)
inline
bool agx::WireContactConstraint::getHasBounds ( )
inline

Definition at line 266 of file WireContactSolver.h.

References m_hasBounds.

Real agx::WireContactConstraint::getInvMass ( size_t  particleIndex)
inline
bool agx::WireContactConstraint::getJacobian ( size_t  particleIndex,
Real &  G 
)
inline
Real agx::WireContactConstraint::getLambda ( ) const
inline

Definition at line 219 of file WireContactSolver.h.

Real agx::WireContactConstraint::getLowerBounds ( ) const
inline

Definition at line 273 of file WireContactSolver.h.

Real agx::WireContactConstraint::getMass ( size_t  particleIndex)
inline
WireParticleRefVector& agx::WireContactConstraint::getParticles ( )
inline

Definition at line 252 of file WireContactSolver.h.

References m_particles.

bool agx::WireContactConstraint::getReachedBounds ( )
inline

Definition at line 226 of file WireContactSolver.h.

int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.
Real agx::WireContactConstraint::getRHS ( ) const
inline

Definition at line 205 of file WireContactSolver.h.

References m_rhs.

Real agx::WireContactConstraint::getUpperBounds ( ) const
inline

Definition at line 274 of file WireContactSolver.h.

Real agx::WireContactConstraint::getViolation ( ) const
inline

Definition at line 223 of file WireContactSolver.h.

References m_violation.

template<typename T >
bool agx::Referenced::is ( ) const
inherited
virtual void agx::WireContactConstraint::postCallback ( Real  )
inlinevirtual

Reimplemented in agx::WireContactDistanceConstraint.

Definition at line 147 of file WireContactSolver.h.

void agx::Referenced::reference ( void *  ptr = nullptr) const
inherited

Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.

This method should be used with care, always balanced with the same number of calls to unreference.

Referenced by agxData::Val< UInt >::Val().

void agx::WireContactConstraint::setBounds ( RangeReal  bounds)
inline
void agx::WireContactConstraint::setCompliance ( Real  compliance)
inline

Definition at line 276 of file WireContactSolver.h.

References m_compliance.

static void agx::Referenced::setDeleteHandler ( DeleteHandler *  handler)
staticprotectedinherited

Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.

void agx::WireContactConstraint::setLambda ( Real  lambda)
inline

Definition at line 220 of file WireContactSolver.h.

void agx::WireContactConstraint::setReachedBounds ( bool  reached)
inline

Definition at line 225 of file WireContactSolver.h.

void agx::Referenced::unreference ( void *  ptr = nullptr) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.

This method should be used with care, always balanced with the same number of calls to reference.

void agx::Referenced::unreference_nodelete ( ) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.

template<typename T >
static bool agx::Referenced::ValidateCast ( const Referenced *  object)
staticinherited

Member Data Documentation

Real agx::WireContactConstraint::m_damping
protected
bool agx::WireContactConstraint::m_hasBounds
protected
RealVector agx::WireContactConstraint::m_jacobianVector
protected
Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

RealVector agx::WireContactConstraint::m_normalForces
protected

Definition at line 284 of file WireContactSolver.h.

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

WireParticleRefVector agx::WireContactConstraint::m_particles
protected

Definition at line 282 of file WireContactSolver.h.

Referenced by addWireParticle(), calculateRHS(), getInvMass(), getMass(), and getParticles().

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.

Real agx::WireContactConstraint::m_rhs
protected

The documentation for this class was generated from the following file: