public abstract class DynamicAttachmentBase extends ModelComponentBase implements DynamicAttachmentComp, AttachingComponent
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".
ModelComponent.FilePathSaveType, ModelComponent.NavpanelVisibilityenforceUniqueCompositeNames, enforceUniqueNames, myNumber, myProps, NULL_OBJ, useCompactPathNames| Constructor and Description |
|---|
DynamicAttachmentBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBackRefs()
Every master component should contain a back reference to each
attachment that references it.
|
static void |
addBackRefs(DynamicAttachment at) |
static void |
addConnectedMasterRefs(AttachingComponent ac,
CompositeComponent hcomp) |
abstract void |
addMassToMasters() |
abstract void |
applyForces() |
java.lang.Object |
clone() |
void |
connectAttachment(DynamicComponent dcomp) |
void |
connectToHierarchy(CompositeComponent hcomp)
Update the attachment position state whenever we connect to the parent
(i.e., plug in to the hierarchy).
|
DynamicAttachmentBase |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap) |
void |
disconnectFromHierarchy(CompositeComponent hcomp)
Update the attachment position state whenever we connect to the parent
(i.e., plug in to the hierarchy).
|
DynamicAttachment |
getAttachment() |
abstract boolean |
getDerivative(double[] buf,
int idx) |
abstract MatrixBlock |
getGT(int idx)
Returns the transpose of the constraint matrix G associated
with the idx-th master component.
|
void |
getHardReferences(java.util.List<ModelComponent> refs)
Appends all hard references for this component to a list.
|
abstract DynamicComponent[] |
getMasters() |
abstract DynamicComponent |
getSlave()
Returns the slave DynamicMechComponent associated with this attachment.
|
abstract void |
invalidateMasters() |
abstract void |
mulSubGT(double[] ybuf,
int yoff,
double[] xbuf,
int xoff,
int idx)
Computes
|
abstract void |
mulSubGTM(MatrixBlock D,
MatrixBlock M,
int idx)
Computes
|
abstract void |
mulSubMG(MatrixBlock D,
MatrixBlock M,
int idx)
Computes
|
int |
numMasters() |
boolean |
oneMasterActive() |
boolean |
oneMasterNotAttached() |
void |
removeBackRefs()
Removes the back reference to this attachment's slave component
from each of the master component.
|
static void |
removeBackRefs(DynamicAttachment at) |
static void |
removeConnectedMasterRefs(AttachingComponent ac,
CompositeComponent hcomp) |
void |
setSlaveAffectsStiffness(boolean affects) |
boolean |
slaveAffectsStiffness() |
abstract void |
updateAttachment()
Update attachment to reflect changes in the slave state.
|
abstract void |
updatePosStates() |
abstract void |
updateVelStates() |
checkFlag, checkName, checkNameUniqueness, clearFlag, createTempFlag, getAllPropertyInfo, getChildren, getGrandParent, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferencesgetAllPropertyInfo, getPropertygetChildren, hasChildrenpostscanisWritable, writepublic boolean slaveAffectsStiffness()
slaveAffectsStiffness in interface DynamicAttachmentpublic void setSlaveAffectsStiffness(boolean affects)
setSlaveAffectsStiffness in interface DynamicAttachmentpublic abstract DynamicComponent[] getMasters()
getMasters in interface DynamicAttachmentpublic int numMasters()
numMasters in interface DynamicAttachmentpublic abstract void invalidateMasters()
invalidateMasters in interface DynamicAttachmentpublic boolean oneMasterActive()
public boolean oneMasterNotAttached()
public static void addBackRefs(DynamicAttachment at)
public static void removeBackRefs(DynamicAttachment at)
public void addBackRefs()
addBackRefs in interface DynamicAttachmentpublic void removeBackRefs()
removeBackRefs in interface DynamicAttachmentpublic abstract DynamicComponent getSlave()
null.getSlave in interface DynamicAttachmentpublic abstract void updatePosStates()
updatePosStates in interface DynamicAttachmentpublic abstract void updateVelStates()
updateVelStates in interface DynamicAttachmentpublic abstract void updateAttachment()
updateAttachment in interface DynamicAttachmentpublic abstract void applyForces()
applyForces in interface DynamicAttachmentpublic abstract void addMassToMasters()
addMassToMasters in interface DynamicAttachmentpublic abstract boolean getDerivative(double[] buf,
int idx)
getDerivative in interface DynamicAttachmentpublic abstract void mulSubGTM(MatrixBlock D, MatrixBlock M, int idx)
T
D -= G M
where D and M are matrices associated with master and slave components,
respectively, and G is the constraint matrix for the attachment.mulSubGTM in interface DynamicAttachmentD - dependent matrix associated with a master componentM - matrix associated with a slave componentpublic abstract void 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.
mulSubMG in interface DynamicAttachmentD - dependent matrix associated with a master componentM - matrix associated with a slave componentpublic abstract MatrixBlock getGT(int idx)
getGT in interface DynamicAttachmentidx - index of the master componentpublic abstract void mulSubGT(double[] ybuf,
int yoff,
double[] xbuf,
int xoff,
int idx)
T
y -= G x
where y and x are vectors associated with master and slave components,
respectively, and G is the constraint matrix for the attachment.mulSubGT in interface DynamicAttachmentybuf - buffer into which to store resultyoff - offset into ybufxbuf - buffer containing right hand side vectorxoff - offset into xbufidx - master component indexpublic void getHardReferences(java.util.List<ModelComponent> refs)
ModelComponentBasegetHardReferences in interface ModelComponentgetHardReferences in class ModelComponentBaserefs - list to which hard references are appendedpublic static void addConnectedMasterRefs(AttachingComponent ac, CompositeComponent hcomp)
public void connectToHierarchy(CompositeComponent hcomp)
connectToHierarchy in interface ModelComponentconnectToHierarchy in class ModelComponentBasehcomp - hierarchy component to which this component,
or its ancestor, was attachedpublic static void removeConnectedMasterRefs(AttachingComponent ac, CompositeComponent hcomp)
public void disconnectFromHierarchy(CompositeComponent hcomp)
disconnectFromHierarchy in interface ModelComponentdisconnectFromHierarchy in class ModelComponentBasehcomp - hierarchy component from which this component,
or its ancestor, was detachedpublic void connectAttachment(DynamicComponent dcomp)
connectAttachment in interface AttachingComponentpublic DynamicAttachment getAttachment()
getAttachment in interface AttachingComponentpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class ModelComponentBasejava.lang.CloneNotSupportedExceptionpublic DynamicAttachmentBase copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
copy in interface DynamicAttachmentCompcopy in class ModelComponentBase