artisynth.core.femmodels
Class FemModel

java.lang.Object
  extended by artisynth.core.modelbase.ModelComponentBase
      extended by artisynth.core.modelbase.ComponentList<ModelComponent>
          extended by artisynth.core.modelbase.ModelBase
              extended by artisynth.core.modelbase.RenderableModelBase
                  extended by artisynth.core.mechmodels.MechSystemBase
                      extended by artisynth.core.femmodels.FemModel
All Implemented Interfaces:
Constrainer, ForceEffector, HasSlaveObjects, MechSystem, MechSystemModel, ComponentChangeListener, ComponentListView<ModelComponent>, CompositeComponent, HasState, IndexedComponentList, Model, ModelComponent, MutableCompositeComponent<ModelComponent>, ParameterizedClass, RenderableComponent, PropertyChangeListener, ScalableUnits, TransformableGeometry, java.lang.Cloneable, java.lang.Iterable<ModelComponent>, java.util.Collection<ModelComponent>, HasProperties, HierarchyNode, GLRenderable, GLSelectable, HasRenderProps, Renderable, Disposable, ListView<ModelComponent>, Scannable
Direct Known Subclasses:
FemModel3d, MFreeModel3d

public abstract class FemModel
extends MechSystemBase
implements TransformableGeometry, ScalableUnits, Constrainer, ForceEffector, PropertyChangeListener, HasSlaveObjects


Nested Class Summary
static class FemModel.ElementFilter
           
static class FemModel.IncompMethod
           
static class FemModel.Ranging
           
static class FemModel.SurfaceRender
           
 
Nested classes/interfaces inherited from interface artisynth.core.modelbase.ModelComponent
ModelComponent.NavpanelVisibility
 
Nested classes/interfaces inherited from interface artisynth.core.mechmodels.MechSystem
MechSystem.ConstraintInfo, MechSystem.FrictionInfo
 
Nested classes/interfaces inherited from interface artisynth.core.modelbase.CompositeComponent
CompositeComponent.NavpanelDisplay
 
Field Summary
static PropertyList myProps
           
 
Fields inherited from class artisynth.core.mechmodels.MechSystemBase
myParametricsInSystemMatrix
 
Fields inherited from class artisynth.core.modelbase.ComponentList
DEFAULT_NAVPANEL_DISPLAY
 
Fields inherited from class artisynth.core.modelbase.ModelComponentBase
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
 
Fields inherited from interface artisynth.core.util.TransformableGeometry
ARTICULATED, SIMULATING
 
Fields inherited from interface artisynth.core.mechmodels.MechSystem
COMPUTE_CONTACTS, UPDATE_CONTACTS
 
Fields inherited from interface maspack.render.GLRenderable
TRANSLUCENT, TWO_DIMENSIONAL
 
Constructor Summary
FemModel(java.lang.String name)
           
 
Method Summary
 int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb, IntHolder changeCnt)
           
 int addFrictionConstraints(SparseBlockMatrix DT, MechSystem.FrictionInfo[] finfo, int numf)
           
 void addMarker(FemMarker mkr, FemElement elem)
           
 void addMarker(FemMarker mkr, FemElement elem, int markerId)
           
abstract  void addSolveBlocks(SparseNumberedBlockMatrix M)
          Adds any needed blocks to a solve matrix in order to accomodate the Jacobian terms associated with this force effector.
 int addUnilateralConstraints(SparseBlockMatrix NT, VectorNd dn, int numu, IntHolder changeCnt)
           
 void applyForces(double t)
          Adds forces to the components affected by this force effector at a particular time.
 ComponentList<DynamicAttachment> attachments()
           
 void attachPoint(Point p, FemNode[] nodes, double[] coords)
           
 DynamicMechComponent checkVelocityStability()
          Checks the velocity stability of this system.
 void clear()
           
 FemModel copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
           
static FemMaterial createDefaultMaterial()
           
 void detachAllNodes()
           
 boolean detachPoint(Point p)
           
 boolean forcesNeedUpdating()
           
 PropertyList getAllPropertyInfo()
          Returns a list giving static information about all properties exported by this object.
 void getAttachments(java.util.List<DynamicAttachment> list, int level)
           
 int getBilateralImpulses(VectorNd lam, int idx)
           
 int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo, int idx)
           
 void getBilateralSizes(VectorNi sizes)
           
 double getCharacteristicSize()
           
 void getCollidables(java.util.List<Collidable> list)
           
 void getConstrainers(java.util.List<Constrainer> constrainers, int level)
           
 double getDensity()
           
 PropertyMode getDensityMode()
           
 void getDynamicComponents(java.util.List<DynamicMechComponent> active, java.util.List<DynamicMechComponent> attached, java.util.List<DynamicMechComponent> parametric)
           
