AGXDynamics  2.31.1.0
agxModel::Deformable1DBulkProperties Class Reference

Class containing and updating material properties of a Deformable1D object. More...

#include <Deformable1DBulkProperties.h>

+ Inheritance diagram for agxModel::Deformable1DBulkProperties:

Public Types

enum  Direction {
  SHEAR_X = 0, SHEAR_Y, TENSILE, LATERAL,
  VERTICAL, TORSIONAL, ALL_DIRECTIONS
}
 Directions in each constraint. More...
 

Public Member Functions

 Deformable1DBulkProperties ()
 Default constructor. 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
 
void clearDirtyFlag ()
 Clear the dirty flag. More...
 
agx::Real getBreakPoint (agxModel::Deformable1DBulkProperties::Direction direction) const
 
const char * getClassName () const override
 
agx::Real getDamping (agxModel::Deformable1DBulkProperties::Direction direction) const
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
agx::Real getPoissonsRatio (agxModel::Deformable1DBulkProperties::Direction direction) const
 
int getReferenceCount () const
 
agxStream::StorageAgent * getStorageAgent () const override
 
agx::Uuid getUuid () const
 
agx::Real getYieldPoint (agxModel::Deformable1DBulkProperties::Direction direction) const
 
agx::Real getYoungsModulus (agxModel::Deformable1DBulkProperties::Direction direction) const
 
template<typename T >
bool is () const
 Subclass test. More...
 
agx::Bool isDirty () const
 Check if the bulk parameters are flagged as dirty and have to be read by Deformable1D constraints. 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
 
virtual void restoreLightData (agxStream::StorageStream &str) override
 Restore structural independent data from stream. More...
 
void setBreakPoint (agx::Real breakPoint, agxModel::Deformable1DBulkProperties::Direction direction)
 Assign break point to a given direction. More...
 
void setDamping (agx::Real damping, agxModel::Deformable1DBulkProperties::Direction direction)
 Assign SPOOK damping along given direction to the constraints linking the segments of the Deformable1D. 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 setPoissonsRatio (agx::Real poissonsRatio, agxModel::Deformable1DBulkProperties::Direction direction)
 Assign Poisson's Ratio to a given direction. More...
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object. More...
 
void setYieldPoint (agx::Real yieldPoint, agxModel::Deformable1DBulkProperties::Direction direction)
 Assign yield point to a given direction. More...
 
void setYoungsModulus (agx::Real youngsModulus, agxModel::Deformable1DBulkProperties::Direction direction)
 Assign Young's Modulus to a given direction. More...
 
virtual void store (agxStream::OutputArchive &out) const override
 
virtual void storeLightData (agxStream::StorageStream &str) const override
 Store structural independent data to stream. More...
 
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...
 
virtual void updateBulkProperties (const agxModel::Deformable1D *d1d) const
 Updates the bulk properties of the whole Deformable1D object, ignoring dirty flag. More...
 
virtual void updateBulkProperties (agxModel::Deformable1DNode *node, const agxModel::Deformable1D *d1d) const
 Updates the bulk properties of a given node. More...
 
virtual void updateBulkProperties (const agxModel::Deformable1DNode *prev, agx::Constraint *constraint, const agxModel::Deformable1DNode *curr, const agxModel::Deformable1D *d1d) const
 Updates the bulk properties given node before -> constraint -> node after where "node after" is curr (current node), the target node for the update, i.e., the one assumed to be carrying the constraint. More...
 

Static Public Member Functions

static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
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 ~Deformable1DBulkProperties ()
 Reference counted object, protected destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
void generateUuid ()
 
void setDefaultValues ()
 Assigns default values to all parameters. 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

agx::Real m_breakPoint [ALL_DIRECTIONS]
 
agx::Bool m_dirty
 
Mutex m_mutex
 
ObserverContainer m_observers
 
agx::Real m_poissonsRatio [ALL_DIRECTIONS]
 
