artisynth.demos.fem
Class HydrostatModel

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
                          extended by artisynth.core.femmodels.FemModel3d
                              extended by artisynth.core.femmodels.FemMuscleModel
                                  extended by artisynth.demos.fem.HydrostatModel
All Implemented Interfaces:
AuxiliaryMaterial, Collidable, Constrainer, ExcitationComponent, ForceEffector, HasAuxState, HasSlaveObjects, MechSystem, MechSystemModel, RequiresInitialize, ComponentChangeListener, ComponentListView<ModelComponent>, CompositeComponent, CopyableComponent, 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, Clonable, Disposable, ListView<ModelComponent>, Scannable

public class HydrostatModel
extends FemMuscleModel


Nested Class Summary
static class HydrostatModel.Axis
           
static class HydrostatModel.Element
           
static class HydrostatModel.Hemisphere
           
static class HydrostatModel.Shape
           
static class HydrostatModel.TubeAxis
           
 
Nested classes/interfaces inherited from class artisynth.core.femmodels.FemModel
FemModel.ElementFilter, FemModel.IncompMethod, FemModel.Ranging, FemModel.SurfaceRender
 
Nested classes/interfaces inherited from interface artisynth.core.mechmodels.ExcitationComponent
ExcitationComponent.CombinationRule
 
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.mechmodels.Collidable
Collidable.DefaultCollidable
 
Nested classes/interfaces inherited from interface artisynth.core.mechmodels.HasAuxState
HasAuxState.StateContext
 
Nested classes/interfaces inherited from interface artisynth.core.modelbase.CompositeComponent
CompositeComponent.NavpanelDisplay
 
Field Summary
 ControlPanel bundlesPanel
           
 ControlPanel exciterPanel
           
 java.util.ArrayList<java.lang.String> labels
           
 
Fields inherited from class artisynth.core.femmodels.FemMuscleModel
myProps
 
Fields inherited from class artisynth.core.femmodels.FemModel3d
abortOnInvertedElems, checkTangentStability, DEFAULT_HARD_INCOMP, DEFAULT_SOFT_INCOMP, DEFAULT_SURFACEMESH_NAME, defaultAutoGenerateSurface, defaultColorMap, detJStepReductionLimit, noIncompressStiffnessDamping
 
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 artisynth.core.mechmodels.Collidable
Default, Deformable, RigidBody, Self
 
Fields inherited from interface artisynth.core.modelbase.CopyableComponent
COPY_REFERENCES
 
Fields inherited from interface maspack.render.GLRenderable
TRANSLUCENT, TWO_DIMENSIONAL
 
Constructor Summary
HydrostatModel()
           
HydrostatModel(java.lang.String name)
           
HydrostatModel(java.lang.String name, boolean fullMusclesAP, HydrostatModel.Shape shape)
           
HydrostatModel(java.lang.String name, HydrostatModel.Element elem, HydrostatModel.Shape shape, double l, double r, int nl, int nr, boolean simpleExciters)
           
HydrostatModel(java.lang.String name, HydrostatModel.Element elem, HydrostatModel.Shape shape, double l, double r, int nl, int nr, boolean simpleExciters, boolean fullMusclesAP)
           
 
Method Summary
 void addBeamMuscles()
           
 void addBundles()
           
 void addExciters()
           
 void addMuscles(HydrostatModel.Shape s)
           
 void addSimpleExciters()
           
 void addSimpleTubeExciters()
           
 void addTentacleExciters()
           
 void addTentacleExcitersX()
           
 void addTentacleMuscles()
           
 void addTubeExciters()
           
 void addTubeMuscles()
           
 void clampEnd()
           
 void colorBundles(java.lang.String[] names, boolean createPanel)
           
 void colorExciter(MuscleExciter e, java.awt.Color color)
           
 void colorExciters(java.lang.String[] names, boolean createPanel)
           
 void createBeam(HydrostatModel.Element e)
           
 void createBundle(java.lang.String name, Point3d emin, Point3d emax, java.lang.String prefix)
           
 void createBundlesPanel(java.lang.String[] names)
           
 void createExciter(java.lang.String name, Point3d emin, Point3d emax, MuscleBundle b)
           
 void createExcitersPanel(java.lang.String[] names)
           
 void createGeometry(HydrostatModel.Element e, HydrostatModel.Shape s)
           
 void createGroup(java.lang.String name, java.lang.String[] exTargets)
           
 void createGroup(java.lang.String prefix, java.lang.String name, java.lang.String[] exTargets)
           
 void createMuscles(HydrostatModel.Axis axis, MuscleBundle bundle)
           
 void createMuscles(HydrostatModel.Axis axis, java.lang.String prefix)
           
 java.util.ArrayList<ModelComponent> createTargetList()
           
 java.util.ArrayList<ModelComponent> createTargetList(int[] nodeNums)
           
 void createTube(HydrostatModel.Element e)
           
 void createTubeHelixMuscles()
           
 void createTubeLongMuscles()
           
 void createTubeMuscles(HydrostatModel.TubeAxis axis, MuscleBundle bundle)
           
 ControlPanel getMusclePanel()
           
 double getTargetPointRadius()
           
 void initialize(double t)
          Causes this model to initialize itself at time t.
 boolean isClose(Point3d pos, Point pt)
           
 boolean isUsingExciters()
           
 void setupRenderProps()
           
 