abstract  FemElement getElement(int idx)
           
abstract  ComponentList<? extends FemElement> getElements()
           
 double getEnergy()
           
 void getForceEffectors(java.util.List<ForceEffector> forceEffectors, int level)
           
 Vector3d getGravity()
           
 PropertyMode getGravityMode()
           
 int getImplicitIterations()
           
 double getImplicitPrecision()
           
 MechSystemSolver.Integrator getIntegrator()
           
 int getJacobianType()
          Returns a code indicating the matrix type that results when the Jacobian terms of this force effector are added to the solve matrix.
 double getMass()
           
 FemMaterial getMaterial()
           
 MechSystemSolver.MatrixSolver getMatrixSolver()
           
abstract  FemNode getNode(int idx)
           
 double getNodeMass()
           
abstract  PointList<? extends FemNode> getNodes()
           
 int getNumInverted()
           
 double getParticleDamping()
           
 double getRestVolume()
           
 void getSlaveObjectComponents(java.util.List<HasSlaveObjects> comps, int level)
          Should be overridden in subclasses to return all the HasSlaveObjects ' components within this model.
 double getStiffnessDamping()
           
 DoubleInterval getStressPlotRange()
           
 PropertyMode getStressPlotRangeMode()
           
 FemModel.Ranging getStressPlotRanging()
           
 PropertyMode getStressPlotRangingMode()
           
 FemModel.SurfaceRender getSurfaceRendering()
           
 PropertyMode getSurfaceRenderingMode()
           
 IterativeSolver.ToleranceType getToleranceType()
           
 int getUnilateralImpulses(VectorNd the, int idx)
           
 int getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo, int idx)
           
 void getUnilateralSizes(VectorNi sizes)
           
 double getVolume()
           
 boolean hasState()
          Returns true if this component has state.
 void invalidateRestData()
           
 void invalidateStressAndStiffness()
           
 boolean isProfile()
           
 RenderableComponentList<FemMarker> markers()
           
 int maxFrictionConstraintSets()
          Returns that maximum number of friction constraint set that may be added by the method getFrictionConstraints().
 int numElements()
           
 int numNodes()
           
 void propertyChanged(PropertyChangeEvent e)
           
 void recursivelyInitialize(double t, int level)
           
 boolean removeMarker(FemMarker mkr)
           
 void render(GLRenderer renderer, int flags)
          Render this object using Open GL via the JOGL.
 void resetStressPlotRange()
           
 void scaleDistance(double s)
          Scales all distance coordinates.
 void scaleMass(double s)
          Scales all mass units.
 int setBilateralImpulses(VectorNd lam, double h, int idx)
           
 void setBounds(Point3d pmin, Point3d pmax)
           
 void setDensity(double p)
           
 void setDensityMode(PropertyMode mode)
           
 void setGravity(double gx, double gy, double gz)
           
 void setGravity(Vector3d g)
           
 void setGravityMode(PropertyMode mode)
           
 void setImplicitIterations(int max)
           
 void setImplicitPrecision(double prec)
           
 void setIntegrator(MechSystemSolver.Integrator method)
           
 void setLinearMaterial(double E, double nu, boolean corotated)
           
 void setMaterial(FemMaterial mat)
           
 void setMatrixSolver(MechSystemSolver.MatrixSolver method)
           
 void setMaxStepSize(double sec)
          Sets the maximum step size by which this model should be advanced within a simulation loop.
 void setParticleDamping(double d)
           
 void setProfile(boolean profile)
           
 void setStiffnessDamping(double d)
           
 void setStressPlotRange(DoubleInterval range)
           
 void setStressPlotRangeMode(PropertyMode mode)
           
 void setStressPlotRanging(FemModel.Ranging ranging)
           
 void setStressPlotRangingMode(PropertyMode mode)
           
 void setSurfaceRendering(FemModel.SurfaceRender mode)
           
 void setSurfaceRenderingMode(PropertyMode mode)
           
 void setToleranceType(IterativeSolver.ToleranceType type)
           
 int setUnilateralImpulses(VectorNd the, double h, int idx)
           
 void updateBounds(Point3d pmin, Point3d pmax)
          Update the minimum and maximum points for this object.
 double updateConstraints(double t, int flags)
           
 double updateRestVolume()
           
 void updateSlavePos()
          Called when the system's dynamic position state changes, to update the position state of the slave objects.
 void updateSlaveVel()
          Called when the system's dynamic velocity state changes, to update the velocity state of the slave objects.
 double updateVolume()
           
 java.lang.Object validateMatrixSolver(MechSystemSolver.MatrixSolver method, StringHolder errMsg)
           
 void zeroExternalForces()
           
 void zeroImpulses()
           
 