AtomicValue m_refCount
 
agx::Real m_spookDamping [ALL_DIRECTIONS]
 
agx::Real m_yieldPoint [ALL_DIRECTIONS]
 
agx::Real m_youngsModulus [ALL_DIRECTIONS]
 

Detailed Description

Class containing and updating material properties of a Deformable1D object.

Definition at line 39 of file Deformable1DBulkProperties.h.

Member Enumeration Documentation

◆ Direction

Directions in each constraint.

The constraint axis is assumed to be along the z-axis.

Enumerator
SHEAR_X 

Along x axis.

SHEAR_Y 

Along y axis.

TENSILE 

Along z axis.

LATERAL 

About x axis.

VERTICAL 

About y axis.

TORSIONAL 

About z axis.

ALL_DIRECTIONS 

Definition at line 46 of file Deformable1DBulkProperties.h.

Constructor & Destructor Documentation

◆ Deformable1DBulkProperties()

agxModel::Deformable1DBulkProperties::Deformable1DBulkProperties ( )

Default constructor.

◆ ~Deformable1DBulkProperties()

virtual agxModel::Deformable1DBulkProperties::~Deformable1DBulkProperties ( )
protectedvirtual

Reference counted object, protected destructor.

Member Function Documentation

◆ 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

◆ clearDirtyFlag()

void agxModel::Deformable1DBulkProperties::clearDirtyFlag ( )

Clear the dirty flag.

This bulk material will not be used to update any Deformable1D constraint parameters until made dirty again.

◆ create() [1/2]

static agxStream::Serializable* agxModel::Deformable1DBulkProperties::create ( )
inlinestatic

Definition at line 177 of file Deformable1DBulkProperties.h.

◆ create() [2/2]

static agxStream::Serializable* agxModel::Deformable1DBulkProperties::create ( agxStream::InputArchive &  )
inlinestatic

Definition at line 177 of file Deformable1DBulkProperties.h.

◆ deleteUsingDeleteHandler()

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

◆ generateUuid()

void agxStream::Serializable::generateUuid ( )
protectedinherited

◆ getBreakPoint()

agx::Real agxModel::Deformable1DBulkProperties::getBreakPoint ( agxModel::Deformable1DBulkProperties::Direction  direction) const
Parameters
direction- direction
Returns
current value of the break point for a given direction

◆ getClassName()

const char* agxModel::Deformable1DBulkProperties::getClassName ( ) const
inlineoverridevirtual
Returns
the class name of this class.

Reimplemented from agxStream::Serializable.

Definition at line 177 of file Deformable1DBulkProperties.h.

◆ getConstructClassId()

static const char* agxModel::Deformable1DBulkProperties::getConstructClassId ( )
inlinestatic

Definition at line 177 of file Deformable1DBulkProperties.h.

◆ getDamping()

agx::Real agxModel::Deformable1DBulkProperties::getDamping ( agxModel::Deformable1DBulkProperties::Direction  direction) const
Returns
The SPOOK damping in the given direction.

◆ getDeleteHandler()

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

◆ getEnableSerialization()

bool agxStream::Serializable::getEnableSerialization ( ) const
inherited
Returns
true if serialization is enabled for this object

Definition at line 273 of file Serializable.h.

◆ getEnableUuidGeneration()

bool agxStream::Serializable::getEnableUuidGeneration ( )
inherited
Returns
true if Uuid:s should be generated for each new Serializable object

◆ getIndex()

agx::UInt32 agxStream::Serializable::getIndex ( ) const
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.

Returns
an instance index of this object. This is unique for the lifetime of this library instance.

Definition at line 247 of file Serializable.h.

◆ getPoissonsRatio()

agx::Real agxModel::Deformable1DBulkProperties::getPoissonsRatio ( agxModel::Deformable1DBulkProperties::Direction  direction) const
Parameters
direction- direction
Returns
current value of Poisson's Ratio for a given direction

