public interface DynamicAttachment
q_a = f (q_m)Differentiating means that the attached component velocity u_a is a linear function of the master velocities u_m:
u_a = -G (u_m)where G = -(d f)/(d q_m) is the "constraint matrix".
Modifier and Type | Method and Description |
---|---|
void |
addBackRefs()
Every master component should contain a back reference to each
attachment that references it.
|
void |
addMassToMasters() |
void |
applyForces() |
boolean |
getDerivative(double[] buf,
int idx) |
MatrixBlock |
getGT(int idx)
Returns the transpose of the constraint matrix G associated
with the idx-th master component.
|
DynamicComponent[] |
getMasters() |
DynamicComponent |
getSlave()
Returns the slave DynamicMechComponent associated with this attachment.
|
void |
invalidateMasters() |
void |
mulSubGT(double[] ybuf,
int yoff,
double[] xbuf,
int xoff,
int idx)
Computes
|
void |
mulSubGTM(MatrixBlock D,
MatrixBlock M,
int idx)
Computes
|
void |
mulSubMG(MatrixBlock D,
MatrixBlock M,
int idx)
Computes
|
int |
numMasters() |
void |
removeBackRefs()
Removes the back reference to this attachment's slave component
from each of the master component.
|
void |
setSlaveAffectsStiffness(boolean affects) |
boolean |
slaveAffectsStiffness() |
void |
updateAttachment()
Update attachment to reflect changes in the slave state.
|
void |
updatePosStates() |
void |
updateVelStates() |
DynamicComponent[] getMasters()
int numMasters()
void invalidateMasters()
DynamicComponent getSlave()
null
.boolean slaveAffectsStiffness()
void setSlaveAffectsStiffness(boolean affects)
void addBackRefs()
void removeBackRefs()
void updatePosStates()
void updateVelStates()
void updateAttachment()
void applyForces()
void addMassToMasters()
boolean getDerivative(double[] buf, int idx)
void mulSubGTM(MatrixBlock D, MatrixBlock M, int idx)
T D -= G Mwhere D and M are matrices associated with master and slave components, respectively, and G is the constraint matrix for the attachment.
D
- dependent matrix associated with a master componentM
- matrix associated with a slave componentvoid mulSubMG(MatrixBlock D, MatrixBlock M, int idx)
D -= M Gwhere D and M are matrices associated with master and slave components, respectively, and G is the constraint matrix for the attachment.
D
- dependent matrix associated with a master componentM
- matrix associated with a slave componentMatrixBlock getGT(int idx)
idx
- index of the master componentvoid mulSubGT(double[] ybuf, int yoff, double[] xbuf, int xoff, int idx)
T y -= G xwhere y and x are vectors associated with master and slave components, respectively, and G is the constraint matrix for the attachment.
ybuf
- buffer into which to store resultyoff
- offset into ybufxbuf
- buffer containing right hand side vectorxoff
- offset into xbufidx
- master component index