artisynth.core.femmodels
Class FemMuscleModel

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
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
Direct Known Subclasses:
HydrostatModel, PointToPointMuscle, SpongeModel

public class FemMuscleModel
extends FemModel3d
implements AuxiliaryMaterial, ExcitationComponent


Nested Class Summary
 
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
static PropertyList 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
FemMuscleModel()
           
FemMuscleModel(java.lang.String name)
           
 
Method Summary
 void addExcitationSource(ExcitationComponent ex)
          Adds a new excitation source to this Excitable, with an assumed gain of 1.
 void addExcitationSource(ExcitationComponent ex, double gain)
          Adds a new excitation source to this Excitable with a specified gain.
 MuscleBundle addFiberMeshBundle(double rad, PolylineMesh mesh)
           
 void addMuscleBundle(MuscleBundle bundle)
           
 void addMuscleExciter(MuscleExciter mex)
           
 void addPosJacobian(SparseNumberedBlockMatrix M, double s)
          Scales the components of the position Jacobian associated with this force effector and adds it to the supplied solve matrix M.
 void addSolveBlocks(SparseNumberedBlockMatrix S)
          Adds any needed blocks to a solve matrix in order to accomodate the Jacobian terms associated with this force effector.
 void addVelJacobian(SparseNumberedBlockMatrix M, double s)
          Scales the components of the velocity Jacobian associated with this force effector and adds it to the supplied solve matrix M.
 void applyForces(double t)
          Adds forces to the components affected by this force effector at a particular time.
 void clearMuscleBundles()
           
 void clearMuscleExciters()
           
static int computeAverageFiberDirection(Vector3d dir, Point3d pos, double rad, PolylineMesh mesh)
           
 void computeStress(SymmetricMatrix3d sigma, SolidDeformation def, IntegrationPoint3d pt, IntegrationData3d dt, FemMaterial baseMat)
           
 void computeStress(SymmetricMatrix3d sigma, SolidDeformation def, Matrix3d Q, FemMaterial baseMat)
           
 void computeTangent(Matrix6d D, SymmetricMatrix3d stress, SolidDeformation def, IntegrationPoint3d pt, IntegrationData3d dt, FemMaterial baseMat)
           
 void computeTangent(Matrix6d D, SymmetricMatrix3d stress, SolidDeformation def, Matrix3d Q, FemMaterial baseMat)
           
static MuscleMaterial createDefaultMuscleMaterial()
           
 MuscleMaterial createMuscleMaterial()
           
 VectorNd getActivations()
           
 void getActivations(VectorNd a, int idx)
           
 PropertyList getAllPropertyInfo()
          Returns a list giving static information about all properties exported by this object.
 ExcitationComponent.CombinationRule getCombinationRule()
          Return the combination rule for excitations.
 double getDefaultActivationWeight()
          Returns the default weight that should be used when this excitation component is being used for inverse actuation control.
 double getDirectionRenderLen()
           
 PropertyMode getDirectionRenderLenMode()
           
 MuscleBundle.DirectionRenderType getDirectionRenderType()
           
 PropertyMode getDirectionRenderTypeMode()
           
 double getExcitation()
          Returns the primary excitation for this component.
 java.awt.Color getExcitationColor()
           
 PropertyMode getExcitationColorMode()
           
 double getExcitationGain(ExcitationComponent ex)
          Gets the gain for an excitation source in this component.
 RenderProps getFiberRenderProps()
           
 double getMaxColoredExcitation()
           
 PropertyMode getMaxColoredExcitationMode()
           
 RenderableComponentList<MuscleBundle> getMuscleBundles()
           
 ComponentList<MuscleExciter> getMuscleExciters()
           
 MuscleMaterial getMuscleMaterial()
           
 double getNetExcitation()
          Returns the net excitation for this Excitable.
 void getSoftReferences(java.util.List<ModelComponent> refs)
          Appends all soft references for this component to a list.
 boolean hasSymmetricTangent()
           
 boolean isInvertible()
           
 void notifyActivationsSet()
           
 int numActivations()
          preliminary methods for inverse solver
 void prerender(RenderList list)
          Prepare for rendering, and potentially add itself to a list to be drawn by a GLRenderer.
 void recursivelyInitialize(double t, int level)
           
 boolean removeExcitationSource(ExcitationComponent ex)
          Removes an excitation source from this Excitable.
 boolean removeMuscleBundle(MuscleBundle bundle)
           
 boolean removeMuscleExciter(MuscleExciter mex)
           
 void render(GLRenderer renderer, int flags)
          Render this object using Open GL via the JOGL.
 void scaleDistance(double s)
          Scales all distance coordinates.
 void scaleMass(double s)
          Scales all mass units.
 void setActivations(VectorNd a)
           
 void setActivations(VectorNd a, int idx)
           
 void setBundlesActive(boolean active)
           
 void setCombinationRule(ExcitationComponent.CombinationRule rule)
          Sets the rule for combining excitations.
 void setDefaultValues()
          Sets the attributes of this component to their default values.
 void setDirectionRenderLen(double size)
           
 void setDirectionRenderLenMode(PropertyMode mode)
           
 void setDirectionRenderType(MuscleBundle.DirectionRenderType type)
           
 void setDirectionRenderTypeMode(PropertyMode mode)
           
 void setExcitation(double a)
          Sets the primary excitation for this component.
 void setExcitationColor(java.awt.Color color)
           
 void setExcitationColorMode(PropertyMode mode)
           
 boolean setExcitationGain(ExcitationComponent ex, double gain)
          Sets the gain for an excitation source in this component.
 void setFiberRenderProps(RenderProps props)
           
 void setMaxColoredExcitation(double excitation)
           
 void setMaxColoredExcitationMode(PropertyMode mode)
           
 void setMuscleMaterial(MuscleMaterial mat)
           
 void transformGeometry(AffineTransform3dBase X)
          Applies an affine transformation to the geometry of this object.
 void transformGeometry(AffineTransform3dBase X, TransformableGeometry topObject, int flags)
          Applies an affine transformation to the geometry of this object.
 void updateReferences(boolean undo, java.util.Deque<java.lang.Object> undoInfo)
          May be called by the system if any of the soft references for this component are removed from the the component hierarchy.
 
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, initialize, 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.RequiresInitialize
initialize
 