Methods inherited from class artisynth.core.femmodels.FemMuscleModel
addExcitationSource, addExcitationSource, addFiberMeshBundle, addMuscleBundle, addMuscleExciter, addPosJacobian, addSolveBlocks, addVelJacobian, applyForces, clearMuscleBundles, clearMuscleExciters, computeAverageFiberDirection, computeStress, computeStress, computeTangent, computeTangent, createDefaultMuscleMaterial, createMuscleMaterial, getActivations, getActivations, getAllPropertyInfo, getCombinationRule, getDefaultActivationWeight, getDirectionRenderLen, getDirectionRenderLenMode, getDirectionRenderType, getDirectionRenderTypeMode, getExcitation, getExcitationColor, getExcitationColorMode, getExcitationGain, getFiberRenderProps, getMaxColoredExcitation, getMaxColoredExcitationMode, getMuscleBundles, getMuscleExciters, getMuscleMaterial, getNetExcitation, getSoftReferences, hasSymmetricTangent, isInvertible, notifyActivationsSet, numActivations, prerender, recursivelyInitialize, removeExcitationSource, removeMuscleBundle, removeMuscleExciter, render, scaleDistance, scaleMass, setActivations, setActivations, setBundlesActive, setCombinationRule, setDefaultValues, setDirectionRenderLen, setDirectionRenderLenMode, setDirectionRenderType, setDirectionRenderTypeMode, setExcitation, setExcitationColor, setExcitationColorMode, setExcitationGain, setFiberRenderProps, setMaxColoredExcitation, setMaxColoredExcitationMode, setMuscleMaterial, transformGeometry, transformGeometry, updateReferences
 
Methods inherited from class artisynth.core.femmodels.FemModel3d
addBilateralConstraints, addElement, addMarker, addMaterialBundle, addMesh, addMesh, addMesh, addNode, addNumberedElement, addNumberedMarker, addNumberedNode, advance, advanceAuxState, clearElements, clearMaterialBundles, componentChanged, copy, createCollisionData, createFineSurfaceMesh, createGrid, createHexGrid, createSurfaceMesh, createSurfaceMesh, dispose, findContainingElement, findNearestElement, findNearestNode, findNearestSurfaceElement, getAuxState, getAuxStateComponents, getBilateralImpulses, getBilateralInfo, getBilateralSizes, getByNumber, getCollidables, getColorMap, getColorMapMode, getCopyReferences, getElement, getElementByNumber, getElementNeighbors, getElements, getElementWidgetSize, getElementWidgetSizeMode, getHardIncompMethod, getHardIncompMethodRange, getIncompCompliance, getIncompressible, getInitialAuxState, getJacobianType, getMaterialBundles, getMesh, getMeshes, getNodalPlotRange, getNode, getNodeNeighbors, getNodes, getNumMeshes, getSelection, getSoftIncompMethod, getSoftIncompMethodRange, getSurfaceElement, getSurfaceMesh, getSurfaceMeshVertex, invalidateRestData, invalidateStressAndStiffness, invalidateSurfaceMesh, isAutoGeneratingSurface, isCollidable, isDuplicatable, isSurfaceNode, markInvertedRestElements, numQuadraticElements, numTetElements, postscan, printANSYSElements, printANSYSNodes, recursivelyFinalizeAdvance, removeAllMeshes, removeElement, removeMaterialBundle, removeMesh, removeNode, resetRestPosition, scan, scanMesh, scanMesh, scanSurfaceMesh, scanSurfaceMesh, setAutoGenerateSurface, setAuxState, setBilateralImpulses, setColorMap, setColorMapMode, setComputeNodalStrain, setComputeNodalStress, setElementWidgetSize, setElementWidgetSizeMode, setIncompCompliance, setIncompressible, setMaterial, setSoftIncompMethod, setSurfaceMesh, setSurfaceRendering, skipAuxState, subdivideHex, subdivideHexs, updateConstraints, updateSlavePos, updateStress, updateStressAndStiffness, useAnsysNumbering, writeMesh, writeSurfaceMesh, writeSurfaceMesh, zeroImpulses
 
