chrono::ChGenericConstraint_Chf_VertDistance Class Reference

Description

Algebraic constraint on ChFunctions.

Impose segment vertical separation on Y axis, between two handles

#include <ChGenericConstraint.h>

Inheritance diagram for chrono::ChGenericConstraint_Chf_VertDistance:
Collaboration diagram for chrono::ChGenericConstraint_Chf_VertDistance:

Public Member Functions

 ChGenericConstraint_Chf_VertDistance (ChFunction *mRootFunct, char *mTreeIDs, int mhA, int mhB)
 
double GetDistance ()
 
void SetDistance (double md)
 
int GetHandleA ()
 
int GetHandleB ()
 
void SetHandleA (int mh)
 
void SetHandleB (int mh)
 
virtual bool Update () override
 —TO IMPLEMENT– w.overloading This MUST be overloaded by child classes. More...
 
- Public Member Functions inherited from chrono::ChGenericConstraint_Chf
 ChGenericConstraint_Chf (ChFunction *mRootFunct, char *mTreeIDs)
 
ChFunctionGet_root_function ()
 
ChFunctionGet_target_function ()
 
ChRefFunctionSegment * Get_target_reference ()
 
virtual bool RestoreReferences (ChFunction *mroot)
 
- Public Member Functions inherited from chrono::ChGenericConstraint
virtual bool IsValid ()
 Tells if the constraint data is currently valid. More...
 
virtual bool IsDisabled ()
 Tells if the constraint is currently turned on or off by the user.
 
virtual void SetDisabled (bool mon)
 
virtual bool IsActive ()
 Tells if the constraint is currently active, in general, that is tells if it must be included into the system solver or not. More...
 
virtual ChMatrixGet_C ()
 Returns the matrix of residuals (a column vector with Cn elements) If constraint is not active, returns NULL because no equations can be used. More...
 
virtual int Get_Cn ()
 —TO IMPLEMENT– w.overriding Returns the number of equations in this constraints (the size of the C residual vector)
 
virtual int Reset_Cn (int mCn)
 Changes the number of equations in this constraints (reset the size of the C residual vector). More...
 
virtual bool RestoreReferences ()
 —TO IMPLEMENT– w.overloading This may be overloaded by child classes. More...
 

Additional Inherited Members

- Protected Attributes inherited from chrono::ChGenericConstraint_Chf
ChFunctionroot_function
 
ChRefFunctionSegment target_function
 
- Protected Attributes inherited from chrono::ChGenericConstraint
bool valid
 
bool disabled
 
int Cn
 constraints equations in this constraint
 
ChMatrixC
 residual matrix
 

Member Function Documentation

bool chrono::ChGenericConstraint_Chf_VertDistance::Update ( )
overridevirtual

—TO IMPLEMENT– w.overloading This MUST be overloaded by child classes.

It should compute the residuals (vector 'C') of the constraint equations, where C=0 is for satisfied constraints. Should return false if updating was not possible.

Reimplemented from chrono::ChGenericConstraint.