Methods inherited from interface artisynth.core.mechmodels.MechSystemModel
checkVelocityStability, getAttachments, getConstrainers, getDynamicComponents, getForceEffectors, getSlaveObjectComponents
 
Methods inherited from interface artisynth.core.modelbase.Model
getMaxStepSize, initialize, 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

myProps

public static PropertyList myProps
Constructor Detail

FemMuscleModel

public FemMuscleModel()

FemMuscleModel

public FemMuscleModel(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 FemModel3d
Returns:
static information for all exported properties

getExcitationColor

public java.awt.Color getExcitationColor()

setExcitationColor

public void setExcitationColor(java.awt.Color color)

getExcitationColorMode

public PropertyMode getExcitationColorMode()

setExcitationColorMode

public void setExcitationColorMode(PropertyMode mode)

getMaxColoredExcitation

public double getMaxColoredExcitation()

setMaxColoredExcitation

public void setMaxColoredExcitation(double excitation)

getMaxColoredExcitationMode

public PropertyMode getMaxColoredExcitationMode()

setMaxColoredExcitationMode

public void setMaxColoredExcitationMode(PropertyMode mode)

getExcitation

public double getExcitation()
Returns the primary excitation for this component.

Specified by:
getExcitation in interface ExcitationComponent
Returns:
primary excitation value

setExcitation

public void setExcitation(double a)
Sets the primary excitation for this component.

Specified by:
setExcitation in interface ExcitationComponent
Parameters:
a - excitation value

addExcitationSource

public void addExcitationSource(ExcitationComponent ex)
Adds a new excitation source to this Excitable, with an assumed gain of 1.

Specified by:
addExcitationSource in interface ExcitationComponent
Parameters:
ex - excitatation source to be added

addExcitationSource

public void addExcitationSource(ExcitationComponent ex,
                                double gain)
Adds a new excitation source to this Excitable with a specified gain.

Specified by:
addExcitationSource in interface ExcitationComponent
Parameters:
ex - excitatation source to be added
gain - gain for the source

removeExcitationSource

public boolean removeExcitationSource(ExcitationComponent ex)
Removes an excitation source from this Excitable. Returns false if the source was not present.

Specified by:
removeExcitationSource in interface ExcitationComponent
Parameters:
ex - excitatation source to be removed
Returns:
true if the source was present and removed

getExcitationGain

public double getExcitationGain(ExcitationComponent ex)
Gets the gain for an excitation source in this component.

Specified by:
getExcitationGain in interface ExcitationComponent
Parameters:
ex - excitatation source whose gain is to be queried
Returns:
source gain value, or -1 if the source is not present in this component.

setExcitationGain

public boolean setExcitationGain(ExcitationComponent ex,
                                 double gain)
Sets the gain for an excitation source in this component.

Specified by:
setExcitationGain in interface ExcitationComponent
Parameters:
ex - excitatation source whose gain is to be modified
gain - new gain for the source
Returns:
false if the source is not present in this component.

setCombinationRule

public void setCombinationRule(ExcitationComponent.CombinationRule rule)
Sets the rule for combining excitations.

Specified by:
setCombinationRule in interface ExcitationComponent
Parameters:
rule - rule for combining excitations

getCombinationRule

public ExcitationComponent.CombinationRule getCombinationRule()
Return the combination rule for excitations.

Specified by:
getCombinationRule in interface ExcitationComponent
Returns:
combination rule for excitations

getNetExcitation

public double getNetExcitation()
Returns the net excitation for this Excitable. The net excitation is the combination of the primary excitation and the net excitations of all the excitation sources.

Specified by:
getNetExcitation in interface ExcitationComponent

getSoftReferences

public void getSoftReferences(java.util.List<ModelComponent> refs)
Appends all soft references for this component to a list. References are other components, outside of this component's immediate ancestry, on which this component depends. For example, an ExcitationComponent may refer to one or more other ExcitationComponents to act as excitation sources. A soft reference is one which can be removed from the referring component. In particular, if any soft references for a component are deleted, then that component's updateReferences() method will be called to update its internal reference information.

Specified by:
getSoftReferences in interface ModelComponent
Overrides:
getSoftReferences in class ModelComponentBase
Parameters:
refs - list to which soft references are appended

updateReferences

public void updateReferences(boolean undo,
                             java.util.Deque<java.lang.Object> undoInfo)
May be called by the system if any of the soft references for this component are removed from the the component hierarchy. If called with undo equal to false, this component should then examine its soft references and use ComponentUtils.isConnected() to determine which of them have been disconnected from the hierarchy. Disconnected references should be removed, and sufficient information should be appended to undoInfo to allow this update to be undone if this method is called later with undo equal to true. When undoing an update, the undo information should be removed from the front of undoInfo.

Specified by:
updateReferences in interface ModelComponent
Overrides:
updateReferences in class ModelComponentBase
Parameters:
undo - if true, indicates that the most recent reference update should be undone, using the supplied undo information.
undoInfo - if undo is false, should be used to store information allowing the reference update to be undone. Otherwise, if undo is true, then this supplied information to undo the most recent update.

getDefaultActivationWeight

public double getDefaultActivationWeight()
Returns the default weight that should be used when this excitation component is being used for inverse actuation control.

Specified by:
getDefaultActivationWeight in interface ExcitationComponent

setDefaultValues

public void setDefaultValues()
Description copied from class: ModelComponentBase
Sets the attributes of this component to their default values.


setDirectionRenderLen

public void setDirectionRenderLen(double size)

getDirectionRenderLen

public double getDirectionRenderLen()

setDirectionRenderLenMode

public void setDirectionRenderLenMode(PropertyMode mode)

getDirectionRenderLenMode

public PropertyMode getDirectionRenderLenMode()

setFiberRenderProps

public void setFiberRenderProps(RenderProps props)

getFiberRenderProps

public RenderProps getFiberRenderProps()

setDirectionRenderType

public void setDirectionRenderType(MuscleBundle.DirectionRenderType type)

getDirectionRenderType

public MuscleBundle.DirectionRenderType getDirectionRenderType()

setDirectionRenderTypeMode

public void setDirectionRenderTypeMode(PropertyMode mode)

getDirectionRenderTypeMode

public PropertyMode getDirectionRenderTypeMode()

createDefaultMuscleMaterial

public static MuscleMaterial createDefaultMuscleMaterial()

getMuscleMaterial

public MuscleMaterial getMuscleMaterial()

createMuscleMaterial

public MuscleMaterial createMuscleMaterial()

isInvertible

public boolean isInvertible()
Specified by:
isInvertible in interface AuxiliaryMaterial

setMuscleMaterial

public void setMuscleMaterial(MuscleMaterial mat)

addMuscleBundle

public void addMuscleBundle(MuscleBundle bundle)

removeMuscleBundle

public boolean removeMuscleBundle(MuscleBundle bundle)

clearMuscleBundles

public void clearMuscleBundles()

getMuscleBundles

public RenderableComponentList<MuscleBundle> getMuscleBundles()

addMuscleExciter

public void addMuscleExciter(MuscleExciter mex)

removeMuscleExciter

public boolean removeMuscleExciter(MuscleExciter mex)

getMuscleExciters

public ComponentList<MuscleExciter> getMuscleExciters()

clearMuscleExciters

public void clearMuscleExciters()

scaleDistance

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

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

scaleMass

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

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

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
Overrides:
applyForces in class FemModel
Parameters:
t - time (seconds)

addPosJacobian

public void addPosJacobian(SparseNumberedBlockMatrix M,
                           double s)
Description copied from interface: ForceEffector
Scales the components of the position Jacobian associated with this force effector and adds it to the supplied solve matrix M.

M is guaranteed to be the same matrix supplied in the most recent call to addSolveBlocks, and so implementations may choose to cache the relevant matrix blocks from that call, instead of retrieving them directly from M.

Specified by:
addPosJacobian in interface ForceEffector
Overrides:
addPosJacobian in class FemModel3d
Parameters:
M - solve matrix to which scaled position Jacobian is to be added
s - scaling factor for position Jacobian

addVelJacobian

public void addVelJacobian(SparseNumberedBlockMatrix M,
                           double s)
Description copied from interface: ForceEffector
Scales the components of the velocity Jacobian associated with this force effector and adds it to the supplied solve matrix M.

M is guaranteed to be the same matrix supplied in the most recent call to addSolveBlocks, and so implementations may choose to cache the relevant matrix blocks from that call, instead of retrieving them directly from M.

Specified by:
addVelJacobian in interface ForceEffector
Overrides:
addVelJacobian in class FemModel3d
Parameters:
M - solve matrix to which scaled velocity Jacobian is to be added
s - scaling factor for velocity Jacobian

addSolveBlocks

public void addSolveBlocks(SparseNumberedBlockMatrix S)
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
Overrides:
addSolveBlocks in class FemModel3d
Parameters:
S - solve matrix to which blocks should be added

recursivelyInitialize

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

numActivations

public int numActivations()
preliminary methods for inverse solver

See Also:
MechSystemBase

getActivations

public VectorNd getActivations()

getActivations

public void getActivations(VectorNd a,
                           int idx)

setActivations

public void setActivations(VectorNd a)

setActivations

public void setActivations(VectorNd a,
                           int idx)

notifyActivationsSet

public void notifyActivationsSet()

hasSymmetricTangent

public boolean hasSymmetricTangent()
Specified by:
hasSymmetricTangent in interface AuxiliaryMaterial

computeTangent

public void computeTangent(Matrix6d D,
                           SymmetricMatrix3d stress,
                           SolidDeformation def,
                           IntegrationPoint3d pt,
                           IntegrationData3d dt,
                           FemMaterial baseMat)
Specified by:
computeTangent in interface AuxiliaryMaterial

computeTangent

public void computeTangent(Matrix6d D,
                           SymmetricMatrix3d stress,
                           SolidDeformation def,
                           Matrix3d Q,
                           FemMaterial baseMat)

computeStress

public void computeStress(SymmetricMatrix3d sigma,
                          SolidDeformation def,
                          IntegrationPoint3d pt,
                          IntegrationData3d dt,
                          FemMaterial baseMat)
Specified by:
computeStress in interface AuxiliaryMaterial

computeStress

public void computeStress(SymmetricMatrix3d sigma,
                          SolidDeformation def,
                          Matrix3d Q,
                          FemMaterial baseMat)

transformGeometry

public void transformGeometry(AffineTransform3dBase X)
Description copied from interface: TransformableGeometry
Applies an affine transformation to the geometry of this object. This method should be equivalent to
 transformGeometry (X, this, 0);
 

Specified by:
transformGeometry in interface TransformableGeometry
Overrides:
transformGeometry in class FemModel3d
Parameters:
X - affine transformation

transformGeometry

public void transformGeometry(AffineTransform3dBase X,
                              TransformableGeometry topObject,
                              int flags)
Description copied from interface: TransformableGeometry
Applies an affine transformation to the geometry of this object. If recursively invoked within a component hierarchy, then topComponent should be the component for which the method was initially invoked. The variable flags provides information about the context in which the transformation is being applied. At present, the available flags are TransformableGeometry.SIMULATING and TransformableGeometry.ARTICULATED.

Specified by:
transformGeometry in interface TransformableGeometry
Overrides:
transformGeometry in class FemModel3d
Parameters:
X - affine transformation
topObject - component on which the method was initially invoked
flags - provides information about the context in which the transformation is being applied.

computeAverageFiberDirection

public static int computeAverageFiberDirection(Vector3d dir,
                                               Point3d pos,
                                               double rad,
                                               PolylineMesh mesh)
Returns:
the number of fibre segments per sphere

setBundlesActive

public void setBundlesActive(boolean active)

addFiberMeshBundle

public MuscleBundle addFiberMeshBundle(double rad,
                                       PolylineMesh mesh)

prerender

public void prerender(RenderList list)
Description copied from interface: GLRenderable
Prepare for rendering, and potentially add itself to a list to be drawn by a GLRenderer.

Specified by:
prerender in interface GLRenderable
Overrides:
prerender in class FemModel3d

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
Overrides:
render in class FemModel3d
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.