artisynth.core.femmodels
Class FemNode3d

java.lang.Object
  extended by artisynth.core.modelbase.ModelComponentBase
      extended by artisynth.core.modelbase.RenderableComponentBase
          extended by artisynth.core.mechmodels.DynamicMechComponentBase
              extended by artisynth.core.mechmodels.Point
                  extended by artisynth.core.mechmodels.Particle
                      extended by artisynth.core.femmodels.FemNode
                          extended by artisynth.core.femmodels.FemNode3d
All Implemented Interfaces:
DynamicMechComponent, ForceEffector, MotionTargetComponent, CopyableComponent, ModelComponent, RenderableComponent, Tracable, ScalableUnits, TransformableGeometry, java.lang.Cloneable, HasProperties, HierarchyNode, GLRenderable, GLSelectable, HasRenderProps, Renderable, RenderablePoint, Scannable
Direct Known Subclasses:
MFreeNode3d

public class FemNode3d
extends FemNode


Nested Class Summary
 
Nested classes/interfaces inherited from interface artisynth.core.modelbase.ModelComponent
ModelComponent.NavpanelVisibility
 
Field Summary
static PropertyList myProps
           
 
Fields inherited from class artisynth.core.mechmodels.Point
myRenderCoords
 
Fields inherited from class artisynth.core.modelbase.ModelComponentBase
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
 
Fields inherited from interface maspack.render.GLRenderable
TRANSLUCENT, TWO_DIMENSIONAL
 
Fields inherited from interface artisynth.core.util.TransformableGeometry
ARTICULATED, SIMULATING
 
Fields inherited from interface artisynth.core.modelbase.CopyableComponent
COPY_REFERENCES
 
Constructor Summary
FemNode3d()
           
FemNode3d(double x, double y, double z)
           
FemNode3d(Point3d p)
           
 
Method Summary
 void addElementDependency(FemElement3d e)
           
 FemNodeNeighbor addIndirectNeighbor(FemNode3d nbrNode)
           
 void clearIndirectNeighbors()
           
 void connectToHierarchy()
          Called by the system after this component is added to the component hierarchy (i.e., when it is added as a child of another CompositeComponent).
 FemNode3d copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
          Create a copy of this component.
 void deregisterNodeNeighbor(FemNode3d nbrNode)
           
 void disconnectFromHierarchy()
          Called by the system after this component is removed from the component hierarchy (i.e., when it is removed as a child of its parent).
 PropertyList getAllPropertyInfo()
          Returns a list giving static information about all properties exported by this object.
 Vector3d getDisplacement()
           
 java.util.LinkedList<FemElement3d> getElementDependencies()
           
 int getIncompressIndex()
           
 int getIndex()
           
 FemNodeNeighbor getIndirectNeighbor(FemNode3d node)
           
 FemNodeNeighbor getIndirectNeighborBySolveIndex(int idx)
           
 java.util.LinkedList<FemNodeNeighbor> getIndirectNeighbors()
          Indirect neighbors are the neighbors-of-neighbors.
 Vector3d getInternalForce()
           
 FemNodeNeighbor getNodeNeighbor(FemNode3d node)
           
 FemNodeNeighbor getNodeNeighborBySolveIndex(int idx)
           
 java.util.LinkedList<FemNodeNeighbor> getNodeNeighbors()
           
 Point3d getRestPosition()
           
 SymmetricMatrix3d getStrain()
          Returns the averge strain for this node.
 SymmetricMatrix3d getStress()
          Returns the averge stress for this node.
 Vector3d getTargetDisplacement()
           
 double getVonMisesStrain()
          Returns the von Mises strain for this node.
 double getVonMisesStress()
          Returns the von Mises stress for this node.
 int numAdjacentElements()
           
 void removeElementDependency(FemElement3d e)
           
 void resetRestPosition()
           
 void scaleDistance(double s)
          Scales all distance coordinates.
 boolean scanItem(ReaderTokenizer rtok, java.util.Deque<ScanToken> tokens)
           
 void setIncompressIndex(int idx)
           
 void setIndex(int idx)
           
 void setRestPosition(Point3d pos)
           
 void setStrain(double vms)
           
 void setStress(double vms)
           
 void setTargetDisplacement(Vector3d del)
           
 void transformGeometry(AffineTransform3dBase X, TransformableGeometry topObject, int flags)
          Applies an affine transformation to the geometry of this object.
 void zeroStrain()
           
 void zeroStress()
           
 
