public class PointFem3dAttachment extends PointAttachment
ModelComponent.NavpanelVisibility
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, myProps, NULL_OBJ, useCompactPathNames
COPY_REFERENCES
Constructor and Description |
---|
PointFem3dAttachment() |
PointFem3dAttachment(Point pnt) |
PointFem3dAttachment(Point pnt,
FemElement elem) |
PointFem3dAttachment(Point pnt,
FemNode[] nodes) |
PointFem3dAttachment(Point pnt,
FemNode[] nodes,
double[] coords) |
Modifier and Type | Method and Description |
---|---|
void |
addMassToMaster(MatrixBlock mblk,
MatrixBlock sblk,
int idx) |
void |
addScaledExternalForce(Point3d pnt,
double s,
Vector3d f)
Distributes an external force applied at a particular point
to all masters
|
int |
addTargetJacobian(SparseBlockMatrix J,
int bi) |
void |
applyForces() |
void |
computeNodeCoordinates() |
void |
computePosState(Vector3d pos) |
void |
connectToHierarchy()
Update the attachment position state whenever we connect to the parent
(i.e., plug in to the hierarchy).
|
PointFem3dAttachment |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component.
|
static PointFem3dAttachment |
create(Point pnt,
FemElement3d elem,
Point3d loc,
double reduceTol)
Create an attachment that connects a point to a FemElement.
|
void |
disconnectFromHierarchy()
Called by the system after this component is removed from the component
hierarchy (i.e., when it is removed as a child of its parent).
|
VectorNd |
getCoordinates() |
boolean |
getDerivative(double[] buf,
int idx) |
void |
getHardReferences(java.util.List<ModelComponent> refs)
Appends all hard references for this component to a list.
|
FemNode[] |
getMasters() |
void |
getRestPosition(Point3d pos) |
void |
mulSubG(MatrixBlock depBlk,
MatrixBlock blk,
int idx)
Computes
|
void |
mulSubGT(double[] ybuf,
int yoff,
double[] xbuf,
int xoff,
int idx)
Computes
|
void |
mulSubGT(MatrixBlock depBlk,
MatrixBlock blk,
int idx)
Computes
|
int |
numMasters() |
void |
setFromElement(FemElement elem)
Sets the element associated with this attachment.
|
void |
setNodes(java.util.Collection<FemNode> nodes,
java.util.Collection<java.lang.Double> coords) |
void |
setNodes(FemNode[] nodes,
double[] coords) |
void |
setPoint(Point pnt) |
void |
transformSlaveGeometry(AffineTransform3dBase X,
TransformableGeometry topObject,
int flags) |
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) |
getCopyReferences, getPoint, getSlave, getSlaveSolveIndex, isDuplicatable
addAttachmentJacobian, addSolveBlocks, clone, containsLoop, containsLoops, containsMaster, createOrderedList, reduceConstraints, reduceMass, reduceRowMatrix
checkFlag, checkName, checkNameUniqueness, clearFlag, createTempFlag, getAllPropertyInfo, getChildren, getGrandParent, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getAllPropertyInfo, getProperty
getChildren, hasChildren
isWritable, write
public PointFem3dAttachment()
public PointFem3dAttachment(Point pnt)
public PointFem3dAttachment(Point pnt, FemElement elem)
public void setPoint(Point pnt)
public FemNode[] getMasters()
getMasters
in class DynamicAttachment
public int numMasters()
numMasters
in class DynamicAttachment
public void addScaledExternalForce(Point3d pnt, double s, Vector3d f)
PointAttachment
addScaledExternalForce
in class PointAttachment
pnt
- point at which to apply the force (to be used to compute a wrench)s
- force scale factorf
- force vector to applypublic void setNodes(java.util.Collection<FemNode> nodes, java.util.Collection<java.lang.Double> coords)
public void setNodes(FemNode[] nodes, double[] coords)
public void setFromElement(FemElement elem)
updateAttachment
public VectorNd getCoordinates()
public void updatePosStates()
updatePosStates
in class DynamicAttachment
public void computePosState(Vector3d pos)
computePosState
in class PointAttachment
public void updateVelStates()
updateVelStates
in class DynamicAttachment
public void updateAttachment()
updateAttachment
in class DynamicAttachment
public void applyForces()
applyForces
in class DynamicAttachment
public void getRestPosition(Point3d pos)
public void mulSubGT(MatrixBlock depBlk, MatrixBlock blk, int idx)
DynamicAttachment
T D -= G Bwhere D and B are matrices associated with master and slave components, respectively, and G is the constraint matrix for the attachment.
depBlk
- dependent matrix associated with a master componentblk
- matrix associated with a slave componentpublic void mulSubG(MatrixBlock depBlk, MatrixBlock blk, int idx)
DynamicAttachment
D -= B Gwhere D and B are matrices associated with master and slave components, respectively, and G is the constraint matrix for the attachment.
depBlk
- dependent matrix associated with a master componentblk
- matrix associated with a slave componentpublic void mulSubGT(double[] ybuf, int yoff, double[] xbuf, int xoff, int idx)
DynamicAttachment
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 indexpublic void writeItems(java.io.PrintWriter pw, NumberFormat fmt, CompositeComponent ancestor) throws java.io.IOException
writeItems
in class PointAttachment
java.io.IOException
public void transformSlaveGeometry(AffineTransform3dBase X, TransformableGeometry topObject, int flags)
transformSlaveGeometry
in class DynamicAttachment
public int addTargetJacobian(SparseBlockMatrix J, int bi)
public void computeNodeCoordinates()
public static PointFem3dAttachment create(Point pnt, FemElement3d elem, Point3d loc, double reduceTol)
loc
.pnt
- Point to be attachedelem
- FemElement3d to attach the point toloc
- point location with respect to the element. If null
,
will be assumed to be pnt.getPosition().reduceTol
- try to reduce the number of attached nodes by
removing those whose coordinate values are less then this number.
A value of zero ensures no reduction. If reduction is desired,
a value around 1e-5 is reasonable.public void addMassToMaster(MatrixBlock mblk, MatrixBlock sblk, int idx)
addMassToMaster
in class DynamicAttachment
public boolean getDerivative(double[] buf, int idx)
getDerivative
in class DynamicAttachment
public void connectToHierarchy()
DynamicAttachment
connectToHierarchy
in interface ModelComponent
connectToHierarchy
in class DynamicAttachment
public void disconnectFromHierarchy()
ModelComponentBase
When this
method is called, ModelComponent.getParent()
will still return this original
parent component; the system will set this to null
after.
disconnectFromHierarchy
in interface ModelComponent
disconnectFromHierarchy
in class ModelComponentBase
public void getHardReferences(java.util.List<ModelComponent> refs)
ModelComponentBase
getHardReferences
in interface ModelComponent
getHardReferences
in class ModelComponentBase
refs
- list to which hard references are appendedpublic PointFem3dAttachment 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 CopyableComponent
copy
in class PointAttachment