Methods inherited from class artisynth.core.femmodels.FemModel
addFrictionConstraints, addMarker, addMarker, addUnilateralConstraints, attachments, attachPoint, checkVelocityStability, clear, createDefaultMaterial, detachAllNodes, detachPoint, forcesNeedUpdating, getAttachments, getCharacteristicSize, getCollidables, getConstrainers, getDensity, getDensityMode, getDynamicComponents, getEnergy, getForceEffectors, getGravity, getGravityMode, getImplicitIterations, getImplicitPrecision, getIntegrator, getMass, getMaterial, getMatrixSolver, getNodeMass, getNumInverted, getParticleDamping, getRestVolume, getSlaveObjectComponents, getStiffnessDamping, getStressPlotRange, getStressPlotRangeMode, getStressPlotRanging, getStressPlotRangingMode, getSurfaceRendering, getSurfaceRenderingMode, getToleranceType, getUnilateralImpulses, getUnilateralInfo, getUnilateralSizes, getVolume, hasState, isProfile, markers, maxFrictionConstraintSets, numElements, numNodes, propertyChanged, removeMarker, resetStressPlotRange, setBounds, setDensity, setDensityMode, setGravity, setGravity, setGravityMode, setImplicitIterations, setImplicitPrecision, setIntegrator, setLinearMaterial, setMatrixSolver, setMaxStepSize, setParticleDamping, setProfile, setStiffnessDamping, setStressPlotRange, setStressPlotRangeMode, setStressPlotRanging, setStressPlotRangingMode, setSurfaceRenderingMode, setToleranceType, setUnilateralImpulses, updateBounds, updateRestVolume, updateSlaveVel, updateVolume, validateMatrixSolver, zeroExternalForces
 
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, 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, numActiveComponents, numAttachedComponents, numParametricComponents, preadvance, printActiveStiffness, reduceVelocityJacobian, setActiveForces, setActivePosState, setActiveVelState, 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, isSelectable, numSelectionQueriesNeeded, setRenderProps
 
Methods inherited from class artisynth.core.modelbase.ModelBase
copy, getInitialState, getMaxStepSize, hierarchyContainsReferences, setInitialState
 
Methods inherited from class artisynth.core.modelbase.ComponentList
add, add, addAll, addComponents, addFixed, addNumbered, clone, contains, contains, containsAll, ensureCapacity, findComponent, get, get, getChildren, getNavpanelDisplay, getNumberLimit, getShortName, getTypeParameter, hasChildren, indexOf, isEmpty, iterator, nextComponentNumber, numComponents, remove, remove, removeAll, removeAll, removeComponents, retainAll, 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, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface maspack.util.Clonable
clone
 
Methods inherited from interface artisynth.core.modelbase.ModelComponent
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected
 
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.mechmodels.MechSystemModel
checkVelocityStability, getAttachments, getConstrainers, getDynamicComponents, getForceEffectors, getSlaveObjectComponents
 
Methods inherited from interface artisynth.core.modelbase.Model
getMaxStepSize, preadvance
 
Methods inherited from interface artisynth.core.modelbase.HasState
createState, getInitialState, getState, setState
 
Methods inherited from interface artisynth.core.mechmodels.MechSystem
addActivePosImpulse, addPosJacobian, addVelJacobian, buildMassMatrix, buildSolveMatrix, getActiveForces, getActivePosDerivative, getActivePosState, getActivePosStateSize, getActiveVelState, getActiveVelStateSize, getBilateralConstraints, getBilateralImpulses, getBilateralInfo, getFrictionConstraints, getInverseMassMatrix, getMassMatrix, getParametricForces, getParametricPosState, getParametricPosStateSize, getParametricPosTarget, getParametricVelState, getParametricVelStateSize, getParametricVelTarget, getSolveMatrixType, getStructureVersion, getUnilateralConstraints, getUnilateralImpulses, getUnilateralInfo, maxFrictionConstraintSets, numActiveComponents, numParametricComponents, setActiveForces, setActivePosState, setActiveVelState, setBilateralImpulses, setParametricForces, setParametricPosState, setParametricVelState, setUnilateralImpulses, updateConstraints, updateForces
 
Methods inherited from interface artisynth.core.mechmodels.Collidable
getMass
 