Methods inherited from class artisynth.core.femmodels.FemNode
addMass
 
Methods inherited from class artisynth.core.mechmodels.Particle
applyGravity, applyPosImpulse, getConstraint, getCopyReferences, getInverseMass, getMass, getMass, getMass, getVelDerivative, isDuplicatable, scaleMass, setConstraint, setDynamic, setMass, transformGeometry
 
Methods inherited from class artisynth.core.mechmodels.Point
addExternalForce, addForce, addPosImpulse, addPosition, addPosJacobian, addScaledExternalForce, addScaledForce, addScaledPosition, addScaledVelocity, addSolveBlock, addSolveBlocks, addTargetJacobian, addToSolveBlockDiagonal, addVelJacobian, addVelocity, applyForces, createMassBlock, createRenderProps, createSolveBlock, distance, distance, getExternalForce, getForce, getForce, getJacobianType, getMassForces, getPointDamping, getPointDampingMode, getPosDerivative, getPosition, getPosition, getPosState, getPosStateSize, getRenderCoords, getRenderProps, getSelection, getState, getState, getTargetActivity, getTargetPos, getTargetPosition, getTargetVel, getTargetVelocity, getTracables, getTracingProbe, getVelocity, getVelocity, getVelState, getVelStateSize, isMassConstant, isSelectable, prerender, render, resetTargets, setExternalForce, setForce, setForce, setForcesToExternal, setPointDamping, setPointDampingMode, setPosition, setPosition, setPosState, setRenderProps, setScaledExternalForce, setState, setState, setState, setTargetActivity, setTargetPos, setTargetPosition, setTargetVel, setTargetVelocity, setVelocity, setVelocity, setVelState, subForce, updateBounds, velocityLimitExceeded, zeroExternalForces, zeroForces
 
Methods inherited from class artisynth.core.mechmodels.DynamicMechComponentBase
addMasterAttachment, getAttachment, getMasterAttachments, getSolveIndex, hasState, isActive, isAttached, isControllable, isDynamic, isParametric, removeMasterAttachment, setAttached, setSolveIndex
 
Methods inherited from class artisynth.core.modelbase.RenderableComponentBase
getRenderHints, numSelectionQueriesNeeded, updateRenderProps
 
Methods inherited from class artisynth.core.modelbase.ModelComponentBase
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, createTempFlag, 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 maspack.render.RenderablePoint
isSelected
 
Methods inherited from interface maspack.render.GLSelectable
numSelectionQueriesNeeded
 
Methods inherited from interface maspack.render.GLRenderable
getRenderHints
 
Methods inherited from interface artisynth.core.mechmodels.DynamicMechComponent
addMasterAttachment, checkFlag, clearFlag, getAttachment, getMasterAttachments, getSolveIndex, isActive, isAttached, isControllable, isDynamic, isParametric, removeMasterAttachment, setAttached, setFlag, setSolveIndex
 
Methods inherited from interface artisynth.core.modelbase.ModelComponent
getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
 
Methods inherited from interface maspack.properties.HierarchyNode
getChildren, hasChildren
 
Methods inherited from interface maspack.util.Scannable
isWritable, write
 

Field Detail

myProps

public static PropertyList myProps
Constructor Detail

FemNode3d

public FemNode3d()

FemNode3d

public FemNode3d(Point3d p)

FemNode3d

public FemNode3d(double x,
                 double y,
                 double z)
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 Particle
Returns:
static information for all exported properties

getIndex

public int getIndex()

setIndex

public void setIndex(int idx)

getIncompressIndex

public int getIncompressIndex()

setIncompressIndex

public void setIncompressIndex(int idx)

getVonMisesStress

public double getVonMisesStress()
Returns the von Mises stress for this node. This is equal to sqrt (3 J2), where J2 is the second invariant of the average deviatoric stress for the node. This quantity is computed from the average nodal stress, which is in turn computed only when computeNodeStresses is enabled for the FEM model containing this node.

Returns:
van Mises stress

getDisplacement

public Vector3d getDisplacement()

getTargetDisplacement

public Vector3d getTargetDisplacement()

setTargetDisplacement

public void setTargetDisplacement(Vector3d del)

getStress

public SymmetricMatrix3d getStress()
Returns the averge stress for this node. Average node stresses are computed by extrapolating the integration point stresses back to the nodes for each element, and then computing the average of these extrapolated values at each node. Average nodal stress is computed only when computeNodeStresses is enabled for the FEM model containing this node.

Returns:
average nodal stress (should not be modified)

