artisynth.core.mechmodels
Class ConstrainerBase
java.lang.Object
artisynth.core.modelbase.ModelComponentBase
artisynth.core.modelbase.RenderableComponentBase
artisynth.core.mechmodels.ConstrainerBase
- All Implemented Interfaces:
- Constrainer, HasAuxState, ModelComponent, RenderableComponent, java.lang.Cloneable, HasProperties, HierarchyNode, GLRenderable, GLSelectable, HasRenderProps, Renderable, Scannable
- Direct Known Subclasses:
- CollisionHandler, ParticleMeshConstraint, ParticlePlaneConstraint
public abstract class ConstrainerBase
- extends RenderableComponentBase
- implements Constrainer, HasAuxState
Method Summary |
abstract int |
addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb,
IntHolder changeCnt)
|
int |
addFrictionConstraints(SparseBlockMatrix DT,
MechSystem.FrictionInfo[] finfo,
int idx)
|
int |
addUnilateralConstraints(SparseBlockMatrix NT,
VectorNd dn,
int numu,
IntHolder changeCnt)
|
void |
advanceAuxState(double t0,
double t1)
Called at the very beginning of the time step (in the system's
preadvance() method) to perform any required updating of the component's
state before the application in input probes or controllers. |
void |
getAuxState(DataBuffer data)
Saves state information for this component by adding data to the
supplied DataBuffer. |
abstract int |
getBilateralImpulses(VectorNd lam,
int idx)
|
abstract int |
getBilateralInfo(MechSystem.ConstraintInfo[] ginfo,
int idx)
|
abstract void |
getBilateralSizes(VectorNi sizes)
|
void |
getInitialAuxState(DataBuffer newData,
DataBuffer oldData)
Saves initial state information data for this component by adding data
to the supplied data buffer. |
int |
getUnilateralImpulses(VectorNd the,
int idx)
|
int |
getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo,
int idx)
|
void |
getUnilateralSizes(VectorNi sizes)
|
boolean |
hasState()
Returns true if this component has state. |
int |
maxFrictionConstraintSets()
|
void |
setAuxState(DataBuffer data)
Restores the state for this component by reading from the supplied
data buffer, starting at the current buffer offsets. |
abstract int |
setBilateralImpulses(VectorNd lam,
double h,
int idx)
|
int |
setUnilateralImpulses(VectorNd the,
double h,
int idx)
|
void |
skipAuxState(DataBuffer data)
Skips over the state information for this component contained
in the supplied data buffer, starting at the current buffer offsets. |
abstract double |
updateConstraints(double t,
int flags)
|
abstract void |
zeroImpulses()
|
Methods inherited from class artisynth.core.modelbase.RenderableComponentBase |
copy, createRenderProps, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, prerender, render, setRenderProps, updateBounds, updateRenderProps |
Methods inherited from class artisynth.core.modelbase.ModelComponentBase |
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getAllPropertyInfo, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, write |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface artisynth.core.modelbase.ModelComponent |
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences |
ConstrainerBase
public ConstrainerBase()
getBilateralSizes
public abstract void getBilateralSizes(VectorNi sizes)
- Specified by:
getBilateralSizes
in interface Constrainer
addBilateralConstraints
public abstract int addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb,
IntHolder changeCnt)
- Specified by:
addBilateralConstraints
in interface Constrainer
getBilateralInfo
public abstract int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo,
int idx)
- Specified by:
getBilateralInfo
in interface Constrainer
setBilateralImpulses
public abstract int setBilateralImpulses(VectorNd lam,
double h,
int idx)
- Specified by:
setBilateralImpulses
in interface Constrainer
getBilateralImpulses
public abstract int getBilateralImpulses(VectorNd lam,
int idx)
- Specified by:
getBilateralImpulses
in interface Constrainer
zeroImpulses
public abstract void zeroImpulses()
- Specified by:
zeroImpulses
in interface Constrainer
getUnilateralSizes
public void getUnilateralSizes(VectorNi sizes)
- Specified by:
getUnilateralSizes
in interface Constrainer
addUnilateralConstraints
public int addUnilateralConstraints(SparseBlockMatrix NT,
VectorNd dn,
int numu,
IntHolder changeCnt)
- Specified by:
addUnilateralConstraints
in interface Constrainer
getUnilateralInfo
public int getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo,
int idx)
- Specified by:
getUnilateralInfo
in interface Constrainer
setUnilateralImpulses
public int setUnilateralImpulses(VectorNd the,
double h,
int idx)
- Specified by:
setUnilateralImpulses
in interface Constrainer
getUnilateralImpulses
public int getUnilateralImpulses(VectorNd the,
int idx)
- Specified by:
getUnilateralImpulses
in interface Constrainer
maxFrictionConstraintSets
public int maxFrictionConstraintSets()
- Specified by:
maxFrictionConstraintSets
in interface Constrainer
addFrictionConstraints
public int addFrictionConstraints(SparseBlockMatrix DT,
MechSystem.FrictionInfo[] finfo,
int idx)
- Specified by:
addFrictionConstraints
in interface Constrainer
updateConstraints
public abstract double updateConstraints(double t,
int flags)
- Specified by:
updateConstraints
in interface Constrainer
advanceAuxState
public void advanceAuxState(double t0,
double t1)
- Description copied from interface:
HasAuxState
- Called at the very beginning of the time step (in the system's
preadvance() method) to perform any required updating of the component's
state before the application in input probes or controllers. If no
such updating is required, this method may do nothing.
- Specified by:
advanceAuxState
in interface HasAuxState
- Parameters:
t0
- beginning time associated with the time step advancet1
- end time associated with the time step advance
skipAuxState
public void skipAuxState(DataBuffer data)
- Skips over the state information for this component contained
in the supplied data buffer, starting at the current buffer offsets.
Essentially this a dummy read; the buffer offsets should
be advanced over the state information, but that information
should not actually be stored in the component.
- Specified by:
skipAuxState
in interface HasAuxState
- Parameters:
data
- buffer containing the state information
getAuxState
public void getAuxState(DataBuffer data)
- Description copied from interface:
HasAuxState
- Saves state information for this component by adding data to the
supplied DataBuffer. Existing data in the buffer should not be disturbed.
- Specified by:
getAuxState
in interface HasAuxState
- Parameters:
data
- buffer for storing the state values.
getInitialAuxState
public void getInitialAuxState(DataBuffer newData,
DataBuffer oldData)
- Description copied from interface:
HasAuxState
- Saves initial state information data for this component by adding data
to the supplied data buffer. Existing data in the buffer should not
be disturbed.
If oldData
is non-null, then this contains
previously stored initial state information (starting at its current
buffer offsets), which should be stored into
newData
in place of the current component state data.
This may only be partially possible if the component's state structure
has changed since oldData
was written.
- Specified by:
getInitialAuxState
in interface HasAuxState
- Parameters:
newData
- buffer for storing the state values.oldData
- if non-null, contains old state information that should be
written into newData
in place of the current state
information.
setAuxState
public void setAuxState(DataBuffer data)
- Description copied from interface:
HasAuxState
- Restores the state for this component by reading from the supplied
data buffer, starting at the current buffer offsets.
- Specified by:
setAuxState
in interface HasAuxState
- Parameters:
data
- buffer containing the state information
hasState
public boolean hasState()
- Returns true if this component has state. Structure change events involving
components that have state will cause the current state history of
of the system to be cleared.
- Specified by:
hasState
in interface ModelComponent
- Overrides:
hasState
in class ModelComponentBase