Methods inherited from interface artisynth.core.modelbase.ComponentListView
getName
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Field Detail

exciterPanel

public ControlPanel exciterPanel

bundlesPanel

public ControlPanel bundlesPanel

labels

public java.util.ArrayList<java.lang.String> labels
Constructor Detail

HydrostatModel

public HydrostatModel()

HydrostatModel

public HydrostatModel(java.lang.String name)
               throws java.io.IOException
Throws:
java.io.IOException

HydrostatModel

public HydrostatModel(java.lang.String name,
                      boolean fullMusclesAP,
                      HydrostatModel.Shape shape)
               throws java.io.IOException
Throws:
java.io.IOException

HydrostatModel

public HydrostatModel(java.lang.String name,
                      HydrostatModel.Element elem,
                      HydrostatModel.Shape shape,
                      double l,
                      double r,
                      int nl,
                      int nr,
                      boolean simpleExciters)
               throws java.io.IOException
Throws:
java.io.IOException

HydrostatModel

public HydrostatModel(java.lang.String name,
                      HydrostatModel.Element elem,
                      HydrostatModel.Shape shape,
                      double l,
                      double r,
                      int nl,
                      int nr,
                      boolean simpleExciters,
                      boolean fullMusclesAP)
               throws java.io.IOException
Throws:
java.io.IOException
Method Detail

createTargetList

public java.util.ArrayList<ModelComponent> createTargetList(int[] nodeNums)

createTargetList

public java.util.ArrayList<ModelComponent> createTargetList()

setupRenderProps

public void setupRenderProps()

initialize

public void initialize(double t)
Description copied from class: ModelBase
Causes this model to initialize itself at time t. This method will be called at the very beginning of the simulation (with t = 0), or immediately after the model's state has been reset using HasState.setState(artisynth.core.modelbase.ComponentState), in which case t may have an arbitrary value.

Specified by:
initialize in interface RequiresInitialize
Specified by:
initialize in interface Model
Overrides:
initialize in class MechSystemBase
Parameters:
t - initialization time (seconds)

clampEnd

public void clampEnd()

createBeam

public void createBeam(HydrostatModel.Element e)

createTube

public void createTube(HydrostatModel.Element e)

createGeometry

public void createGeometry(HydrostatModel.Element e,
                           HydrostatModel.Shape s)

addMuscles

public void addMuscles(HydrostatModel.Shape s)

addTentacleMuscles

public void addTentacleMuscles()

addTentacleExciters

public void addTentacleExciters()

addTentacleExcitersX

public void addTentacleExcitersX()

addBeamMuscles

public void addBeamMuscles()

createMuscles

public void createMuscles(HydrostatModel.Axis axis,
                          java.lang.String prefix)

createMuscles

public void createMuscles(HydrostatModel.Axis axis,
                          MuscleBundle bundle)

addTubeMuscles

public void addTubeMuscles()

createTubeLongMuscles

public void createTubeLongMuscles()

createTubeMuscles

public void createTubeMuscles(HydrostatModel.TubeAxis axis,
                              MuscleBundle bundle)

createTubeHelixMuscles

public void createTubeHelixMuscles()

addTubeExciters

public void addTubeExciters()

addSimpleTubeExciters

public void addSimpleTubeExciters()

isClose

public boolean isClose(Point3d pos,
                       Point pt)

createBundle

public void createBundle(java.lang.String name,
                         Point3d emin,
                         Point3d emax,
                         java.lang.String prefix)

addBundles

public void addBundles()

createExciter

public void createExciter(java.lang.String name,
                          Point3d emin,
                          Point3d emax,
                          MuscleBundle b)

addExciters

public void addExciters()

addSimpleExciters

public void addSimpleExciters()

createGroup

public void createGroup(java.lang.String name,
                        java.lang.String[] exTargets)

createGroup

public void createGroup(java.lang.String prefix,
                        java.lang.String name,
                        java.lang.String[] exTargets)

createExcitersPanel

public void createExcitersPanel(java.lang.String[] names)

colorExciters

public void colorExciters(java.lang.String[] names,
                          boolean createPanel)

colorExciter

public void colorExciter(MuscleExciter e,
                         java.awt.Color color)

createBundlesPanel

public void createBundlesPanel(java.lang.String[] names)

colorBundles

public void colorBundles(java.lang.String[] names,
                         boolean createPanel)

getMusclePanel

public ControlPanel getMusclePanel()

isUsingExciters

public boolean isUsingExciters()

getTargetPointRadius

public double getTargetPointRadius()