setStress

public void setStress(double vms)

zeroStress

public void zeroStress()

getVonMisesStrain

public double getVonMisesStrain()
Returns the von Mises strain for this node. This is equal to sqrt (3 J2), where J2 is the second invariant of the average deviatoric strain for the node. This quantity is computed from the average nodal strain, which is in turn computed only when computeNodeStrain is enabled for the FEM model containing this node.

Returns:
van Mises strain

getStrain

public SymmetricMatrix3d getStrain()
Returns the averge strain for this node. Average node strains are computed by extrapolating the integration point strains back to the nodes for each element, and then computing the average of these extrapolated values at each node. Average nodal strain is computed only when computeNodeStrain is enabled for the FEM model containing this node.

Returns:
average nodal strain (should not be modified)

setStrain

public void setStrain(double vms)

zeroStrain

public void zeroStrain()

getInternalForce

public Vector3d getInternalForce()

getNodeNeighbors

public java.util.LinkedList<FemNodeNeighbor> getNodeNeighbors()

getNodeNeighborBySolveIndex

public FemNodeNeighbor getNodeNeighborBySolveIndex(int idx)

getNodeNeighbor

public FemNodeNeighbor getNodeNeighbor(FemNode3d node)

getIndirectNeighbors

public java.util.LinkedList<FemNodeNeighbor> getIndirectNeighbors()
Indirect neighbors are the neighbors-of-neighbors. We need to keep track of them in the special situation where we are computing soft nodal-based incompressibility. That's because in soft nodal-based incompressibility, all the nodes for all the elements connected to a node form a single force-producing - essentially a "super-element", in that a change in any nodes position affects the soft-nodal-incompressible force on all of the nodes. Hence when computing overall forces and stiffness matrices, each node has a larger set of nodes that influence it.


getIndirectNeighborBySolveIndex

public FemNodeNeighbor getIndirectNeighborBySolveIndex(int idx)

getIndirectNeighbor

public FemNodeNeighbor getIndirectNeighbor(FemNode3d node)

clearIndirectNeighbors

public void clearIndirectNeighbors()

addIndirectNeighbor

public FemNodeNeighbor addIndirectNeighbor(FemNode3d nbrNode)

deregisterNodeNeighbor

public void deregisterNodeNeighbor(FemNode3d nbrNode)

scanItem

public boolean scanItem(ReaderTokenizer rtok,
                        java.util.Deque<ScanToken> tokens)
                 throws java.io.IOException
Throws:
java.io.IOException

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 Particle
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.

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 Particle
Parameters:
s - scaling factor

addElementDependency

public void addElementDependency(FemElement3d e)

removeElementDependency

public void removeElementDependency(FemElement3d e)

getElementDependencies

public java.util.LinkedList<FemElement3d> getElementDependencies()

numAdjacentElements

public int numAdjacentElements()

connectToHierarchy

public void connectToHierarchy()
Description copied from class: ModelComponentBase
Called by the system after this component is added to the component hierarchy (i.e., when it is added as a child of another CompositeComponent). This method is responsible for doing any required hierarchy-dependent initialization.

When this method is called, ModelComponent.getParent() will return the new parent component; the system will have set this beforehand.

Specified by:
connectToHierarchy in interface ModelComponent
Overrides:
connectToHierarchy in class ModelComponentBase

disconnectFromHierarchy

public void disconnectFromHierarchy()
Description copied from class: ModelComponentBase
Called by the system after this component is removed from the component hierarchy (i.e., when it is removed as a child of its parent). This method is responsible for any required hierarchy-dependent deinitialization.

When this method is called, ModelComponent.getParent() will still return this original parent component; the system will set this to null after.

Specified by:
disconnectFromHierarchy in interface ModelComponent
Overrides:
disconnectFromHierarchy in class ModelComponentBase

resetRestPosition

public void resetRestPosition()

getRestPosition

public Point3d getRestPosition()

setRestPosition

public void setRestPosition(Point3d pos)

copy

public FemNode3d copy(int flags,
                      java.util.Map<ModelComponent,ModelComponent> copyMap)
Description copied from interface: CopyableComponent
Create a copy of this component. If COPY_REFERENCES is set in flags, then any component referenced by this component should itself be set to a copy. This should be done first checking copyMap for an existing copy of the referenced component. If there is no existing copy, then a copy should be created by calling copy recursively and adding the new copy to copyMap.

Specified by:
copy in interface CopyableComponent
Overrides:
copy in class FemNode