AGXDynamics  2.31.1.0
agx::WireContactSpringConstraint Class Reference

Ad-hoc constraint to find normalforces (it is a distanceconstraint in normaldirection of the contact nodes) More...

#include <WireContactSolver.h>

+ Inheritance diagram for agx::WireContactSpringConstraint:

Public Member Functions

 WireContactSpringConstraint ()
 
 WireContactSpringConstraint (WireParticle *particle, Vec3 edge, Real compliance, size_t beginIndex)
 
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 () override
 
virtual void calculateRHS (Real invTimestep, Real violation)
 
virtual void calculateViolation () override
 
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 ~WireContactSpringConstraint ()
 
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
 
Vec3 m_fixPoint
 
bool m_hasBounds
 
RealVector m_jacobianVector
 
Mutex m_mutex
 
RealVector m_normalForces
 
ObserverContainer m_observers
 
WireParticleRef m_particle
 
WireParticleRefVector m_particles
 
AtomicValue m_refCount
 
Real m_restLength
 
Real m_rhs
 
Real m_violation
 

Detailed Description

Ad-hoc constraint to find normalforces (it is a distanceconstraint in normaldirection of the contact nodes)

Definition at line 390 of file WireContactSolver.h.

Constructor & Destructor Documentation

◆ WireContactSpringConstraint() [1/2]

agx::WireContactSpringConstraint::WireContactSpringConstraint ( )
inline

Definition at line 393 of file WireContactSolver.h.

◆ WireContactSpringConstraint() [2/2]

agx::WireContactSpringConstraint::WireContactSpringConstraint ( WireParticle *  particle,
Vec3  edge,
Real  compliance,
size_t  beginIndex 
)
inline

◆ ~WireContactSpringConstraint()

virtual agx::WireContactSpringConstraint::~WireContactSpringConstraint ( )
inlineprotectedvirtual

Definition at line 418 of file WireContactSolver.h.

Member Function Documentation

◆ addWireParticle()

bool agx::WireContactConstraint::addWireParticle ( WireParticle *  wp,
size_t  contactIndex 
)
inlineinherited

Definition at line 158 of file WireContactSolver.h.

◆ allocateObserverVector()

void agx::Referenced::allocateObserverVector ( ) const
protectedinherited

