public class PointParticleAttachment extends PointAttachment
ModelComponent.NavpanelVisibility
useNewConnect
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, myProps, NULL_OBJ, useCompactPathNames
COPY_REFERENCES, REST_POSITION
Constructor and Description |
---|
PointParticleAttachment() |
PointParticleAttachment(Particle master,
Point slave) |
Modifier and Type | Method and Description |
---|---|
void |
addMassToMasters() |
void |
applyForces() |
PointParticleAttachment |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component.
|
void |
getCurrentPos(Vector3d pos)
Returns the current position of the attached point, in world coordinates.
|
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.
|
Particle |
getParticle() |
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
|
void |
setParticle(Particle particle) |
void |
updateAttachment()
Update attachment to reflect changes in the slave state.
|
void |
updatePosStates() |
void |
updateVelStates() |
void |
writeItems(java.io.PrintWriter pw,
NumberFormat fmt,
CompositeComponent ancestor) |
addTargetJacobian, getCopyReferences, getMasters, getPoint, getSlave, invalidateMasters, isDuplicatable, numMasters
addBackRefs, addBackRefs, addBackRefsIfConnected, addNewlyConnectedBackRefs, clone, connectToHierarchy, disconnectFromHierarchy, getHardReferences, oneMasterActive, removeBackRefs, removeBackRefs, removeBackRefsIfConnected, removeNewlyDisconnectedBackRefs, setSlaveAffectsStiffness, slaveAffectsStiffness
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
connectToHierarchy, disconnectFromHierarchy, getHardReferences, 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 Particle getParticle()
public void setParticle(Particle particle)
public void updatePosStates()
updatePosStates
in interface DynamicAttachment
updatePosStates
in class DynamicAttachmentBase
public void getCurrentPos(Vector3d pos)
PointAttachment
getCurrentPos
in class PointAttachment
pos
- used to return current point positionpublic void updateVelStates()
updateVelStates
in interface DynamicAttachment
updateVelStates
in class DynamicAttachmentBase
public void applyForces()
applyForces
in interface DynamicAttachment
applyForces
in class PointAttachment
public void mulSubGTM(MatrixBlock D, MatrixBlock M, int idx)
DynamicAttachmentBase
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
mulSubGTM
in class DynamicAttachmentBase
D
- dependent matrix associated with a master componentM
- matrix associated with a slave componentpublic void mulSubMG(MatrixBlock D, MatrixBlock M, int idx)
DynamicAttachmentBase
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
mulSubMG
in class DynamicAttachmentBase
D
- dependent matrix associated with a master componentM
- matrix associated with a slave componentpublic MatrixBlock getGT(int idx)
DynamicAttachmentBase
getGT
in interface DynamicAttachment
getGT
in class DynamicAttachmentBase
idx
- index of the master componentpublic void mulSubGT(double[] ybuf, int yoff, double[] xbuf, int xoff, int idx)
DynamicAttachmentBase
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
mulSubGT
in class DynamicAttachmentBase
ybuf
- buffer into which to store resultyoff
- offset into ybufxbuf
- buffer containing right hand side vectorxoff
- offset into xbufidx
- master component indexpublic void writeItems(java.io.PrintWriter pw, NumberFormat fmt, CompositeComponent ancestor) throws java.io.IOException
writeItems
in class PointAttachment
java.io.IOException
public void updateAttachment()
DynamicAttachmentBase
updateAttachment
in interface DynamicAttachment
updateAttachment
in class DynamicAttachmentBase
public void addMassToMasters()
addMassToMasters
in interface DynamicAttachment
addMassToMasters
in class DynamicAttachmentBase
public boolean getDerivative(double[] buf, int idx)
getDerivative
in interface DynamicAttachment
getDerivative
in class DynamicAttachmentBase
public PointParticleAttachment copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
CopyableComponent
COPY_REFERENCES
is set in flags
, then any component referenced
by this component should itself be set to a copy. This
should be done first checking copyMap
for an
existing copy of the referenced component. If there is no existing
copy, then a copy should be created by calling copy
recursively and adding the new copy to copyMap
.copy
in interface DynamicAttachmentComp
copy
in interface CopyableComponent
copy
in class PointAttachment
flags
- flags to control the copyingcopyMap
- map to possible existing instances of referenced
components