chrono::ChLinkMask Class Reference
Description
Mask structure for N scalar constraint equations between two bodies.
#include <ChLinkMask.h>
Inheritance diagram for chrono::ChLinkMask:
Public Member Functions | |
ChLinkMask () | |
Build a link mask with no constraints. | |
ChLinkMask (unsigned int mnconstr) | |
Build a link mask with a default array of mnconstr constraints of class ChConstraintTwoBodies(). | |
ChLinkMask (const ChLinkMask &source) | |
Copy constructor. | |
virtual | ~ChLinkMask () |
Destructor. | |
ChLinkMask & | operator= (const ChLinkMask &other) |
Assignment operator. | |
void | SetTwoBodiesVariables (ChVariables *var1, ChVariables *var2) |
Set references to variables of two connected bodies to all constraints at once, therefore also sets all the constraints as active. | |
ChConstraintTwoBodies & | GetConstraint (unsigned int i) |
Obtain the reference to the i-th scalar constraint data in the collection link mask. | |
ChConstraintTwoBodies * | GetActiveConstraint (unsigned int mnum) |
Get the i-th active scalar constraint (inactive constraints won't be considered) | |
void | AddConstraint (ChConstraintTwoBodies *aconstr) |
Add a ChConstraintTwoBodies to mask (NOTE: later, the constraint will be automatically deleted when the mask will be deleted) | |
bool | IsEqual (ChLinkMask &mask2) |
To compare two masks, return true if equal. | |
unsigned int | GetNumConstraints () |
Get the number of constraints. | |
void | SetNumConstraints (unsigned int newnconstr) |
Set a new number of constraints. More... | |
unsigned int | GetNumConstraintsActive () |
Get the number of active constraints. | |
unsigned int | GetNumConstraintsBilateralActive () |
Get the number of active bilateral constraints. | |
unsigned int | GetNumConstraintsUnilateralActive () |
Get the number of active unilateral constraints. | |
unsigned int | SetAllDisabled (bool mdis) |
If SetAllDisabled(true), all the constraints are temporarily turned off (inactive) at once, because marked as 'disabled'. More... | |
unsigned int | SetAllBroken (bool mdis) |
If SetAllBroken(true), all the constraints are temporarily turned off (broken) at once, because marked as 'broken'. More... | |
virtual void | ArchiveOut (ChArchiveOut &archive_out) |
Method to allow serialization of transient data to archives. | |
virtual void | ArchiveIn (ChArchiveIn &archive_in) |
Method to allow de-serialization of transient data from archives. | |
Protected Attributes | |
std::vector< ChConstraintTwoBodies * > | constraints |
array of pointers to 'n' scalar constraints | |
unsigned int | nconstr |
number of scalar constraint equations. | |
Member Function Documentation
◆ SetAllBroken()
unsigned int chrono::ChLinkMask::SetAllBroken | ( | bool | mdis | ) |
If SetAllBroken(true), all the constraints are temporarily turned off (broken) at once, because marked as 'broken'.
Return n.of changed.
◆ SetAllDisabled()
unsigned int chrono::ChLinkMask::SetAllDisabled | ( | bool | mdis | ) |
If SetAllDisabled(true), all the constraints are temporarily turned off (inactive) at once, because marked as 'disabled'.
Return n.of changed
◆ SetNumConstraints()
void chrono::ChLinkMask::SetNumConstraints | ( | unsigned int | newnconstr | ) |
Set a new number of constraints.
If newnconstr differs from current size a reallocation will be triggered.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/physics/ChLinkMask.h
- /builds/uwsbel/chrono/src/chrono/physics/ChLinkMask.cpp