◆ getReferenceCount()

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

◆ getStorageAgent()

agxStream::StorageAgent* agxModel::Deformable1DBulkProperties::getStorageAgent ( ) const
inlineoverridevirtual
Returns
the storage agent

Implements agxStream::Serializable.

Definition at line 177 of file Deformable1DBulkProperties.h.

◆ getUuid()

agx::Uuid agxStream::Serializable::getUuid ( ) const
inherited
Returns
a unique id for this instance.

Definition at line 268 of file Serializable.h.

Referenced by agxSDK::UuidHashCollisionFilter::match().

◆ getYieldPoint()

agx::Real agxModel::Deformable1DBulkProperties::getYieldPoint ( agxModel::Deformable1DBulkProperties::Direction  direction) const
Parameters
direction- direction
Returns
current value of the yield point for a given direction

◆ getYoungsModulus()

agx::Real agxModel::Deformable1DBulkProperties::getYoungsModulus ( agxModel::Deformable1DBulkProperties::Direction  direction) const
Parameters
direction- direction
Returns
current value of Young's Modulus for a given direction

◆ is()

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

◆ isDirty()

agx::Bool agxModel::Deformable1DBulkProperties::isDirty ( ) const

Check if the bulk parameters are flagged as dirty and have to be read by Deformable1D constraints.

Returns
true if dirty and the bulk properties have to be updated

◆ isFinished()

bool agxStream::Serializable::isFinished ( ) const
inherited
Returns
true if this class is restored correctly and should not be deleted during destruction of an Archive.

Definition at line 252 of file Serializable.h.

References AGX_FORCE_INLINE.

◆ 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.

◆ restore()

virtual void agxModel::Deformable1DBulkProperties::restore ( agxStream::InputArchive &  in)
overridevirtual

◆ restoreLightData()

virtual void agxModel::Deformable1DBulkProperties::restoreLightData ( agxStream::StorageStream &  str)
overridevirtual

Restore structural independent data from stream.

◆ setBreakPoint()

void agxModel::Deformable1DBulkProperties::setBreakPoint ( agx::Real  breakPoint,
agxModel::Deformable1DBulkProperties::Direction  direction 
)

Assign break point to a given direction.

If direction is ALL_DIRECTIONS breakPoint will be assigned to all directions.

Parameters
breakPoint- new value of the break point
direction- direction

◆ setDamping()

void agxModel::Deformable1DBulkProperties::setDamping ( agx::Real  damping,
agxModel::Deformable1DBulkProperties::Direction  direction 
)

Assign SPOOK damping along given direction to the constraints linking the segments of the Deformable1D.

If direction is ALL_DIRECTIONS then spookDamping will be assigned to all directions.

Parameters
damping- The new value to use for SPOOK damping.
direction- direction

◆ setDefaultValues()

void agxModel::Deformable1DBulkProperties::setDefaultValues ( )
protected

Assigns default values to all parameters.

◆ 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.

◆ setEnableSerialization()

void agxStream::Serializable::setEnableSerialization ( bool  flag)
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.

◆ setEnableUuidGeneration()

static void agxStream::Serializable::setEnableUuidGeneration ( bool  flag)
staticinherited

Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.

◆ setFinished()

void agxStream::Serializable::setFinished ( )
inherited

Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.

◆ setPoissonsRatio()

void agxModel::Deformable1DBulkProperties::setPoissonsRatio ( agx::Real  poissonsRatio,
agxModel::Deformable1DBulkProperties::Direction  direction 
)

Assign Poisson's Ratio to a given direction.

If direction is ALL_DIRECTIONS poissonsRatio will be assigned to all directions.

Parameters
poissonsRatio- new value of Poisson's Ratio
direction- direction

◆ setUuid()

void agxStream::Serializable::setUuid ( const agx::Uuid &  uuid)
inherited

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!

◆ setYieldPoint()

