|
|
| CablePendulum (const std::string &simObjectName, ISimObjectCreator *const creator) |
| |
|
void | OdeFcn (const double T, const double *const X, double *const XDot) const |
| |
|
void | InitialConditionSetup (const double T, const double *const currentIC, double *const updatedIC, ISimObjectCreator *const creator) |
| |
|
void | FinalSetup (const double T, const double *const X, ISimObjectCreator *const creator) |
| |
|
bool | HasJacobians () const override |
| |
|
void | OdeJacobian (double T, const double *X, double *J, int nStates) override |
| |
|
int | GetJacobianSparsity (int nStates, int *rowPtr, int *colIdx) override |
| |
|
|
void | SetOutputPortValues (const double T, const double *const X) const |
| |
|
const double * | MidpointPosition (const double T, const double *const X) |
| |
|
const double * | BallPosition (const double T, const double *const X) |
| |
|
const double * | BallVelocity (const double T, const double *const X) |
| |
| void | segmentJacobian (const double *pk, const double *pl, const double *vk, const double *vl, double dF_dpk[9], double dF_dpl[9], double dF_dvk[9], double dF_dvl[9]) const |
| |
|
void | addDragJacobian (const double T, const double *pk, const double *pl, const double *vk, double dragFactor, double dF_dpk[9], double dF_dpl[9], double dF_dvk[9]) const |
| | Adds the derivatives of Drag(k,l), the force on node k, to the blocks segmentJacobian filled.
|
| |
|
Eigen::Vector3d | Drag (int k, int l, const double T, const double *const X) const |
| |
|
Eigen::Vector3d | Spring (int k, int l, const double T, const double *const X) const |
| |
|
Eigen::Vector3d | Damp (int k, int l, const double T, const double *const X) const |
| |
|
const double * | SuspensionForce (const double T, const double *const X) |
| |
|
const double * | CableOnBallForce (const double T, const double *const X) |
| |
| int | LocalIndex (int globalStateIndex) const |
| |
| int CablePendulum::LocalIndex |
( |
int |
globalStateIndex | ) |
const |
|
inlineprotected |
Turns a model-global state index into one local to this SimObject.
OdeFcn and the port functions are handed the whole model's state vector, so they use the global indices AddState returned directly. OdeJacobian is handed this object's own slice, whose first element is the first state it registered, so every index it uses goes through this function (BASE-0033).
| void CablePendulum::segmentJacobian |
( |
const double * |
pk, |
|
|
const double * |
pl, |
|
|
const double * |
vk, |
|
|
const double * |
vl, |
|
|
double |
dF_dpk[9], |
|
|
double |
dF_dpl[9], |
|
|
double |
dF_dvk[9], |
|
|
double |
dF_dvl[9] |
|
) |
| const |
|
protected |
Computes structural Jacobian blocks for one cable segment. Convention: pk = "this node" (A side), pl = "other end" (B side). Outputs are 3x3 row-major matrices for dForce_on_k / d{pk,pl,vk,vl}. Covers Spring(k,l) + Damp(k,l) terms; addDragJacobian adds Drag(k,l).