Methods inherited from class artisynth.core.mechmodels.MechSystemBase
addActivePosImpulse, addAttachmentJacobian, addAttachmentSolveBlocks, addGeneralSolveBlocks, addPosJacobian, addVelJacobian, applyAttachmentForces, buildMassMatrix, buildSolveMatrix, createState, createVelocityJacobian, getActiveForces, getActivePosDerivative, getActivePosState, getActivePosStateSize, getActiveStiffness, getActiveVelState, getActiveVelState, getActiveVelStateSize, getAttachmentConstraints, getAttachmentDerivatives, getAuxState, getBilateralConstraints, getBilateralConstraintSizes, getBilateralImpulses, getBilateralInfo, getDefaultStabilization, getDynamicsEnabled, getFrictionConstraints, getInitialState, getInverseMassMatrix, getMassMatrix, getNumBilateralImpulses, getNumUnilateralImpulses, getParametricForces, getParametricPosState, getParametricPosStateSize, getParametricPosTarget, getParametricVelState, getParametricVelStateSize, getParametricVelTarget, getPenetrationLimit, getSolveMatrixType, getSolver, getStabilization, getState, getStructureVersion, getUnilateralConstraints, getUnilateralConstraintSizes, getUnilateralImpulses, getUnilateralInfo, getUpdateForcesAtStepEnd, hasParameterizedType, initialize, numActiveComponents, numAttachedComponents, numParametricComponents, preadvance, printActiveStiffness, recursivelyFinalizeAdvance, reduceVelocityJacobian, setActiveForces, setActivePosState, setActiveVelState, setAuxState, setBilateralImpulses, setDefaultStabilization, setDynamicsEnabled, setParametricForces, setParametricPosState, setParametricVelState, setPenetrationLimit, setStabilization, setState, setUnilateralImpulses, setUpdateForcesAtStepEnd, updateAttachmentPos, updateAttachmentVel, updateConstraints, updateForces, updatePosState, updateVelState, writeBilateralConstraintMatrix, writeMassMatrix, writeStiffnessMatrix
 
Methods inherited from class artisynth.core.modelbase.RenderableModelBase
createRenderProps, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, prerender, setRenderProps
 
Methods inherited from class artisynth.core.modelbase.ModelBase
advance, copy, dispose, getInitialState, getMaxStepSize, hierarchyContainsReferences, setInitialState
 
Methods inherited from class artisynth.core.modelbase.ComponentList
add, add, addAll, addComponents, addFixed, addNumbered, clone, componentChanged, contains, contains, containsAll, ensureCapacity, findComponent, get, get, getByNumber, getChildren, getNavpanelDisplay, getNumberLimit, getShortName, getTypeParameter, hasChildren, indexOf, isEmpty, iterator, nextComponentNumber, numComponents, postscan, remove, remove, removeAll, removeAll, removeComponents, retainAll, scan, setNavpanelDisplay, setNumberingStartAtOne, setShortName, size, toArray, toArray, updateNameMap
 
Methods inherited from class artisynth.core.modelbase.ModelComponentBase
checkFlag, checkName, checkNameUniqueness, clearFlag, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, 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.util.TransformableGeometry
transformGeometry, transformGeometry
 
Methods inherited from interface artisynth.core.mechmodels.ForceEffector
addPosJacobian, addVelJacobian
 
Methods inherited from interface artisynth.core.mechmodels.MechSystemModel
getAuxStateComponents, getCollidables
 
Methods inherited from interface artisynth.core.modelbase.Model
advance, dispose, getMaxStepSize
 
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
 
Methods inherited from interface maspack.properties.HasProperties
getProperty
 
Methods inherited from interface maspack.properties.HierarchyNode
getChildren, hasChildren
 
Methods inherited from interface maspack.util.Scannable
isWritable, write
 
Methods inherited from interface artisynth.core.modelbase.ComponentListView
getName
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Field Detail

myProps

public static PropertyList myProps
Constructor Detail

FemModel

public FemModel(java.lang.String name)
Method Detail

