public abstract class DynamicAttachmentBase extends ModelComponentBase implements DynamicAttachmentComp
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.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static boolean |
useNewConnect |
enforceUniqueCompositeNames, 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 |
addBackRefsIfConnected(ModelComponent comp,
DynamicAttachment at) |
abstract void |
addMassToMasters() |
static void |
addNewlyConnectedBackRefs(ModelComponent comp,
DynamicAttachment at,
CompositeComponent connector) |
abstract void |
applyForces() |
java.lang.Object |
clone() |
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).
|
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() |
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 |
removeBackRefsIfConnected(ModelComponent comp,
DynamicAttachment at) |
static void |
removeNewlyDisconnectedBackRefs(ModelComponent comp,
DynamicAttachment at,
CompositeComponent connector) |
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, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getAllPropertyInfo, getProperty
getChildren, hasChildren
postscan
isWritable, write
public boolean slaveAffectsStiffness()
slaveAffectsStiffness
in interface DynamicAttachment
public void setSlaveAffectsStiffness(boolean affects)
setSlaveAffectsStiffness
in interface DynamicAttachment
public abstract DynamicComponent[] getMasters()
getMasters
in interface DynamicAttachment
public int numMasters()
numMasters
in interface DynamicAttachment
public abstract void invalidateMasters()
invalidateMasters
in interface DynamicAttachment
public boolean oneMasterActive()
public static void addBackRefs(DynamicAttachment at)
public static void addBackRefsIfConnected(ModelComponent comp, DynamicAttachment at)
public static void addNewlyConnectedBackRefs(ModelComponent comp, DynamicAttachment at, CompositeComponent connector)
public static void removeBackRefs(DynamicAttachment at)
public static void removeBackRefsIfConnected(ModelComponent comp, DynamicAttachment at)
public static void removeNewlyDisconnectedBackRefs(ModelComponent comp, DynamicAttachment at, CompositeComponent connector)
public void addBackRefs()
addBackRefs
in interface DynamicAttachment
public void removeBackRefs()
removeBackRefs
in interface DynamicAttachment
public abstract DynamicComponent getSlave()
null
.getSlave
in interface DynamicAttachment
public abstract void updatePosStates()
updatePosStates
in interface DynamicAttachment
public abstract void updateVelStates()
updateVelStates
in interface DynamicAttachment
public abstract void updateAttachment()
updateAttachment
in interface DynamicAttachment
public abstract void applyForces()
applyForces
in interface DynamicAttachment
public abstract void addMassToMasters()
addMassToMasters
in interface DynamicAttachment
public abstract boolean getDerivative(double[] buf, int idx)
getDerivative
in interface DynamicAttachment
public abstract 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.
mulSubGTM
in interface DynamicAttachment
D
- 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 DynamicAttachment
D
- dependent matrix associated with a master componentM
- matrix associated with a slave componentpublic abstract MatrixBlock getGT(int idx)
getGT
in interface DynamicAttachment
idx
- index of the master componentpublic abstract void 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.
mulSubGT
in interface DynamicAttachment
ybuf
- 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)
ModelComponentBase
getHardReferences
in interface ModelComponent
getHardReferences
in class ModelComponentBase
refs
- list to which hard references are appendedpublic void connectToHierarchy(CompositeComponent hcomp)
connectToHierarchy
in interface ModelComponent
connectToHierarchy
in class ModelComponentBase
hcomp
- hierarchy component to which this component,
or its ancestor, was attachedpublic void disconnectFromHierarchy(CompositeComponent hcomp)
disconnectFromHierarchy
in interface ModelComponent
disconnectFromHierarchy
in class ModelComponentBase
hcomp
- hierarchy component from which this component,
or its ancestor, was detachedpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class ModelComponentBase
java.lang.CloneNotSupportedException
public DynamicAttachmentBase copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
copy
in interface DynamicAttachmentComp
copy
in class ModelComponentBase