|
AGXDynamics
2.31.1.0
|
The CableDamage class is used to estimate damage caused to a cable during a simulation. More...
#include <CableDamage.h>
Inheritance diagram for agxCable::CableDamage:Public Member Functions | |
| CableDamage () | |
| Create a new CableDamage instance. More... | |
| 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 |
| const agxCable::SegmentDamage & | getAccumulatedDamageAt (size_t index) const |
| Provides access to the accumulated damage estimation for a particular cable segment. More... | |
| agxCable::SegmentDamagePtrVector | getAccumulatedDamagePtrs () const |
| const agxCable::SegmentDamageVector & | getAccumulatedDamages () const |
| Provides access to the per-segment damage estimates that has been accumulated over the simulation so far. More... | |
| agx::Real | getBendDeformationWeight () const |
| agx::Real | getBendRateWeight () |
| agx::Real | getBendTensionWeight () |
| agx::Real | getBendThreshold () |
| agxCable::Cable * | getCable () |
| Get the cable that this CableDamage is estimating damage for. More... | |
| const agxCable::Cable * | getCable () const |
| Get the cable that this CableDamage is estimating damage for. More... | |
| const char * | getClassName () const override |
| const agxCable::SegmentDamage & | getCurrentDamageAt (size_t index) const |
| Provides access to the last time step's damage contribution for a particular cable segment. More... | |
| agxCable::SegmentDamagePtrVector | getCurrentDamagePtrs () const |
| const agxCable::SegmentDamageVector & | getCurrentDamages () const |
| Provides access to the per-segment damage estimate contributions that the last time step produced. More... | |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::Real | getFrictionForceWeight () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| agxSDK::LinkedStructure * | getLinkedStructure () const |
| const agx::Name & | getName () const |
| agx::Real | getNormalForceWeight () |
| size_t | getNumDamages () const |
| May return zero until the cable for which damage is estimated has been fully initialized. More... | |
| int | getReferenceCount () const |
| agxSDK::Simulation * | getSimulation () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agx::Real | getStretchDeformationWeight () const |
| agx::Real | getStretchRateWeight () |
| agx::Real | getStretchTensionWeight () |
| agx::Real | getStretchThreshold () |
| agx::Real | getThreshold (agxCable::Direction direction) const |
| agx::Real | getTwistDeformationWeight () const |
| agx::Real | getTwistRateWeight () |
| agx::Real | getTwistTensionWeight () |
| agx::Real | getTwistThreshold () |
| agx::Uuid | getUuid () const |
| agx::Real | getWeight (agxCable::DamageTypes::DamageType type) const |
| Get the weight, or scaling, used for the given damage source when summing it with all the other damage sources to form a total damage estimate. More... | |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isFinished () const |
| 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... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| void | setBendDeformationWeight (agx::Real weight) |
| Set the weight to use for damage caused by bend deformation. More... | |
| void | setBendRateWeight (agx::Real weight) |
| Set the weight to use for damage caused by bend rate. More... | |
| void | setBendTensionWeight (agx::Real weight) |
| Set the weight to use for damage caused by bend tension. More... | |
| void | setBendThreshold (agx::Real threshold) |
| Set the bend deformation threshold that must be surpassed before the bend deformation begin to contribute to the damage estimation. More... | |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. More... | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More... | |
| void | setFrictionForceWeight (agx::Real weight) |
| Set the weight to use for damage caused by friction forces from contacts. More... | |
| void | setName (const agx::Name &name) |
| Assign new name to this component. More... | |
| void | setNormalForceWeight (agx::Real weight) |
| Set the weight to use for damage caused by normal forces from contacts. More... | |
| void | setStretchDeformationWeight (agx::Real weight) |
| Set the weight to use for damage caused by stretch deformation. More... | |
| void | setStretchRateWeight (agx::Real weight) |
| Set the weight to use for damage caused by stretch rate. More... | |
| void | setStretchTensionWeight (agx::Real weight) |
| Set the weight to use for damage caused by stretch tension. More... | |
| void | setStretchThreshold (agx::Real threshold) |
| Set the stretch deformation threshold that must be surpassed before the stretch deformation begin to contribute to the damage estimation. More... | |
| void | setThreshold (agxCable::Direction direction, agx::Real threshold) |
| Set the deformation threshold for the given direction that must be surpassed before the deformation begin to contribute to the damage estimation. More... | |
| void | setTwistDeformationWeight (agx::Real weight) |
| Set the weight to use for damage caused by twist deformation. More... | |
| void | setTwistRateWeight (agx::Real weight) |
| Set the weight to use for damage caused by twist rate. More... | |
| void | setTwistTensionWeight (agx::Real weight) |
| Set the weight to use for damage caused by twist tension. More... | |
| void | setTwistThreshold (agx::Real threshold) |
| Set the twist deformation threshold that must be surpassed before the twist deformation begin to contribute to the damage estimation. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| void | setWeight (agxCable::DamageTypes::DamageType type, agx::Real weight) |
| Set the weight, or scaling, to use for the given damage source when summing it with all the other damage sources to form a total damage estimate. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| 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 | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agxCable::CableDamage * | getCableDamage (agxCable::Cable *cable) |
| Find the CableDamage instances that estimate damage for the given cable. More... | |
| static const char * | getConstructClassId () |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| virtual | ~CableDamage () |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| void | generateUuid () |
| virtual void | onAddNotification (agxSDK::LinkedStructure *linkedStructure) override |
| Called when this component is added to a linked structure. More... | |
| virtual void | onAddNotification (agxSDK::Simulation *simulation) override |
| Called when addNotification is executed when this linked structure is added to the simulation. More... | |
| virtual void | onLastStep () |
| Called on simulation last step event - after user lastStep. More... | |
| virtual void | onPostStep () override |
| Called on simulation post step event - after user postStep. More... | |
| virtual void | onPreCollideStep () |
| Called on simulation pre-collide step event - after user preCollide. More... | |
| virtual void | onPreStep () override |
| Called on simulation pre step event - after user preStep. More... | |
| virtual void | onRemoveNotification (agxSDK::Simulation *simulation) |
| Called when removeNotification is executed when this linked structure is removed from the simulation. More... | |
| virtual void | onRemoveNotification (agxSDK::LinkedStructure *linkedStructure) |
| Called when this component is removed from a linked structure. More... | |
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 | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
The CableDamage class is used to estimate damage caused to a cable during a simulation.
Damage is estimated from a number of damage sources and weighted together to form a total.
The damage sources are categorized in two ways: dimension and cause. The dimension is one of the regular cable dimensions: bend, twist, or stretch. The cause is the state of the cable that is producing the damage and is either tension, deformation or deformation rate. There is also contacts, which are treated separately.
Given three dimensions; bend, twist, and stretch, and three sources; tension, deformation and deformation rate, we get a total of nine damage types, plus two contact types normal force and friction force. They are enumerated in agxCable::DamageTypes.
The damage model incorporates the notion of "safe deformations". These are deformation thresholds below which no damage is being produced due to deformation or deformation rate. Tension and contact damage still apply.
Damage is estimated per cable segment.
Definition at line 57 of file CableDamage.h.
| agxCable::CableDamage::CableDamage | ( | ) |
Create a new CableDamage instance.
The CableDamage is activated when added to a Cable.
|
protectedvirtual |
|
protectedinherited |
|
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().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
inlinestatic |
Definition at line 393 of file CableDamage.h.
|
inlinestatic |
Definition at line 393 of file CableDamage.h.
|
protectedinherited |
|
protectedinherited |
| const agxCable::SegmentDamage& agxCable::CableDamage::getAccumulatedDamageAt | ( | size_t | index | ) | const |
Provides access to the accumulated damage estimation for a particular cable segment.
index must be less than the value returned by getNumDamages.
| index | - The index of the SegmentDamage instance to access. |
| agxCable::SegmentDamagePtrVector agxCable::CableDamage::getAccumulatedDamagePtrs | ( | ) | const |
| const agxCable::SegmentDamageVector& agxCable::CableDamage::getAccumulatedDamages | ( | ) | const |
Provides access to the per-segment damage estimates that has been accumulated over the simulation so far.
| agx::Real agxCable::CableDamage::getBendDeformationWeight | ( | ) | const |
| agx::Real agxCable::CableDamage::getBendRateWeight | ( | ) |
| agx::Real agxCable::CableDamage::getBendTensionWeight | ( | ) |
| agx::Real agxCable::CableDamage::getBendThreshold | ( | ) |
| agxCable::Cable* agxCable::CableDamage::getCable | ( | ) |
Get the cable that this CableDamage is estimating damage for.
Will return nullptr if this CableDamage hasn't been added to a cable yet.
| const agxCable::Cable* agxCable::CableDamage::getCable | ( | ) | const |
Get the cable that this CableDamage is estimating damage for.
Will return nullptr if this CableDamage hasn't been added to a cable yet.
|
static |
Find the CableDamage instances that estimate damage for the given cable.
| cable | - The cable for which a CableDamage instance should be found. |
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 393 of file CableDamage.h.
|
inlinestatic |
Definition at line 393 of file CableDamage.h.
| const agxCable::SegmentDamage& agxCable::CableDamage::getCurrentDamageAt | ( | size_t | index | ) | const |
Provides access to the last time step's damage contribution for a particular cable segment.
index must be less than the value returned by getNumDamages.
| index | - The index of the SegmentDamage instance to access. |
| agxCable::SegmentDamagePtrVector agxCable::CableDamage::getCurrentDamagePtrs | ( | ) | const |
| const agxCable::SegmentDamageVector& agxCable::CableDamage::getCurrentDamages | ( | ) | const |
Provides access to the per-segment damage estimate contributions that the last time step produced.
|
staticprotectedinherited |
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
| agx::Real agxCable::CableDamage::getFrictionForceWeight | ( | ) |
|
inherited |
This index is given at creation of this object.
It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.
Definition at line 247 of file Serializable.h.
|
inherited |
|
inherited |
| agx::Real agxCable::CableDamage::getNormalForceWeight | ( | ) |
| size_t agxCable::CableDamage::getNumDamages | ( | ) | const |
May return zero until the cable for which damage is estimated has been fully initialized.
|
inherited |
|
inherited |
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 393 of file CableDamage.h.
| agx::Real agxCable::CableDamage::getStretchDeformationWeight | ( | ) | const |
| agx::Real agxCable::CableDamage::getStretchRateWeight | ( | ) |
| agx::Real agxCable::CableDamage::getStretchTensionWeight | ( | ) |
| agx::Real agxCable::CableDamage::getStretchThreshold | ( | ) |
| agx::Real agxCable::CableDamage::getThreshold | ( | agxCable::Direction | direction | ) | const |
| direction | - Direction to get deformation threshold for. |
| agx::Real agxCable::CableDamage::getTwistDeformationWeight | ( | ) | const |
| agx::Real agxCable::CableDamage::getTwistRateWeight | ( | ) |
| agx::Real agxCable::CableDamage::getTwistTensionWeight | ( | ) |
| agx::Real agxCable::CableDamage::getTwistThreshold | ( | ) |
|
inherited |
Definition at line 268 of file Serializable.h.
Referenced by agxSDK::UuidHashCollisionFilter::match().
| agx::Real agxCable::CableDamage::getWeight | ( | agxCable::DamageTypes::DamageType | type | ) | const |
Get the weight, or scaling, used for the given damage source when summing it with all the other damage sources to form a total damage estimate.
| type | - The damage type to get the weight for. |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
|
inherited |
Definition at line 252 of file Serializable.h.
References AGX_FORCE_INLINE.
|
overrideprotectedvirtual |
Called when this component is added to a linked structure.
Reimplemented from agxSDK::LinkedStructureComponent.
|
overrideprotectedvirtual |
Called when addNotification is executed when this linked structure is added to the simulation.
Reimplemented from agxSDK::LinkedStructureComponent.
|
protectedvirtualinherited |
Called on simulation last step event - after user lastStep.
|
overrideprotectedvirtual |
Called on simulation post step event - after user postStep.
Reimplemented from agxSDK::LinkedStructureComponent.
|
protectedvirtualinherited |
Called on simulation pre-collide step event - after user preCollide.
|
overrideprotectedvirtual |
Called on simulation pre step event - after user preStep.
Reimplemented from agxSDK::LinkedStructureComponent.
|
protectedvirtualinherited |
Called when removeNotification is executed when this linked structure is removed from the simulation.
|
protectedvirtualinherited |
Called when this component is removed from a linked structure.
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.
|
overridevirtual |
Reimplemented from agxSDK::LinkedStructureComponent.
Set the weight to use for damage caused by bend deformation.
| weight | - The new weight for bend deformation damage estimation. |
Set the weight to use for damage caused by bend rate.
Bend rate is a measure of how fast the cable is being bent, measured as the change in curvature per unit time.
| weight | - The new weight for bend rate damage estimation. |
Set the weight to use for damage caused by bend tension.
| weight | - The new weight for bend tension damage estimation. |
Set the bend deformation threshold that must be surpassed before the bend deformation begin to contribute to the damage estimation.
The threshold is measured in radians per unit length.
| threshold | - The minimum bend deformation for bend damage to be applied. |
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
|
inherited |
Set to false to disable serialization of this object.
It will just be ignored during serialization (writing). It is still possible to restore TO this object.
|
staticinherited |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
|
inherited |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
Set the weight to use for damage caused by friction forces from contacts.
| weight | - The new weight for friction force damage estimation. |
Assign new name to this component.
The name can be used to find this component from the linked structure this component is part of.
| name | - new name of this component |
Set the weight to use for damage caused by normal forces from contacts.
| weight | - The new weight for normal force damage estimation. |
Set the weight to use for damage caused by stretch deformation.
| weight | - The new weight for stretch deformation damage estimation. |
Set the weight to use for damage caused by stretch rate.
Stretch rate is a measure of how fast the cable is being stretched, measured in lengths per unit length per unit time.
| weight | - The new weight for stretch rate damage estimation. |
Set the weight to use for damage caused by stretch tension.
| weight | - The new weight for stretch tension damage estimation. |
Set the stretch deformation threshold that must be surpassed before the stretch deformation begin to contribute to the damage estimation.
The threshold is given in length per unit length.
| threshold | - The minimum stretch deformation for stretch damage to be applied. |
| void agxCable::CableDamage::setThreshold | ( | agxCable::Direction | direction, |
| agx::Real | threshold | ||
| ) |
Set the deformation threshold for the given direction that must be surpassed before the deformation begin to contribute to the damage estimation.
The unit of the threshold depends on the direction. See setStretchThreshold, setBendThreshold, and setTwistThreshold.
| direction | - The direction to set deformation threshold for. |
| threshold | - The new deformation threshold. |
Set the weight to use for damage caused by twist deformation.
| weight | - The new weight for twist deformation damage estimation. |
Set the weight to use for damage caused by twist rate.
Twist rate is a measure of how fast the cable is being twisted, measured in radians per unit length per unit time.
| weight | - The new weight for twist rate damage estimation. |
Set the weight to use for damage caused by twist tension.
| weight | - The new weight for twist tension damage estimation. |
Set the twist deformation threshold that must be surpassed before the twist deformation begin to contribute to the damage estimation.
The twist threshold is measured in radians per unit length.
| threshold | - The minimum twist deformation for twist damage to be applied. |
Explicitly set a Uuid on a serializable object.
Use this method with great care, as it can result in non-unique identifiers in the system!
| void agxCable::CableDamage::setWeight | ( | agxCable::DamageTypes::DamageType | type, |
| agx::Real | weight | ||
| ) |
Set the weight, or scaling, to use for the given damage source when summing it with all the other damage sources to form a total damage estimate.
| type | - The damage type to set the weight for. |
| weight | - The new weight. |
|
overridevirtual |
Reimplemented from agxSDK::LinkedStructureComponent.
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().
|
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.
|
staticinherited |
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.