AGX Dynamics 2.41.3.0
Loading...
Searching...
No Matches
agx::RegularizationParameters Class Reference

All ghost variables have compliance and damping attributes. More...

#include <RegularizationParameters.h>

+ Inheritance diagram for agx::RegularizationParameters:

Public Types

enum  VariableType { HOLONOMIC , NONHOLONOMIC , DEFAULT = HOLONOMIC }
 

Public Member Functions

 RegularizationParameters ()
 Default constructor.
 
 AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agx::RegularizationParameters)
 
agx::Real getCompliance () const
 
agx::Real getDamping () const
 
agx::Real getDiagonalPerturbation (agx::Real h) const
 Internal method used by solvers.
 
int8_t getIndexSetState () const
 Used by the solver.
 
bool isHolonomic () const
 
void setCompliance (agx::Real c)
 Set the value of compliance which is an inverse spring constant with suitable dimensionality given linear or angular variable.
 
void setDamping (agx::Real d)
 Set the damping rate with suitable dimensionality given linear or angular variable.
 
void setDampingHalfLife (agx::Real compliance, agx::Real h, agx::Real numSteps)
 Utility method to set compliance and assign damping given time step used and the number of steps the solver gets to fulfill the constraint variable.
 
void setDampingHalfLife (agx::Real h, agx::Real numSteps)
 Utility method to assign damping given time step used and the number of steps the solver gets to fulfill the constraint variable.
 
void setIndexSetState (int8_t state)
 Used by the solver, should in general not be called by user code.
 
void setType (VariableType type)
 Assign new type.
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings.
 
virtual const char * getClassName () const
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object.
 
virtual StorageAgent * getStorageAgent () const =0
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object.
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object.
 

Static Public Member Functions

static agxStream::Serializablecreate (agxStream::InputArchive &)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
 

Additional Inherited Members

- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor.
 
 Serializable (const Serializable &other)
 Copy constructor.
 
void generateUuid ()
 

Detailed Description

All ghost variables have compliance and damping attributes.

Definition at line 29 of file RegularizationParameters.h.

Member Enumeration Documentation

◆ VariableType

Enumerator
HOLONOMIC 
NONHOLONOMIC 
DEFAULT 

Definition at line 32 of file RegularizationParameters.h.

Constructor & Destructor Documentation

◆ RegularizationParameters()

agx::RegularizationParameters::RegularizationParameters ( )

Default constructor.

Default values: compliance = 1.0E-8, damping = 0.0333, type = HOLONOMIC.

Member Function Documentation

◆ AGXSTREAM_DECLARE_SERIALIZABLE_BASE()

agx::RegularizationParameters::AGXSTREAM_DECLARE_SERIALIZABLE_BASE ( agx::RegularizationParameters  )

◆ create()

static agxStream::Serializable * agx::RegularizationParameters::create ( agxStream::InputArchive )
inlinestatic

Definition at line 113 of file RegularizationParameters.h.

◆ getCompliance()

Real agx::RegularizationParameters::getCompliance ( ) const
Returns
the value of compliance which is an inverse spring constant

Definition at line 138 of file RegularizationParameters.h.

◆ getDamping()

Real agx::RegularizationParameters::getDamping ( ) const
Returns
the damping rate

Definition at line 143 of file RegularizationParameters.h.

◆ getDiagonalPerturbation()

Real agx::RegularizationParameters::getDiagonalPerturbation ( agx::Real  h) const

Internal method used by solvers.

Parameters
h- the time step
Returns
the diagonal perturbation given this variables type (holonomic or non-holonomic)

Definition at line 148 of file RegularizationParameters.h.

References isHolonomic().

◆ getIndexSetState()

int8_t agx::RegularizationParameters::getIndexSetState ( ) const

Used by the solver.

Definition at line 157 of file RegularizationParameters.h.

◆ isHolonomic()

bool agx::RegularizationParameters::isHolonomic ( ) const
Returns
true if this parameter is associated to a holonomic equation - otherwise false

Definition at line 133 of file RegularizationParameters.h.

References HOLONOMIC.

Referenced by getDiagonalPerturbation().

◆ setCompliance()

void agx::RegularizationParameters::setCompliance ( agx::Real  c)

Set the value of compliance which is an inverse spring constant with suitable dimensionality given linear or angular variable.

Default value: 1.0E-8, valid values: >= 0.

Parameters
c- compliance (valid if >= 0)

◆ setDamping()

void agx::RegularizationParameters::setDamping ( agx::Real  d)

Set the damping rate with suitable dimensionality given linear or angular variable.

Damping is used for holonomic variables only, and is a measure of the time the constraint variable have to fulfill the constraint definition (violation = 0). Default value: 0.0333, valid values: >= 0 (recommended >= time step).

Note
It is not recommended to set this value below the size if the integration step (time step). Damping < time step basically means that the solver has less than one time step to fulfill the constraint.

◆ setDampingHalfLife() [1/2]

void agx::RegularizationParameters::setDampingHalfLife ( agx::Real  compliance,
agx::Real  h,
agx::Real  numSteps 
)

Utility method to set compliance and assign damping given time step used and the number of steps the solver gets to fulfill the constraint variable.

See also
setDamping
Parameters
compliance- compliance (valid if >= 0)
h- the time step
numSteps- number of steps (valid if > 0, recommended >= 1)

◆ setDampingHalfLife() [2/2]

void agx::RegularizationParameters::setDampingHalfLife ( agx::Real  h,
agx::Real  numSteps 
)

Utility method to assign damping given time step used and the number of steps the solver gets to fulfill the constraint variable.

See also
setDamping
Parameters
h- the time step
numSteps- number of steps

◆ setIndexSetState()

void agx::RegularizationParameters::setIndexSetState ( int8_t  state)

Used by the solver, should in general not be called by user code.

◆ setType()

void agx::RegularizationParameters::setType ( VariableType  type)

Assign new type.

This affects return value of getDiagonalPerturbation.

Parameters
type- new type

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