getAllPropertyInfo

public PropertyList getAllPropertyInfo()
Description copied from interface: HasProperties
Returns a list giving static information about all properties exported by this object.

Specified by:
getAllPropertyInfo in interface HasProperties
Overrides:
getAllPropertyInfo in class RenderableModelBase
Returns:
static information for all exported properties

createDefaultMaterial

public static FemMaterial createDefaultMaterial()

getMaterial

public FemMaterial getMaterial()

setMaterial

public void setMaterial(FemMaterial mat)

setLinearMaterial

public void setLinearMaterial(double E,
                              double nu,
                              boolean corotated)

setSurfaceRendering

public void setSurfaceRendering(FemModel.SurfaceRender mode)

getSurfaceRendering

public FemModel.SurfaceRender getSurfaceRendering()

setSurfaceRenderingMode

public void setSurfaceRenderingMode(PropertyMode mode)

getSurfaceRenderingMode

public PropertyMode getSurfaceRenderingMode()

getStressPlotRanging

public FemModel.Ranging getStressPlotRanging()

getStressPlotRangingMode

public PropertyMode getStressPlotRangingMode()

setStressPlotRangingMode

public void setStressPlotRangingMode(PropertyMode mode)

getStressPlotRangeMode

public PropertyMode getStressPlotRangeMode()

setStressPlotRangeMode

public void setStressPlotRangeMode(PropertyMode mode)

setStressPlotRanging

public void setStressPlotRanging(FemModel.Ranging ranging)

getStressPlotRange

public DoubleInterval getStressPlotRange()

resetStressPlotRange

public void resetStressPlotRange()

setStressPlotRange

public void setStressPlotRange(DoubleInterval range)

invalidateStressAndStiffness

public void invalidateStressAndStiffness()

invalidateRestData

public void invalidateRestData()

getGravity

public Vector3d getGravity()

setGravity

public void setGravity(Vector3d g)

setGravity

public void setGravity(double gx,
                       double gy,
                       double gz)

getGravityMode

public PropertyMode getGravityMode()

setGravityMode

public void setGravityMode(PropertyMode mode)

setParticleDamping

public void setParticleDamping(double d)

getParticleDamping

public double getParticleDamping()

setStiffnessDamping

public void setStiffnessDamping(double d)

getStiffnessDamping

public double getStiffnessDamping()

setIntegrator

public void setIntegrator(MechSystemSolver.Integrator method)

getIntegrator

public MechSystemSolver.Integrator getIntegrator()

setMatrixSolver

public void setMatrixSolver(MechSystemSolver.MatrixSolver method)

validateMatrixSolver

public java.lang.Object validateMatrixSolver(MechSystemSolver.MatrixSolver method,
                                             StringHolder errMsg)

getMatrixSolver

public MechSystemSolver.MatrixSolver getMatrixSolver()

setDensity

public void setDensity(double p)

getDensity

public double getDensity()

setDensityMode

public void setDensityMode(PropertyMode mode)

getDensityMode

public PropertyMode getDensityMode()

numNodes

public int numNodes()

getNodes

public abstract PointList<? extends FemNode> getNodes()

getNode

public abstract FemNode getNode(int idx)

getElements

public abstract ComponentList<? extends FemElement> getElements()

addMarker

public void addMarker(FemMarker mkr,
                      FemElement elem)

addMarker

public void addMarker(FemMarker mkr,
                      FemElement elem,
                      int markerId)

removeMarker

public boolean removeMarker(FemMarker mkr)

markers

public RenderableComponentList<FemMarker> markers()

attachments

public ComponentList<DynamicAttachment> attachments()

attachPoint

public void attachPoint(Point p,
                        FemNode[] nodes,
                        double[] coords)

detachPoint

public boolean detachPoint(Point p)

detachAllNodes

public void detachAllNodes()

clear

public void clear()
Specified by:
clear in interface java.util.Collection<ModelComponent>
Overrides:
clear in class ComponentList<ModelComponent>

getElement

public abstract FemElement getElement(int idx)

numElements

public int numElements()

setBounds

public void setBounds(Point3d pmin,
                      Point3d pmax)

zeroExternalForces

public void zeroExternalForces()

forcesNeedUpdating

public boolean forcesNeedUpdating()

applyForces

public void applyForces(double t)
Description copied from interface: ForceEffector
Adds forces to the components affected by this force effector at a particular time. Component forces should be added and not set, since other forces may be added to the same components by other force effectors.

Specified by:
applyForces in interface ForceEffector
Parameters:
t - time (seconds)