◆ as() [1/2]

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(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().

◆ as() [2/2]

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

◆ asSafe() [1/2]

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

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

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

◆ asSafe() [2/2]

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

◆ calculateD()

void agx::WireContactConstraint::calculateD ( Real  timestep)
inlineinherited

Definition at line 228 of file WireContactSolver.h.

References agx::WireParticle::getInvMass().

◆ calculateEpsilon()

void agx::WireContactConstraint::calculateEpsilon ( Real  timestep)
inlineinherited

Definition at line 253 of file WireContactSolver.h.

◆ calculateInitialLambda()

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

Definition at line 153 of file WireContactSolver.h.

◆ calculateJacobian()

virtual void agx::WireContactSpringConstraint::calculateJacobian ( )
inlineoverridevirtual

Implements agx::WireContactConstraint.

Definition at line 405 of file WireContactSolver.h.

◆ calculateRHS()

virtual void agx::WireContactConstraint::calculateRHS ( Real  invTimestep,
Real  violation 
)
inlinevirtualinherited

Reimplemented in agx::WireContactFrictionConstraint.

Definition at line 206 of file WireContactSolver.h.

◆ calculateViolation()

virtual void agx::WireContactSpringConstraint::calculateViolation ( )
inlineoverridevirtual

Implements agx::WireContactConstraint.

Reimplemented in agx::WireContactFrictionConstraint.

Definition at line 412 of file WireContactSolver.h.

◆ deleteUsingDeleteHandler()

void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited

◆ getD()

Real agx::WireContactConstraint::getD ( ) const
inlineinherited

Definition at line 222 of file WireContactSolver.h.

◆ getDeleteHandler()

static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.

◆ getEpsilon()

Real agx::WireContactConstraint::getEpsilon ( ) const
inlineinherited

Definition at line 221 of file WireContactSolver.h.

◆ getFirstParticleGlobalIndex()

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

Definition at line 203 of file WireContactSolver.h.

◆ getForceOnParticle()

Real agx::WireContactConstraint::getForceOnParticle ( size_t  globalIndex,
Real  timestep 
)
inlineinherited

Definition at line 258 of file WireContactSolver.h.

◆ getHasBounds()

bool agx::WireContactConstraint::getHasBounds ( )
inlineinherited

Definition at line 266 of file WireContactSolver.h.

◆ getInvMass()

Real agx::WireContactConstraint::getInvMass ( size_t  particleIndex)
inlineinherited

Definition at line 181 of file WireContactSolver.h.

◆ getJacobian()

bool agx::WireContactConstraint::getJacobian ( size_t  particleIndex,
Real &  G 
)
inlineinherited

Definition at line 168 of file WireContactSolver.h.

◆ getLambda()

Real agx::WireContactConstraint::getLambda ( ) const
inlineinherited

Definition at line 219 of file WireContactSolver.h.

◆ getLowerBounds()

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

Definition at line 273 of file WireContactSolver.h.

◆ getMass()

Real agx::WireContactConstraint::getMass ( size_t  particleIndex)
inlineinherited

Definition at line 192 of file WireContactSolver.h.

◆ getParticles()

WireParticleRefVector& agx::WireContactConstraint::getParticles ( )
inlineinherited

Definition at line 252 of file WireContactSolver.h.

◆ getReachedBounds()

bool agx::WireContactConstraint::getReachedBounds ( )
inlineinherited

Definition at line 226 of file WireContactSolver.h.

◆ getReferenceCount()

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

◆ getRHS()

Real agx::WireContactConstraint::getRHS ( ) const
inlineinherited

Definition at line 205 of file WireContactSolver.h.

◆ getUpperBounds()

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

Definition at line 274 of file WireContactSolver.h.

◆ getViolation()

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

Definition at line 223 of file WireContactSolver.h.

◆ is()

template<typename T >
bool agx::Referenced::is ( ) const
inherited

◆ postCallback()

virtual void agx::WireContactConstraint::postCallback ( Real  )
inlinevirtualinherited

Reimplemented in agx::WireContactDistanceConstraint.

Definition at line 147 of file WireContactSolver.h.

◆ reference()

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.

◆ setBounds()

void agx::WireContactConstraint::setBounds ( RangeReal  bounds)
inlineinherited

Definition at line 267 of file WireContactSolver.h.

References agx::Range< T >::lower(), and agx::Range< T >::upper().

◆ setCompliance()

void agx::WireContactConstraint::setCompliance ( Real  compliance)
inlineinherited

Definition at line 276 of file WireContactSolver.h.

◆ setDeleteHandler()

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

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

◆ setLambda()

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

Definition at line 220 of file WireContactSolver.h.

◆ setReachedBounds()

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

Definition at line 225 of file WireContactSolver.h.

◆ unreference()

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.

Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().

◆ unreference_nodelete()

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.

◆ ValidateCast()

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

Member Data Documentation

◆ m_compliance

Real agx::WireContactConstraint::m_compliance
protectedinherited

Definition at line 286 of file WireContactSolver.h.

◆ m_damping

Real agx::WireContactConstraint::m_damping
protectedinherited

Definition at line 290 of file WireContactSolver.h.

◆ m_firstParticleGlobalIndex

size_t agx::WireContactConstraint::m_firstParticleGlobalIndex
protectedinherited

Definition at line 287 of file WireContactSolver.h.

◆ m_fixPoint

Vec3 agx::WireContactSpringConstraint::m_fixPoint
protected

Definition at line 422 of file WireContactSolver.h.

◆ m_hasBounds

bool agx::WireContactConstraint::m_hasBounds
protectedinherited

Definition at line 288 of file WireContactSolver.h.

◆ m_jacobianVector

RealVector agx::WireContactConstraint::m_jacobianVector
protectedinherited

Definition at line 283 of file WireContactSolver.h.

◆ m_mutex

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

◆ m_normalForces

RealVector agx::WireContactConstraint::m_normalForces
protectedinherited

Definition at line 284 of file WireContactSolver.h.

◆ m_observers

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

◆ m_particle

WireParticleRef agx::WireContactSpringConstraint::m_particle
protected

Definition at line 421 of file WireContactSolver.h.

◆ m_particles

WireParticleRefVector agx::WireContactConstraint::m_particles
protectedinherited

Definition at line 282 of file WireContactSolver.h.

◆ m_refCount

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.

◆ m_restLength

Real agx::WireContactSpringConstraint::m_restLength
protected

Definition at line 423 of file WireContactSolver.h.

◆ m_rhs

Real agx::WireContactConstraint::m_rhs
protectedinherited

Definition at line 289 of file WireContactSolver.h.

◆ m_violation

Real agx::WireContactConstraint::m_violation
protectedinherited

Definition at line 285 of file WireContactSolver.h.


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