Description
Class for a single particle clone in the ChParticlesClones cluster.
It does not define mass, inertia and shape because those are shared among them.
#include <ChParticlesClones.h>
Public Member Functions | |
ChAparticle (const ChAparticle &other) | |
ChAparticle & | operator= (const ChAparticle &other) |
virtual ChVariables & | Variables () override |
ChParticlesClones * | GetContainer () const |
void | SetContainer (ChParticlesClones *mc) |
virtual ChContactable::eChContactableType | GetContactableType () const override |
This must return the proper eChContactableType enum, for allowing a faster collision dispatcher in ChContactContainer classes (this enum will be used instead of slow dynamic_cast<> to infer the type of ChContactable, if possible) | |
virtual ChVariables * | GetVariables1 () override |
Access variables. | |
virtual bool | IsContactActive () override |
Tell if the object must be considered in collision detection. | |
virtual int | ContactableGet_ndof_x () override |
Get the number of DOFs affected by this object (position part). | |
virtual int | ContactableGet_ndof_w () override |
Get the number of DOFs affected by this object (speed part). | |
virtual void | ContactableGetStateBlock_x (ChState &x) override |
Get all the DOFs packed in a single vector (position part) | |
virtual void | ContactableGetStateBlock_w (ChStateDelta &w) override |
Get all the DOFs packed in a single vector (speed part) | |
virtual void | ContactableIncrementState (const ChState &x, const ChStateDelta &dw, ChState &x_new) override |
Increment the provided state of this object by the given state-delta increment. More... | |
virtual ChVector | GetContactPoint (const ChVector<> &loc_point, const ChState &state_x) override |
Express the local point in absolute frame, for the given state position. | |
virtual ChVector | GetContactPointSpeed (const ChVector<> &loc_point, const ChState &state_x, const ChStateDelta &state_w) override |
Get the absolute speed of a local point attached to the contactable. More... | |
virtual ChVector | GetContactPointSpeed (const ChVector<> &abs_point) override |
Get the absolute speed of point abs_point if attached to the surface. More... | |
virtual ChCoordsys | GetCsysForCollisionModel () override |
Return the coordinate system for the associated collision model. More... | |
virtual void | ContactForceLoadResidual_F (const ChVector<> &F, const ChVector<> &abs_point, ChVectorDynamic<> &R) override |
Apply the force, expressed in absolute reference, applied in pos, to the coordinates of the variables. More... | |
virtual void | ContactForceLoadQ (const ChVector<> &F, const ChVector<> &point, const ChState &state_x, ChVectorDynamic<> &Q, int offset) override |
Apply the given force at the given point and load the generalized force array. More... | |
virtual void | ComputeJacobianForContactPart (const ChVector<> &abs_point, ChMatrix33<> &contact_plane, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_N, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_U, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_V, bool second) override |
Compute the jacobian(s) part(s) for this contactable item. More... | |
virtual void | ComputeJacobianForRollingContactPart (const ChVector<> &abs_point, ChMatrix33<> &contact_plane, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_N, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_U, ChVariableTupleCarrier_1vars< 6 >::type_constraint_tuple &jacobian_tuple_V, bool second) override |
Compute the jacobian(s) part(s) for this contactable item, for rolling about N,u,v (used only for rolling friction NSC contacts) | |
virtual double | GetContactableMass () override |
used by some SMC code | |
virtual ChPhysicsItem * | GetPhysicsItem () override |
This is only for backward compatibility. | |
virtual void | ArchiveOUT (ChArchiveOut &marchive) override |
Method to allow serialization of transient data to archives. | |
virtual void | ArchiveIN (ChArchiveIn &marchive) override |
Method to allow de serialization of transient data from archives. | |
Public Member Functions inherited from chrono::ChParticleBase | |
ChParticleBase (const ChParticleBase &other) | |
ChParticleBase & | operator= (const ChParticleBase &other) |
Public Member Functions inherited from chrono::ChFrameMoving< double > | |
ChFrameMoving (const ChVector< double > &mv=ChVector< double >(0, 0, 0), const ChQuaternion< double > &mq=ChQuaternion< double >(1, 0, 0, 0)) | |
Construct from pos and rot (as a quaternion) | |
ChFrameMoving (const ChVector< double > &mv, const ChMatrix33< double > &ma) | |
Construct from pos and rotation (as a 3x3 matrix) | |
ChFrameMoving (const ChCoordsys< double > &mc) | |
Construct from a coordsys. | |
ChFrameMoving (const ChFrame< double > &mc) | |
Construct from a frame. | |
ChFrameMoving (const ChFrameMoving< double > &other) | |
Copy constructor, build from another moving frame. | |
virtual | ~ChFrameMoving () |
Destructor. | |
ChFrameMoving< double > & | operator= (const ChFrameMoving< double > &other) |
Assignment operator: copy from another moving frame. | |
ChFrameMoving< double > & | operator= (const ChFrame< double > &other) |
Assignment operator: copy from another frame. | |
bool | operator== (const ChFrameMoving< double > &other) const |
Returns true for identical frames. | |
bool | operator!= (const ChFrameMoving< double > &other) const |
Returns true for different frames. | |
ChFrameMoving< double > | operator>> (const ChFrameMoving< double > &Fb) const |
The '>>' operator transforms a coordinate system, so transformations can be represented with this syntax: new_frame = old_frame >> tr_frame; For a sequence of transformations, i.e. More... | |
ChFrameMoving< double > | operator* (const ChFrameMoving< double > &Fb) const |
The '*' operator transforms a coordinate system, so transformations can be represented with this syntax: new_frame = tr_frame * old_frame; For a sequence of transformations, i.e. More... | |
ChFrameMoving< double > & | operator>>= (const ChFrameMoving< double > &T) |
Performs pre-multiplication of this frame by another frame, for example: A>>=T means A'=T*A ; or A'=A >> T. | |
ChFrameMoving< double > & | operator>>= (const ChVector< double > &D) |
Performs pre-multiplication of this frame by a vector D, to 'move' by a displacement D: | |
ChFrameMoving< double > & | operator>>= (const ChQuaternion< double > &R) |
Performs pre-multiplication of this frame by a quaternion R, to 'rotate' it by R: | |
ChFrameMoving< double > & | operator>>= (const ChCoordsys< double > &F) |
Performs pre-multiplication of this frame by a ChCoordsys F: | |
ChFrameMoving< double > & | operator>>= (const ChFrame< double > &F) |
Performs pre-multiplication of this frame by a ChFrame F: | |
ChFrameMoving< double > & | operator%= (const ChFrameMoving< double > &T) |
Performs pre-multiplication of this frame by another frame, for example: A%=T means A'=T*A ; or A'=A >> T Note: DEPRECATED, use >>= instead. | |
ChFrameMoving< double > & | operator*= (const ChFrameMoving< double > &T) |
Performs post-multiplication of this frame by another frame, for example: A*=T means A'=A*T ; or A'=T >> A. | |
ChCoordsys< double > & | GetCoord_dt () |
Return both current rotation and translation speeds as a coordsystem object, with vector and quaternion. | |
const ChCoordsys< double > & | GetCoord_dt () const |
ChCoordsys< double > & | GetCoord_dtdt () |
Return both current rotation and translation accelerations as a coordsystem object, with vector and quaternion. | |
const ChCoordsys< double > & | GetCoord_dtdt () const |
ChVector< double > & | GetPos_dt () |
Return the current speed as a 3d vector. | |
const ChVector< double > & | GetPos_dt () const |
ChVector< double > & | GetPos_dtdt () |
Return the current acceleration as a 3d vector. | |
const ChVector< double > & | GetPos_dtdt () const |
ChQuaternion< double > & | GetRot_dt () |
Return the current rotation speed as a quaternion. | |
const ChQuaternion< double > & | GetRot_dt () const |
ChQuaternion< double > & | GetRot_dtdt () |
Return the current rotation acceleration as a quaternion. | |
const ChQuaternion< double > & | GetRot_dtdt () const |
ChVector< double > | GetWvel_loc () const |
Computes the actual angular speed (expressed in local coords) | |
ChVector< double > | GetWvel_par () const |
Computes the actual angular speed (expressed in parent coords) | |
ChVector< double > | GetWacc_loc () const |
Computes the actual angular acceleration (expressed in local coords) | |
ChVector< double > | GetWacc_par () const |
Computes the actual angular acceleration (expressed in parent coords) | |
virtual void | SetCoord_dt (const ChCoordsys< double > &mcoord_dt) |
Set both linear speed and rotation speed as a single ChCoordsys derivative. | |
virtual void | SetPos_dt (const ChVector< double > &mvel) |
Set the linear speed. | |
virtual void | SetRot_dt (const ChQuaternion< double > &mrot_dt) |
Set the rotation speed as a quaternion. More... | |
virtual void | SetWvel_loc (const ChVector< double > &wl) |
Set the rotation speed from given angular speed (expressed in local csys) | |
virtual void | SetWvel_par (const ChVector< double > &wp) |
Set the rotation speed from given angular speed (expressed in parent csys) | |
virtual void | SetCoord_dtdt (const ChCoordsys< double > &mcoord_dtdt) |
Set both linear acceleration and rotation acceleration as a single ChCoordsys derivative. | |
virtual void | SetPos_dtdt (const ChVector< double > &macc) |
Set the linear acceleration. | |
virtual void | SetRot_dtdt (const ChQuaternion< double > &mrot_dtdt) |
Set the rotation acceleration as a quaternion derivative. More... | |
virtual void | SetWacc_loc (const ChVector< double > &al) |
Set the rotation acceleration from given angular acceleration (expressed in local csys) Note: even when the local angular acceleration is zero, you are still encouraged to call this method bacause q_dtdt might be nonzero due to nonzero q_dt in case of rotational motion. | |
virtual void | SetWacc_par (const ChVector< double > &ap) |
Set the rotation speed from given angular speed (expressed in parent csys) | |
void | Compute_Adt (ChMatrix33< double > &mA_dt) const |
Computes the time derivative of rotation matrix, mAdt. | |
void | Compute_Adtdt (ChMatrix33< double > &mA_dtdt) |
Computes the 2nd time derivative of rotation matrix, mAdtdt. | |
ChMatrix33< double > | GetA_dt () |
Computes and returns an Adt matrix (-note: prefer using Compute_Adt() directly for better performance) | |
ChMatrix33< double > | GetA_dtdt () |
Computes and returns an Adt matrix (-note: prefer using Compute_Adtdt() directly for better performance) | |
void | ConcatenatePreTransformation (const ChFrameMoving< double > &T) |
Apply a transformation (rotation and translation) represented by another ChFrameMoving T. More... | |
void | ConcatenatePostTransformation (const ChFrameMoving< double > &T) |
Apply a transformation (rotation and translation) represented by another ChFrameMoving T in local coordinate. More... | |
ChVector< double > | PointSpeedLocalToParent (const ChVector< double > &localpos) const |
Given the position of a point in local frame coords, and assuming it is sticky to frame, return the speed in parent coords. | |
ChVector< double > | PointSpeedLocalToParent (const ChVector< double > &localpos, const ChVector< double > &localspeed) const |
Given the position localpos of a point in the local reference frame, assuming that the point moves in the local reference frame with localspeed, return the speed in the parent reference frame. | |
ChVector< double > | PointAccelerationLocalToParent (const ChVector< double > &localpos) const |
Given the position of a point in local frame coords, and assuming it is sticky to frame, return the acceleration in parent coords. More... | |
ChVector< double > | PointAccelerationLocalToParent (const ChVector< double > &localpos, const ChVector< double > &localspeed, const ChVector< double > &localacc) const |
Given the position of a point in local frame coords, and assuming it has a frame-relative speed localspeed and frame-relative acceleration localacc, return the acceleration in parent coords. | |
ChVector< double > | PointSpeedParentToLocal (const ChVector< double > &parentpos, const ChVector< double > &parentspeed) const |
Given the position of a point in parent frame coords, and assuming it has an absolute speed parentspeed, return the speed in local coords. | |
ChVector< double > | PointAccelerationParentToLocal (const ChVector< double > &parentpos, const ChVector< double > &parentspeed, const ChVector< double > &parentacc) const |
Given the position of a point in parent frame coords, and assuming it has an absolute speed parentspeed and absolute acceleration parentacc, return the acceleration in local coords. | |
void | TransformLocalToParent (const ChFrameMoving< double > &local, ChFrameMoving< double > &parent) const |
This function transforms a frame from 'this' local coordinate system to parent frame coordinate system, and also transforms the speed and acceleration of the frame. More... | |
void | TransformParentToLocal (const ChFrameMoving< double > &parent, ChFrameMoving< double > &local) const |
This function transforms a frame from the parent coordinate system to 'this' local frame coordinate system. More... | |
bool | Equals (const ChFrameMoving< double > &other) const |
Returns true if coordsys is identical to other coordsys. | |
bool | Equals (const ChFrameMoving< double > &other, double tol) const |
Returns true if coordsys is equal to other coordsys, within a tolerance 'tol'. | |
virtual void | Invert () override |
The transformation (also for speeds, accelerations) is inverted in place. More... | |
ChFrameMoving< double > | GetInverse () const |
Public Member Functions inherited from chrono::ChFrame< double > | |
ChFrame (const ChVector< double > &mv=ChVector< double >(0, 0, 0), const ChQuaternion< double > &mq=ChQuaternion< double >(1, 0, 0, 0)) | |
Default constructor, or construct from pos and rot (as a quaternion) | |
ChFrame (const ChVector< double > &mv, const ChMatrix33< double > &ma) | |
Construct from pos and rotation (as a 3x3 matrix) | |
ChFrame (const ChCoordsys< double > &mc) | |
Construct from a coordsys. | |
ChFrame (const ChVector< double > &mv, const double alpha, const ChVector< double > &mu) | |
Construct from position mv and rotation of angle alpha around unit vector mu. | |
ChFrame (const ChFrame< double > &other) | |
Copy constructor, build from another frame. | |
ChFrame< double > & | operator= (const ChFrame< double > &other) |
Assignment operator: copy from another frame. | |
bool | operator== (const ChFrame< double > &other) const |
Returns true for identical frames. | |
bool | operator!= (const ChFrame< double > &other) const |
Returns true for different frames. | |
ChFrame< double > | operator>> (const ChFrame< double > &Fb) const |
The '>>' operator transforms a coordinate system, so transformations can be represented with this syntax: new_frame = old_frame >> tr_frame; For a sequence of transformations, i.e. More... | |
ChFrame< double > | operator* (const ChFrame< double > &Fb) const |
The '>>' operator transforms a vector, so transformations can be represented with this syntax: new_v = old_v >> tr_frame; For a sequence of transformations, i.e. More... | |
ChVector< double > | operator* (const ChVector< double > &V) const |
The '*' operator transforms a vector, so transformations can be represented with this syntax: new_v = tr_frame * old_v; For a sequence of transformations, i.e. More... | |
ChVector< double > | operator/ (const ChVector< double > &V) const |
The '/' is like the '*' operator (see), but uses the inverse transformation for A, in A/b. More... | |
ChFrame< double > & | operator>>= (const ChFrame< double > &T) |
Performs pre-multiplication of this frame by another frame, for example: A>>=T means A'=T*A ; or A'=A >> T. | |
ChFrame< double > & | operator>>= (const ChVector< double > &D) |
Performs pre-multiplication of this frame by a vector D, to 'move' by a displacement D: | |
ChFrame< double > & | operator>>= (const ChQuaternion< double > &R) |
Performs pre-multiplication of this frame by a quaternion R, to 'rotate' it by R: | |
ChFrame< double > & | operator>>= (const ChCoordsys< double > &F) |
Performs pre-multiplication of this frame by a ChCoordsys F, to transform it: | |
ChFrame< double > & | operator%= (const ChFrame< double > &T) |
Performs pre-multiplication of this frame by another frame, for example: A%=T means A'=T*A ; or A'=A >> T Note: DEPRECATED, use >>= instead. | |
ChFrame< double > & | operator*= (const ChFrame< double > &T) |
Performs post-multiplication of this frame by another frame, for example: A*=T means A'=A*T ; or A'=T >> A. | |
ChCoordsys< double > & | GetCoord () |
Return both current rotation and translation as a coordsystem object, with vector and quaternion. | |
const ChCoordsys< double > & | GetCoord () const |
ChVector< double > & | GetPos () |
Return the current translation as a 3d vector. | |
const ChVector< double > & | GetPos () const |
ChQuaternion< double > & | GetRot () |
Return the current rotation as a quaternion. | |
const ChQuaternion< double > & | GetRot () const |
ChMatrix33< double > & | GetA () |
Return the current rotation as a 3x3 matrix. | |
const ChMatrix33< double > & | GetA () const |
ChVector< double > | GetRotAxis () |
Get axis of finite rotation, in parent space. | |
double | GetRotAngle () |
Get angle of rotation about axis of finite rotation. | |
void | SetCoord (const ChCoordsys< double > &mcoord) |
Impose both translation and rotation as a single ChCoordsys. More... | |
void | SetCoord (const ChVector< double > &mv, const ChQuaternion< double > &mq) |
Impose both translation and rotation. More... | |
void | SetRot (const ChQuaternion< double > &mrot) |
Impose the rotation as a quaternion. More... | |
void | SetRot (const ChMatrix33< double > &mA) |
Impose the rotation as a 3x3 matrix. More... | |
void | SetPos (const ChVector< double > &mpos) |
Impose the translation. | |
void | ConcatenatePreTransformation (const ChFrame< double > &T) |
Apply a transformation (rotation and translation) represented by another ChFrame T. More... | |
void | ConcatenatePostTransformation (const ChFrame< double > &T) |
Apply a transformation (rotation and translation) represented by another ChFrame T in local coordinate. More... | |
void | Move (const ChVector< double > &V) |
An easy way to move the frame by the amount specified by vector V, (assuming V expressed in parent coordinates) | |
void | Move (const ChCoordsys< double > &VR) |
Apply both translation and rotation, assuming both expressed in parent coordinates, as a vector for translation and quaternion for rotation,. | |
ChVector< double > | TransformLocalToParent (const ChVector< double > &local) const |
This function transforms a point from the local frame coordinate system to the parent coordinate system. More... | |
void | TransformLocalToParent (const ChFrame< double > &local, ChFrame< double > &parent) const |
This function transforms a frame from 'this' local coordinate system to parent frame coordinate system. More... | |
ChVector< double > | TransformPointLocalToParent (const ChVector< double > &local) const |
ChVector< double > | TransformParentToLocal (const ChVector< double > &parent) const |
This function transforms a point from the parent coordinate system to local frame coordinate system. More... | |
void | TransformParentToLocal (const ChFrame< double > &parent, ChFrame< double > &local) const |
This function transforms a frame from the parent coordinate system to 'this' local frame coordinate system. More... | |
ChVector< double > | TransformPointParentToLocal (const ChVector< double > &parent) const |
ChVector< double > | TransformDirectionParentToLocal (const ChVector< double > &mdirection) const |
This function transforms a direction from 'this' local coordinate system to parent frame coordinate system. More... | |
ChVector< double > | TransformDirectionLocalToParent (const ChVector< double > &mdirection) const |
This function transforms a direction from the parent frame coordinate system to 'this' local coordinate system. More... | |
bool | Equals (const ChFrame< double > &other) const |
Returns true if coordsys is identical to other coordsys. | |
bool | Equals (const ChFrame< double > &other, double tol) const |
Returns true if coordsys is equal to other coordsys, within a tolerance 'tol'. | |
void | Normalize () |
Normalize the rotation, so that quaternion has unit length. | |
virtual void | SetIdentity () |
Sets to no translation and no rotation. | |
ChFrame< double > | GetInverse () const |
Public Attributes | |
ChParticlesClones * | container |
ChVariablesBodySharedMass | variables |
collision::ChCollisionModel * | collision_model |
ChVector | UserForce |
ChVector | UserTorque |
Public Attributes inherited from chrono::ChFrameMoving< double > | |
ChCoordsys< double > | coord_dt |
Rotation and position speed, as vector+quaternion. | |
ChCoordsys< double > | coord_dtdt |
Rotation and position acceleration, as vector+quaternion. | |
Public Attributes inherited from chrono::ChFrame< double > | |
ChCoordsys< double > | coord |
Rotation and position, as vector+quaternion. | |
ChMatrix33< double > | Amatrix |
3x3 orthogonal rotation matrix | |
Member Function Documentation
◆ ComputeJacobianForContactPart()
|
overridevirtual |
Compute the jacobian(s) part(s) for this contactable item.
For example, if the contactable is a ChBody, this should update the corresponding 1x6 jacobian.
◆ ContactableIncrementState()
|
overridevirtual |
Increment the provided state of this object by the given state-delta increment.
Compute: x_new = x + dw.
Implements chrono::ChContactable.
◆ ContactForceLoadQ()
|
overridevirtual |
Apply the given force at the given point and load the generalized force array.
The force and its application point are specified in the global frame. Each object must set the entries in Q corresponding to its variables, starting at the specified offset. If needed, the object states must be extracted from the provided state position.
Implements chrono::ChContactable.
◆ ContactForceLoadResidual_F()
|
overridevirtual |
Apply the force, expressed in absolute reference, applied in pos, to the coordinates of the variables.
Force for example could come from a penalty model.
Implements chrono::ChContactable.
◆ GetContactPointSpeed() [1/2]
Get the absolute speed of point abs_point if attached to the surface.
Easy in this case because there are no rotations..
Implements chrono::ChContactable.
◆ GetContactPointSpeed() [2/2]
|
overridevirtual |
Get the absolute speed of a local point attached to the contactable.
The given point is assumed to be expressed in the local frame of this object. This function must use the provided states.
Implements chrono::ChContactable.
◆ GetCsysForCollisionModel()
|
inlineoverridevirtual |
Return the coordinate system for the associated collision model.
ChCollisionModel might call this to get the position of the contact model (when rigid) and sync it.
Implements chrono::ChContactable.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/physics/ChParticlesClones.h
- /builds/uwsbel/chrono/src/chrono/physics/ChParticlesClones.cpp