public class JointCoordinateCoupling extends ConstrainerBase implements BodyConstrainer
ModelComponent.FilePathSaveType, ModelComponent.NavpanelVisibilityenforceUniqueCompositeNames, enforceUniqueNames, myNumber, myProps, NULL_OBJ, useCompactPathNames| Constructor and Description |
|---|
JointCoordinateCoupling() |
JointCoordinateCoupling(java.util.List<JointCoordinateHandle> coords,
Diff1FunctionNx1 fxn) |
JointCoordinateCoupling(java.lang.String name,
java.util.List<JointCoordinateHandle> coords,
Diff1FunctionNx1 fxn) |
| Modifier and Type | Method and Description |
|---|---|
int |
addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb)
Appends the current bilateral force constraint matrix
Gc^T to the
matrix GT, by appending block columns to it. |
int |
addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb,
int[] solveIndexMap)
Implementation of
Constrainer.addBilateralConstraints(SparseBlockMatrix,VectorNd,int) that allows the
block row positions in GT to be reassigned vis a solve matrix
map. |
int |
addUnilateralConstraints(SparseBlockMatrix NT,
VectorNd dn,
int numu,
int[] solveIndexMap)
Implementation of
Constrainer.addUnilateralConstraints(SparseBlockMatrix,VectorNd,int) that allows the
block row positions in NT to be reassigned vis a solve matrix
map. |
int |
getBilateralForces(VectorNd lam,
int idx)
Returns the bilateral forces that were most recently set for this
constrainer using
Constrainer.setBilateralForces(maspack.matrix.VectorNd, double, int). |
int |
getBilateralInfo(MechSystem.ConstraintInfo[] ginfo,
int idx)
Returns constraint information for each row of the bilateral
constraint system
|
void |
getBilateralSizes(VectorNi sizes)
Returns the sizes of each block column in the bilateral force constraint
matrix.
|
void |
getConstrainedComponents(java.util.HashSet<DynamicComponent> comps)
Collected all the dynamic components constrained by this constrainer.
|
java.util.ArrayList<JointCoordinateHandle> |
getCoordinateHandles()
Returns the coordinate handles used by this coupling.
|
double |
getScaleFactor() |
int |
setBilateralForces(VectorNd lam,
double s,
int idx)
Sets the bilateral forces that were computed to enforce this
constraint.
|
void |
setScaleFactor(double s) |
double |
updateConstraints(double t,
int flags)
Updates the current set of constraints, and returns the maximum
penetration
> 0 associated with all of them. |
void |
updateCoordinateValue()
Explicitly update the coordinate value associated with this coupling,
based on the current value of the independent coordinates.
|
void |
zeroForces()
Zeros all bilateral and unilateral constraint forces in this constraint.
|
addFrictionConstraints, addUnilateralConstraints, getFrictionForces, getFrictionState, getState, getUnilateralForces, getUnilateralInfo, getUnilateralSizes, getUnilateralState, hasState, maxFrictionConstraintSets, setFrictionForces, setFrictionState, setState, setUnilateralForces, setUnilateralStatecheckFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, copy, createTempFlag, disconnectFromHierarchy, getAllPropertyInfo, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, 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, waitaddFrictionConstraints, addUnilateralConstraints, getFrictionForces, getFrictionState, getUnilateralForces, getUnilateralInfo, getUnilateralSizes, getUnilateralState, maxFrictionConstraintSets, setFrictionForces, setFrictionState, setUnilateralForces, setUnilateralStateadvanceState, getAuxVarDerivative, getAuxVarState, getStateVersion, numAuxVars, requiresAdvance, setAuxVarStatepublic JointCoordinateCoupling()
public JointCoordinateCoupling(java.util.List<JointCoordinateHandle> coords, Diff1FunctionNx1 fxn)
public JointCoordinateCoupling(java.lang.String name,
java.util.List<JointCoordinateHandle> coords,
Diff1FunctionNx1 fxn)
public double getScaleFactor()
public void setScaleFactor(double s)
public void getBilateralSizes(VectorNi sizes)
Constrainersizes.getBilateralSizes in interface ConstrainergetBilateralSizes in class ConstrainerBasesizes - vector to which the block column sizes are appendedpublic void updateCoordinateValue()
public java.util.ArrayList<JointCoordinateHandle> getCoordinateHandles()
public int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb)
Gc^T to the
matrix GT, by appending block columns to it. If the argument
dg is non-null, it should be used to return the
velocity constraint time derivative, defined by
\dot Gc velstarting at the location
numb. In all cases, the method must
return an updated value of numb, incremented by the total row
size of Gc.addBilateralConstraints in interface ConstraineraddBilateralConstraints in class ConstrainerBaseGT - matrix to which the bilateral force contraint matrix
is appended.dg - if non-null, returns the velocity constraint time
derivativenumb - starting index for time derivative in dgnumbpublic int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb, int[] solveIndexMap)
Constrainer.addBilateralConstraints(SparseBlockMatrix,VectorNd,int) that allows the
block row positions in GT to be reassigned vis a solve matrix
map. This enables the creation of constrained system equations for model
component subsets.addBilateralConstraints in interface BodyConstrainerGT - matrix to which the bilateral force contraint matrix
is appended.dg - if non-null, returns the velocity constraint time
derivativenumb - starting index for time derivative in dgsolveIndexMap - if non-null, maps the solve indices of the
constrained components onto the block-row indices of GT.numbpublic int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo, int idx)
ConstrainerGc vel = 0.This information is placed in pre-allocated
MechSystem.ConstraintInfo
structures in ginfo, starting at idx. The method must
return an updated value of idx, incremented by the number of
rows of Gc.
The constraint information to be set in ConstraintInfo includes:
dist // distance to the constraint surface. compliance // if > 0, gives constraint compliance value damping // damping; only used if compliance > 0 force // used for computing non-linear compliance
getBilateralInfo in interface ConstrainergetBilateralInfo in class ConstrainerBaseginfo - returns the constraint informationidx - starting location in ginfo for returning constraint
infoidxpublic int setBilateralForces(VectorNd lam, double s, int idx)
Constrainerlam, starting at the index idx, and should be
scaled by s. (In practice, s is used to convert from
impulses to forces.) The method must return an updated value of idx, incremented by the number of forces associated with this constraint.setBilateralForces in interface ConstrainersetBilateralForces in class ConstrainerBaselam - supplies the force impulses, which should be scaled by ss - scaling factor for the force valuesidx - starting index of forces in lamidxpublic int getBilateralForces(VectorNd lam, int idx)
ConstrainerConstrainer.setBilateralForces(maspack.matrix.VectorNd, double, int). The forces are returned in
lam, starting at the index idx. The method must return
an updated value of idx, incremented by the number of forces
associated with this constraint.getBilateralForces in interface ConstrainergetBilateralForces in class ConstrainerBaselam - returns the forcesidx - starting index for forces in lamidxpublic int addUnilateralConstraints(SparseBlockMatrix NT, VectorNd dn, int numu, int[] solveIndexMap)
Constrainer.addUnilateralConstraints(SparseBlockMatrix,VectorNd,int) that allows the
block row positions in NT to be reassigned vis a solve matrix
map. This enables the creation of constrained system equations for model
component subsets.addUnilateralConstraints in interface BodyConstrainerNT - matrix to which the bilateral force contraint matrix
is appended.dn - if non-null, returns the velocity constraint time
derivativenumu - starting index for time derivative in dgsolveIndexMap - if non-null, maps the solve indices of the
constrained components onto the block-row indices of NT.numbpublic void zeroForces()
ConstrainerzeroForces in interface ConstrainerzeroForces in class ConstrainerBasepublic double updateConstraints(double t,
int flags)
Constrainer> 0 associated with all of them. If no constraints are
presently active, returns -1.updateConstraints in interface ConstrainerupdateConstraints in class ConstrainerBasepublic void getConstrainedComponents(java.util.HashSet<DynamicComponent> comps)
ConstrainergetConstrainedComponents in interface ConstrainergetConstrainedComponents in class ConstrainerBasecomps - set to which constrained components should be added