void agxModel::Deformable1DBulkProperties::setYieldPoint ( agx::Real  yieldPoint,
agxModel::Deformable1DBulkProperties::Direction  direction 
)

Assign yield point to a given direction.

If direction is ALL_DIRECTIONS yieldPoint will be assigned to all directions.

Parameters
yieldPoint- new value of the yield point
direction- direction

◆ setYoungsModulus()

void agxModel::Deformable1DBulkProperties::setYoungsModulus ( agx::Real  youngsModulus,
agxModel::Deformable1DBulkProperties::Direction  direction 
)

Assign Young's Modulus to a given direction.

If direction is ALL_DIRECTIONS youngsModulus will be assigned to all directions.

Parameters
youngsModulus- new value of Young's Modulus
direction- direction

◆ store()

virtual void agxModel::Deformable1DBulkProperties::store ( agxStream::OutputArchive &  out) const
overridevirtual

◆ storeLightData()

virtual void agxModel::Deformable1DBulkProperties::storeLightData ( agxStream::StorageStream &  str) const
overridevirtual

Store structural independent data to stream.

◆ 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.

◆ updateBulkProperties() [1/3]

virtual void agxModel::Deformable1DBulkProperties::updateBulkProperties ( const agxModel::Deformable1D *  d1d) const
virtual

Updates the bulk properties of the whole Deformable1D object, ignoring dirty flag.

After calling this method this object is no longer dirty.

Parameters
d1d- the Deformable1D object

◆ updateBulkProperties() [2/3]

virtual void agxModel::Deformable1DBulkProperties::updateBulkProperties ( agxModel::Deformable1DNode *  node,
const agxModel::Deformable1D *  d1d 
) const
virtual

Updates the bulk properties of a given node.

The constraint between node and the previous node will be updated.

Parameters
node- node to update (constraint between previous node and node)
d1dthe Deformable1D object

◆ updateBulkProperties() [3/3]

virtual void agxModel::Deformable1DBulkProperties::updateBulkProperties ( const agxModel::Deformable1DNode *  prev,
agx::Constraint *  constraint,
const agxModel::Deformable1DNode *  curr,
const agxModel::Deformable1D *  d1d 
) const
virtual

Updates the bulk properties given node before -> constraint -> node after where "node after" is curr (current node), the target node for the update, i.e., the one assumed to be carrying the constraint.

Parameters
prev- node before curr
constraint- constraint to assign properties to
curr- current node
d1d- the Deformable1D object

◆ ValidateCast()

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

Member Data Documentation

◆ m_breakPoint

agx::Real agxModel::Deformable1DBulkProperties::m_breakPoint[ALL_DIRECTIONS]
protected

Definition at line 204 of file Deformable1DBulkProperties.h.

◆ m_dirty

agx::Bool agxModel::Deformable1DBulkProperties::m_dirty
mutableprotected

Definition at line 206 of file Deformable1DBulkProperties.h.

◆ m_mutex

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

◆ m_observers

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

◆ m_poissonsRatio

agx::Real agxModel::Deformable1DBulkProperties::m_poissonsRatio[ALL_DIRECTIONS]
protected

Definition at line 202 of file Deformable1DBulkProperties.h.

◆ m_refCount

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.

◆ m_spookDamping

agx::Real agxModel::Deformable1DBulkProperties::m_spookDamping[ALL_DIRECTIONS]
protected

Definition at line 205 of file Deformable1DBulkProperties.h.

◆ m_yieldPoint

agx::Real agxModel::Deformable1DBulkProperties::m_yieldPoint[ALL_DIRECTIONS]
protected

Definition at line 203 of file Deformable1DBulkProperties.h.

◆ m_youngsModulus

agx::Real agxModel::Deformable1DBulkProperties::m_youngsModulus[ALL_DIRECTIONS]
protected

Definition at line 201 of file Deformable1DBulkProperties.h.


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