updateBounds

public void updateBounds(Point3d pmin,
                         Point3d pmax)
Description copied from interface: GLRenderable
Update the minimum and maximum points for this object. In an x-y-z coordinate system with x directed to the right and y directed upwards, the minimum and maximum points can be thought of as defining the left-lower-far and right-upper-near corners of a bounding cube. This method should only reduce the elements of the minimum point and increase the elements of the maximum point, since it may be used as part of an iteration to determine the bounding cube for several different objects.

Specified by:
updateBounds in interface GLRenderable
Overrides:
updateBounds in class RenderableModelBase
Parameters:
pmin - minimum point
pmax - maximum point

render

public void render(GLRenderer renderer,
                   int flags)
Description copied from interface: GLRenderable
Render this object using Open GL via the JOGL.

Specified by:
render in interface GLRenderable
Specified by:
render in class RenderableModelBase
Parameters:
renderer - renderer object which is used to perform the rendering. Provides pointers to GL and GLU, along with helper functions.
flags - supplies flags that may be used to control different aspects of the rendering. Flags are defined in GLRenderer and currently include GLRenderer.SELECTED, GLRenderer.VERTEX_COLORING, GLRenderer.HSV_COLOR_INTERPOLATION, GLRenderer.SORT_FACES, and GLRenderer.CLEAR_MESH_DISPLAY_LISTS.

getAttachments

public void getAttachments(java.util.List<DynamicAttachment> list,
                           int level)
Specified by:
getAttachments in interface MechSystemModel

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

isProfile

public boolean isProfile()

setProfile

public void setProfile(boolean profile)

getImplicitIterations

public int getImplicitIterations()

setImplicitIterations

public void setImplicitIterations(int max)

getToleranceType

public IterativeSolver.ToleranceType getToleranceType()

setToleranceType

public void setToleranceType(IterativeSolver.ToleranceType type)

scaleDistance

public void scaleDistance(double s)
Description copied from interface: ScalableUnits
Scales all distance coordinates.

Specified by:
scaleDistance in interface ScalableUnits
Parameters:
s - scaling factor

getMass

public double getMass()
Overrides:
getMass in class MechSystemBase

getNodeMass

public double getNodeMass()

getEnergy

public double getEnergy()

scaleMass

public void scaleMass(double s)
Description copied from interface: ScalableUnits
Scales all mass units.

Specified by:
scaleMass in interface ScalableUnits
Parameters:
s - scaling factor

getCollidables

public void getCollidables(java.util.List<Collidable> list)

getDynamicComponents

public void getDynamicComponents(java.util.List<DynamicMechComponent> active,
                                 java.util.List<DynamicMechComponent> attached,
                                 java.util.List<DynamicMechComponent> parametric)
Specified by:
getDynamicComponents in interface MechSystemModel

getConstrainers

public void getConstrainers(java.util.List<Constrainer> constrainers,
                            int level)
Specified by:
getConstrainers in interface MechSystemModel

getForceEffectors

public void getForceEffectors(java.util.List<ForceEffector> forceEffectors,
                              int level)
Specified by:
getForceEffectors in interface MechSystemModel

getSlaveObjectComponents

public void getSlaveObjectComponents(java.util.List<HasSlaveObjects> comps,
                                     int level)
Should be overridden in subclasses to return all the HasSlaveObjects ' components within this model.

Specified by:
getSlaveObjectComponents in interface MechSystemModel
Overrides:
getSlaveObjectComponents in class MechSystemBase
Parameters:
comps - HasSlaveObjects components should be added to this list

updateSlavePos

public void updateSlavePos()
Description copied from interface: HasSlaveObjects
Called when the system's dynamic position state changes, to update the position state of the slave objects.

Specified by:
updateSlavePos in interface HasSlaveObjects

updateSlaveVel

public void updateSlaveVel()
Description copied from interface: HasSlaveObjects
Called when the system's dynamic velocity state changes, to update the velocity state of the slave objects.

Specified by:
updateSlaveVel in interface HasSlaveObjects

setMaxStepSize

public void setMaxStepSize(double sec)
Sets the maximum step size by which this model should be advanced within a simulation loop.

Overrides:
setMaxStepSize in class ModelBase
Parameters:
sec - maximum step size (seconds)

updateVolume

public double updateVolume()

getRestVolume

public double getRestVolume()

updateRestVolume

public double updateRestVolume()

getVolume

public double getVolume()

getNumInverted

public int getNumInverted()

getImplicitPrecision

