public class PointParticleAttachment extends PointAttachment implements ContactMaster
ModelComponent.FilePathSaveType, ModelComponent.NavpanelVisibilityenforceUniqueCompositeNames, enforceUniqueNames, myNumber, myProps, NULL_OBJ, useCompactPathNamesCOPY_REFERENCES, REST_POSITION| Constructor and Description |
|---|
PointParticleAttachment() |
PointParticleAttachment(Particle master,
Point slave) |
| Modifier and Type | Method and Description |
|---|---|
void |
add1DConstraintBlocks(SparseBlockMatrix GT,
int bj,
double scale,
ContactPoint cpnt,
Vector3d dir)
Adds blocks to the constraint matrix GT to implement a 1D constraint in a
specified direction.
|
void |
add2DConstraintBlocks(SparseBlockMatrix GT,
int bj,
double scale,
ContactPoint cpnt,
Vector3d dir0,
Vector3d dir1)
Adds blocks to the constraint matrix GT to implement a 2D constraint in
two specified directions.
|
void |
addMassToMasters() |
void |
addRelativeVelocity(Vector3d vel,
double scale,
ContactPoint cpnt)
Accumulate the velocity at the contact due to the current
velocity of the underlying dynamic components.
|
void |
applyForces() |
int |
collectMasterComponents(java.util.HashSet<DynamicComponent> masters,
boolean activeOnly)
Collects all the underlying dynamic ``master'' components.
|
void |
computeForceOnMasters(VectorNd uvec,
Vector3d fc,
double scale,
ContactPoint cpnt,
SparseBlockMatrix S)
XXX Experimental XXX
Compute the forces on the masters resulting from a force
fc applied at the contact point, and accumulate them in uvec,
whose size should equal that of the system forces.
|
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() |
boolean |
isControllable()
Queries whether at least one of the underlying dynamic components is
controllable.
|
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, checkMasterBlocks, getCopyReferences, getMasters, getPoint, getSlave, invalidateMasters, isDuplicatable, notifyMastersOfPositionChange, numMastersaddBackRefs, addBackRefs, addConnectedMasterRefs, clone, connectAttachment, connectToHierarchy, disconnectFromHierarchy, getAttachment, getHardReferences, oneMasterActive, oneMasterNotAttached, removeBackRefs, removeBackRefs, removeConnectedMasterRefs, setSlaveAffectsStiffness, slaveAffectsStiffnesscheckFlag, 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, waitconnectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferencesgetAllPropertyInfo, getPropertygetChildren, hasChildrenpostscanisWritable, writepublic Particle getParticle()
public void setParticle(Particle particle)
public void updatePosStates()
updatePosStates in interface DynamicAttachmentupdatePosStates in class DynamicAttachmentBasepublic void getCurrentPos(Vector3d pos)
PointAttachmentgetCurrentPos in class PointAttachmentpos - used to return current point positionpublic void updateVelStates()
updateVelStates in interface DynamicAttachmentupdateVelStates in class DynamicAttachmentBasepublic void applyForces()
applyForces in interface DynamicAttachmentapplyForces in class PointAttachmentpublic void mulSubGTM(MatrixBlock D, MatrixBlock M, int idx)
DynamicAttachmentBase
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 DynamicAttachmentmulSubGTM in class DynamicAttachmentBaseD - dependent matrix associated with a master componentM - matrix associated with a slave componentpublic void mulSubMG(MatrixBlock D, MatrixBlock M, int idx)
DynamicAttachmentBaseD -= 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 DynamicAttachmentmulSubMG in class DynamicAttachmentBaseD - dependent matrix associated with a master componentM - matrix associated with a slave componentpublic MatrixBlock getGT(int idx)
DynamicAttachmentBasegetGT in interface DynamicAttachmentgetGT in class DynamicAttachmentBaseidx - index of the master componentpublic void mulSubGT(double[] ybuf,
int yoff,
double[] xbuf,
int xoff,
int idx)
DynamicAttachmentBase
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 DynamicAttachmentmulSubGT in class DynamicAttachmentBaseybuf - 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 PointAttachmentjava.io.IOExceptionpublic void updateAttachment()
DynamicAttachmentBaseupdateAttachment in interface DynamicAttachmentupdateAttachment in class DynamicAttachmentBasepublic void addMassToMasters()
addMassToMasters in interface DynamicAttachmentaddMassToMasters in class DynamicAttachmentBasepublic boolean getDerivative(double[] buf,
int idx)
getDerivative in interface DynamicAttachmentgetDerivative in class DynamicAttachmentBasepublic PointParticleAttachment copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
CopyableComponentCOPY_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 DynamicAttachmentCompcopy in interface CopyableComponentcopy in class PointAttachmentflags - flags to control the copyingcopyMap - map to possible existing instances of referenced
componentspublic void add1DConstraintBlocks(SparseBlockMatrix GT, int bj, double scale, ContactPoint cpnt, Vector3d dir)
ContactMasterbj,
while the block row(s) are determined internally by the solve indices of
the underlying dynamic components.add1DConstraintBlocks in interface ContactMasterGT - constraint matrixbj - block column indexscale - TODOcpnt - contact pointdir - friction directionpublic void add2DConstraintBlocks(SparseBlockMatrix GT, int bj, double scale, ContactPoint cpnt, Vector3d dir0, Vector3d dir1)
ContactMasterbj, while the block row(s) are determined internally
by the solve indices of the underlying dynamic components.add2DConstraintBlocks in interface ContactMasterGT - constraint matrixbj - block column indexscale - TODOcpnt - contact pointdir0 - first friction directiondir1 - second friction directionpublic void addRelativeVelocity(Vector3d vel, double scale, ContactPoint cpnt)
ContactMasteraddRelativeVelocity in interface ContactMastervel - accumulates velocityscale - TODOcpnt - contact pointpublic void computeForceOnMasters(VectorNd uvec, Vector3d fc, double scale, ContactPoint cpnt, SparseBlockMatrix S)
ContactMastercomputeForceOnMasters in interface ContactMasterpublic boolean isControllable()
ContactMasterisControllable in interface ContactMastertrue if at least one dynamic component is
controllablepublic int collectMasterComponents(java.util.HashSet<DynamicComponent> masters, boolean activeOnly)
ContactMastermasters, i.e., the number of components that were not already present
there.collectMasterComponents in interface ContactMastermasters - set to which the dynamic components should be addedactiveOnly - restrict collected components to those which are active