Description
Class for a node, that has some degrees of freedom.
It is like a lightweight version of a ChPhysicsItem; often a ChPhysicsItem is used as a container for a cluster of these ChNodeBase.
#include <ChNodeBase.h>
Public Member Functions | |
ChNodeBase (const ChNodeBase &other) | |
ChNodeBase & | operator= (const ChNodeBase &other) |
virtual unsigned int | GetNumCoordsPosLevel () const =0 |
Get the number of degrees of freedom. | |
virtual unsigned int | GetNumCoordsVelLevel () const |
Get the number of degrees of freedom, derivative. More... | |
virtual unsigned int | GetNumCoordsPosLevelActive () const |
Get the actual number of active degrees of freedom. More... | |
virtual unsigned int | GetNumCoordsVelLevelActive () const |
Get the actual number of active degrees of freedom, derivative. More... | |
virtual bool | IsAllCoordsActive () const |
Return true if all node DOFs are active (no node variable is fixed). | |
unsigned int | NodeGetOffsetPosLevel () |
Get offset in the state vector (position part). | |
unsigned int | NodeGetOffsetVelLevel () |
Get offset in the state vector (speed part). | |
void | NodeSetOffsetPosLevel (const unsigned int moff) |
Set offset in the state vector (position part). | |
void | NodeSetOffsetVelLevel (const unsigned int moff) |
Set offset in the state vector (speed part). | |
virtual void | NodeIntStateGather (const unsigned int off_x, ChState &x, const unsigned int off_v, ChStateDelta &v, double &T) |
virtual void | NodeIntStateScatter (const unsigned int off_x, const ChState &x, const unsigned int off_v, const ChStateDelta &v, const double T) |
virtual void | NodeIntStateGatherAcceleration (const unsigned int off_a, ChStateDelta &a) |
virtual void | NodeIntStateScatterAcceleration (const unsigned int off_a, const ChStateDelta &a) |
virtual void | NodeIntStateIncrement (const unsigned int off_x, ChState &x_new, const ChState &x, const unsigned int off_v, const ChStateDelta &Dv) |
virtual void | NodeIntStateGetIncrement (const unsigned int off_x, const ChState &x_new, const ChState &x, const unsigned int off_v, ChStateDelta &Dv) |
virtual void | NodeIntLoadResidual_F (const unsigned int off, ChVectorDynamic<> &R, const double c) |
virtual void | NodeIntLoadResidual_Mv (const unsigned int off, ChVectorDynamic<> &R, const ChVectorDynamic<> &w, const double c) |
virtual void | NodeIntLoadLumpedMass_Md (const unsigned int off, ChVectorDynamic<> &Md, double &error, const double c) |
virtual void | NodeIntToDescriptor (const unsigned int off_v, const ChStateDelta &v, const ChVectorDynamic<> &R) |
virtual void | NodeIntFromDescriptor (const unsigned int off_v, ChStateDelta &v) |
virtual void | InjectVariables (ChSystemDescriptor &descriptor) |
Register with the given system descriptor any ChVariable objects associated with this item. | |
virtual void | VariablesFbReset () |
Set the 'fb' part (the known term) of the encapsulated ChVariables to zero. | |
virtual void | VariablesFbLoadForces (double factor=1) |
Add the current forces (applied to node) into the encapsulated ChVariables. More... | |
virtual void | VariablesQbLoadSpeed () |
Initialize the 'qb' part of the ChVariables with the current value of speeds. | |
virtual void | VariablesFbIncrementMq () |
Add M*q (masses multiplied current 'qb') to Fb, ex. More... | |
virtual void | VariablesQbSetSpeed (double step=0) |
Fetch the item speed (ex. More... | |
virtual void | VariablesQbIncrementPosition (double step) |
Increment node positions by the 'qb' part of the ChVariables, multiplied by a 'step' factor. 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 | |
unsigned int | offset_x |
offset in vector of state (position part) | |
unsigned int | offset_w |
offset in vector of state (speed part) | |
Member Function Documentation
◆ GetNumCoordsPosLevelActive()
|
inlinevirtual |
Get the actual number of active degrees of freedom.
The default implementation returns the full number of DOFs for this node, but derived classes may allow fixing some of the node variables.
Reimplemented in chrono::fea::ChNodeFEAxyzDDD, chrono::fea::ChNodeFEAxyzDD, and chrono::fea::ChNodeFEAxyzD.
◆ GetNumCoordsVelLevel()
|
inlinevirtual |
Get the number of degrees of freedom, derivative.
This might be different from ndof_x if quaternions are used for rotations and derivative is angular velocity.
Reimplemented in chrono::fea::ChNodeFEAcurv, chrono::fea::ChNodeFEAxyzrot, chrono::fea::ChNodeFEAxyzDDD, chrono::fea::ChNodeFEAxyzDD, and chrono::fea::ChNodeFEAxyzD.
◆ GetNumCoordsVelLevelActive()
|
inlinevirtual |
Get the actual number of active degrees of freedom, derivative.
The default implementation returns the full number of DOFs for this node, but derived classes may allow fixing some of the node variables.
Reimplemented in chrono::fea::ChNodeFEAxyzDDD, chrono::fea::ChNodeFEAxyzDD, and chrono::fea::ChNodeFEAxyzD.
◆ VariablesFbIncrementMq()
|
inlinevirtual |
Add M*q (masses multiplied current 'qb') to Fb, ex.
if qb is initialized with v_old using VariablesQbLoadSpeed, this method can be used in timestepping schemes that do: M*v_new = M*v_old + forces*dt
Reimplemented in chrono::fea::ChNodeFEAxyzrot, chrono::fea::ChNodeFEAcurv, chrono::fea::ChNodeFEAxyzDDD, chrono::fea::ChNodeFEAxyzDD, chrono::fea::ChNodeFEAxyzD, chrono::fea::ChNodeFEAxyzP, and chrono::fea::ChNodeFEAxyz.
◆ VariablesFbLoadForces()
|
inlinevirtual |
Add the current forces (applied to node) into the encapsulated ChVariables.
Include in the 'fb' part: qf+=forces*factor
Reimplemented in chrono::fea::ChNodeFEAxyzrot, chrono::fea::ChNodeFEAcurv, chrono::fea::ChNodeFEAxyzDDD, chrono::fea::ChNodeFEAxyzDD, chrono::fea::ChNodeFEAxyzD, chrono::fea::ChNodeFEAxyzP, and chrono::fea::ChNodeFEAxyz.
◆ VariablesQbIncrementPosition()
|
inlinevirtual |
Increment node positions by the 'qb' part of the ChVariables, multiplied by a 'step' factor.
pos+=qb*step If qb is a speed, this behaves like a single step of 1-st order numerical integration (Euler integration).
Reimplemented in chrono::fea::ChNodeFEAxyzrot, chrono::fea::ChNodeFEAcurv, chrono::fea::ChNodeFEAxyzDDD, chrono::fea::ChNodeFEAxyzDD, chrono::fea::ChNodeFEAxyzD, chrono::fea::ChNodeFEAxyzP, and chrono::fea::ChNodeFEAxyz.
◆ VariablesQbSetSpeed()
|
inlinevirtual |
Fetch the item speed (ex.
linear velocity, in xyz nodes) from the 'qb' part of the ChVariables and sets it as the current item speed. If 'step' is not 0, also should compute the approximate acceleration of the item using backward differences, that is accel=(new_speed-old_speed)/step. Mostly used after the solver provided the solution in ChVariables.
Reimplemented in chrono::fea::ChNodeFEAxyzrot, chrono::fea::ChNodeFEAcurv, chrono::fea::ChNodeFEAxyzDDD, chrono::fea::ChNodeFEAxyzDD, chrono::fea::ChNodeFEAxyzD, chrono::fea::ChNodeFEAxyzP, and chrono::fea::ChNodeFEAxyz.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/physics/ChNodeBase.h
- /builds/uwsbel/chrono/src/chrono/physics/ChNodeBase.cpp