public double getImplicitPrecision()

setImplicitPrecision

public void setImplicitPrecision(double prec)

getBilateralSizes

public void getBilateralSizes(VectorNi sizes)
Specified by:
getBilateralSizes in interface Constrainer

addBilateralConstraints

public int addBilateralConstraints(SparseBlockMatrix GT,
                                   VectorNd dg,
                                   int numb,
                                   IntHolder changeCnt)
Specified by:
addBilateralConstraints in interface Constrainer

getBilateralInfo

public int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo,
                            int idx)
Specified by:
getBilateralInfo 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

maxFrictionConstraintSets

public int maxFrictionConstraintSets()
Description copied from interface: MechSystem
Returns that maximum number of friction constraint set that may be added by the method getFrictionConstraints(). This is used to size the finfo array supplied to that method.

Specified by:
maxFrictionConstraintSets in interface Constrainer
Specified by:
maxFrictionConstraintSets in interface MechSystem
Overrides:
maxFrictionConstraintSets in class MechSystemBase
Returns:
maximum friction constraint sets

addFrictionConstraints

public int addFrictionConstraints(SparseBlockMatrix DT,
                                  MechSystem.FrictionInfo[] finfo,
                                  int numf)
Specified by:
addFrictionConstraints in interface Constrainer

setBilateralImpulses

public int setBilateralImpulses(VectorNd lam,
                                double h,
                                int idx)
Specified by:
setBilateralImpulses in interface Constrainer
Overrides:
setBilateralImpulses in class MechSystemBase

zeroImpulses

public void zeroImpulses()
Specified by:
zeroImpulses in interface Constrainer

getBilateralImpulses

public int getBilateralImpulses(VectorNd lam,
                                int idx)
Specified by:
getBilateralImpulses in interface Constrainer
Overrides:
getBilateralImpulses in class MechSystemBase

setUnilateralImpulses

public int setUnilateralImpulses(VectorNd the,
                                 double h,
                                 int idx)
Specified by:
setUnilateralImpulses in interface Constrainer
Overrides:
setUnilateralImpulses in class MechSystemBase

getUnilateralImpulses

public int getUnilateralImpulses(VectorNd the,
                                 int idx)
Specified by:
getUnilateralImpulses in interface Constrainer
Overrides:
getUnilateralImpulses in class MechSystemBase

recursivelyInitialize

public void recursivelyInitialize(double t,
                                  int level)
Specified by:
recursivelyInitialize in interface MechSystemModel
Overrides:
recursivelyInitialize in class MechSystemBase

getCharacteristicSize

public double getCharacteristicSize()

checkVelocityStability

public DynamicMechComponent checkVelocityStability()
Checks the velocity stability of this system. If the velocity of any component appears to be unstable, return that component. Otherwise, return null.

Specified by:
checkVelocityStability in interface MechSystemModel

copy

public FemModel copy(int flags,
                     java.util.Map<ModelComponent,ModelComponent> copyMap)
Overrides:
copy in class MechSystemBase

propertyChanged

public void propertyChanged(PropertyChangeEvent e)
Specified by:
propertyChanged in interface PropertyChangeListener

updateConstraints

public double updateConstraints(double t,
                                int flags)
Specified by:
updateConstraints in interface Constrainer

getJacobianType

public int getJacobianType()
Description copied from interface: ForceEffector
Returns a code indicating the matrix type that results when the Jacobian terms of this force effector are added to the solve matrix. This should be a logical or-ing of either Matrix.SYMMETRIC or Matrix.POSITIVE_DEFINITE. The former should be set if adding the Jacobian terms preserves symmetry, and the latter should be set if positive definiteness if preserved. Both should be set if there is no Jacobian for this effector (i.e., the Jacobian methods are not implemented). Matrix types from all the force effectors are logically and-ed together to determine the type for the entire solve matrix.

Specified by:
getJacobianType in interface ForceEffector
Returns:
solve matrix type resulting from adding Jacobian terms

addSolveBlocks

public abstract void addSolveBlocks(SparseNumberedBlockMatrix M)
Description copied from interface: ForceEffector
Adds any needed blocks to a solve matrix in order to accomodate the Jacobian terms associated with this force effector. In general, blocks will be need to be added at locations given by the block indices (bi, bj), where bi and bj correspond to the solve indices (as returned by getSolveIndex) for all dynamic or attached components affected by this force effector.

Specified by:
addSolveBlocks in interface ForceEffector
Parameters:
M - solve matrix to which blocks should be added