public abstract class FemModel extends MechSystemBase implements TransformableGeometry, ScalableUnits, Constrainer, ForceEffector, PropertyChangeListener, HasSlaveObjects
Modifier and Type | Class and Description |
---|---|
static class |
FemModel.ElementFilter |
static class |
FemModel.IncompMethod |
static class |
FemModel.Ranging |
static class |
FemModel.SurfaceRender |
ModelComponent.NavpanelVisibility
MechSystem.ConstraintInfo, MechSystem.FrictionInfo
CompositeComponent.NavpanelDisplay
Modifier and Type | Field and Description |
---|---|
static PropertyList |
myProps |
myParametricsInSystemMatrix
DEFAULT_NAVPANEL_DISPLAY
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATING
COMPUTE_CONTACTS, UPDATE_CONTACTS
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
FemModel(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
int |
addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb) |
int |
addFrictionConstraints(SparseBlockMatrix DT,
MechSystem.FrictionInfo[] finfo,
int numf) |
void |
addMarker(FemMarker mkr) |
boolean |
addMarker(FemMarker mkr,
java.util.Collection<? extends FemNode> nodes) |
void |
addMarker(FemMarker mkr,
java.util.Collection<? extends FemNode> nodes,
VectorNd weights) |
void |
addMarker(FemMarker mkr,
FemElement elem) |
void |
addMarker(FemMarker mkr,
FemElement elem,
int markerId) |
boolean |
addMarker(FemMarker mkr,
FemNode[] nodes) |
void |
addMarker(FemMarker mkr,
FemNode[] nodes,
double[] weights) |
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) |
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) |
DynamicComponent |
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 |
getConstrainedComponents(java.util.List<DynamicComponent> list) |
void |
getConstrainers(java.util.List<Constrainer> constrainers,
int level) |
double |
getDensity() |
PropertyMode |
getDensityMode() |
void |
getDynamicComponents(java.util.List<DynamicComponent> active,
java.util.List<DynamicComponent> attached,
java.util.List<DynamicComponent> 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() |
double |
getMassDamping()
Gets the Rayleigh damping coefficient associated with the FEM's mass
|
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()
Gets the Rayleigh damping coefficient associated with the FEM's stiffness
|
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()
Queries if this component has state.
|
void |
invalidateRestData() |
void |
invalidateStressAndStiffness() |
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 |
printNodeMasses(int num) |
void |
propertyChanged(PropertyChangeEvent e) |
void |
recursivelyInitialize(double t,
int level) |
boolean |
removeMarker(FemMarker mkr) |
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer . |
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 |
setMassDamping(double d)
Sets the Rayleigh damping coefficient associated with the FEM's mass
|
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 |
setStiffnessDamping(double d)
Sets the Rayleigh damping coefficient associated with the FEM's stiffness
|
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(Vector3d pmin,
Vector3d 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() |
addActivePosImpulse, addAttachmentJacobian, addAttachmentSolveBlocks, addGeneralMassBlocks, addGeneralSolveBlocks, addPosJacobian, addVelJacobian, advance, applyAttachmentForces, buildMassMatrix, buildSolveMatrix, closePrintStateFile, collectInitialForces, createState, createVelocityJacobian, getActiveForces, getActiveMass, getActivePosDerivative, getActivePosState, getActivePosStateSize, getActiveStiffness, getActiveVelState, getActiveVelState, getActiveVelStateSize, getAttachmentConstraints, getAttachmentDerivatives, getAuxState, getBilateralConstraints, getBilateralConstraintSizes, getBilateralForces, getBilateralImpulses, getBilateralInfo, getDefaultStabilization, getDynamicDOFs, getDynamicsEnabled, getForces, getFrictionConstraints, getInitialState, getInverseMassMatrix, getMassMatrix, getNumBilateralImpulses, getNumUnilateralImpulses, getParametricForces, getParametricPosState, getParametricPosStateSize, getParametricPosTarget, getParametricVelState, getParametricVelStateSize, getParametricVelTarget, getPenetrationLimit, getPrintState, getProfiling, getSolveMatrixType, getSolver, getStabilization, getState, getStructureVersion, getUnilateralConstraints, getUnilateralConstraintSizes, getUnilateralForces, getUnilateralImpulses, getUnilateralInfo, getUpdateForcesAtStepEnd, getUpdateForcesAtStepEndMode, hasParameterizedType, initialize, numActiveComponents, numAttachedComponents, numParametricComponents, openPrintStateFile, preadvance, printActiveStiffness, recursivelyFinalizeAdvance, reduceVelocityJacobian, reopenPrintStateFile, setActiveForces, setActivePosState, setActiveVelState, setAuxState, setBilateralImpulses, setDefaultStabilization, setDynamicsEnabled, setForces, setParametricForces, setParametricPosState, setParametricVelState, setPenetrationLimit, setPrintState, setPrintState, setProfiling, setStabilization, setState, setUnilateralImpulses, setUpdateForcesAtStepEnd, setUpdateForcesAtStepEndMode, topMechSystem, updateAttachmentPos, updateAttachmentVel, updateConstraints, updateForces, updatePosState, updateVelState, writeBilateralConstraintMatrix, writeBilateralConstraintMatrix, writeMassMatrix, writeMassMatrix, writeStiffnessMatrix, writeStiffnessMatrix
createRenderProps, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, prerender, setRenderProps
actionPerformed, copy, dispose, getInitialState, getMaxStepSize, getMenuItems, hierarchyContainsReferences, setInitialState
add, add, addAll, addComponents, addFixed, addNumbered, clone, componentChanged, contains, contains, containsAll, ensureCapacity, findComponent, get, get, getByNumber, getChildren, getNavpanelDisplay, getNumberLimit, getShortName, getTypeParameter, hasChildren, indexOf, invalidateNumbers, isEmpty, iterator, nextComponentNumber, numComponents, postscan, remove, remove, removeAll, removeAll, removeComponents, retainAll, scan, set, setNavpanelDisplay, setNumbered, setNumberingStartAtOne, setShortName, size, toArray, toArray, updateNameMap
checkFlag, checkName, checkNameUniqueness, clearFlag, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, isConnectedToHierarchy, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addTransformableDependencies, transformGeometry, transformGeometry
addPosJacobian, addVelJacobian
getAuxStateComponents, getCollidables, getMassMatrixValues, mulInverseMass
dispose, getMaxStepSize
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getProperty
getChildren, hasChildren
isWritable, write
getName
public static PropertyList myProps
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class RenderableModelBase
public static FemMaterial createDefaultMaterial()
public FemMaterial getMaterial()
public void setMaterial(FemMaterial mat)
public void setLinearMaterial(double E, double nu, boolean corotated)
public void setSurfaceRendering(FemModel.SurfaceRender mode)
public FemModel.SurfaceRender getSurfaceRendering()
public void setSurfaceRenderingMode(PropertyMode mode)
public PropertyMode getSurfaceRenderingMode()
public FemModel.Ranging getStressPlotRanging()
public PropertyMode getStressPlotRangingMode()
public void setStressPlotRangingMode(PropertyMode mode)
public PropertyMode getStressPlotRangeMode()
public void setStressPlotRangeMode(PropertyMode mode)
public void setStressPlotRanging(FemModel.Ranging ranging)
public DoubleInterval getStressPlotRange()
public void resetStressPlotRange()
public void setStressPlotRange(DoubleInterval range)
public void invalidateStressAndStiffness()
public void invalidateRestData()
public Vector3d getGravity()
public void setGravity(Vector3d g)
public void setGravity(double gx, double gy, double gz)
public PropertyMode getGravityMode()
public void setGravityMode(PropertyMode mode)
public void setParticleDamping(double d)
public double getParticleDamping()
public void setMassDamping(double d)
d
- new mass dampingpublic double getMassDamping()
public void setStiffnessDamping(double d)
d
- new stiffness dampingpublic double getStiffnessDamping()
public void setIntegrator(MechSystemSolver.Integrator method)
public MechSystemSolver.Integrator getIntegrator()
public void setMatrixSolver(MechSystemSolver.MatrixSolver method)
public java.lang.Object validateMatrixSolver(MechSystemSolver.MatrixSolver method, StringHolder errMsg)
public MechSystemSolver.MatrixSolver getMatrixSolver()
public void setDensity(double p)
public double getDensity()
public void setDensityMode(PropertyMode mode)
public PropertyMode getDensityMode()
public int numNodes()
public abstract FemNode getNode(int idx)
public abstract ComponentList<? extends FemElement> getElements()
public void addMarker(FemMarker mkr)
public void addMarker(FemMarker mkr, FemElement elem)
public void addMarker(FemMarker mkr, FemElement elem, int markerId)
public void addMarker(FemMarker mkr, java.util.Collection<? extends FemNode> nodes, VectorNd weights)
public boolean removeMarker(FemMarker mkr)
public RenderableComponentList<FemMarker> markers()
public ComponentList<DynamicAttachment> attachments()
public boolean detachPoint(Point p)
public void detachAllNodes()
public void clear()
clear
in interface java.util.Collection<ModelComponent>
clear
in class ComponentList<ModelComponent>
public abstract FemElement getElement(int idx)
public int numElements()
public void zeroExternalForces()
public boolean forcesNeedUpdating()
public void applyForces(double t)
ForceEffector
applyForces
in interface ForceEffector
t
- time (seconds)public void updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderable
updateBounds
in interface IsRenderable
updateBounds
in class RenderableModelBase
pmin
- minimum pointpmax
- maximum pointpublic void render(Renderer renderer, int flags)
IsRenderable
Renderer
.render
in interface IsRenderable
render
in class RenderableModelBase
renderer
- provides the functionality used to perform the rendering.flags
- flags that may be used to control different
aspects of the rendering. Flags are defined in Renderer
and currently include
Renderer.HIGHLIGHT
and
Renderer.SORT_FACES
.public void getAttachments(java.util.List<DynamicAttachment> list, int level)
getAttachments
in interface MechSystemModel
public boolean hasState()
hasState
in interface ModelComponent
hasState
in class ModelComponentBase
true
if this component has statepublic int getImplicitIterations()
public void setImplicitIterations(int max)
public IterativeSolver.ToleranceType getToleranceType()
public void setToleranceType(IterativeSolver.ToleranceType type)
public void scaleDistance(double s)
ScalableUnits
scaleDistance
in interface ScalableUnits
s
- scaling factorpublic double getMass()
public double getNodeMass()
public void printNodeMasses(int num)
public double getEnergy()
public void scaleMass(double s)
ScalableUnits
scaleMass
in interface ScalableUnits
s
- scaling factorpublic void getCollidables(java.util.List<Collidable> list)
public void getDynamicComponents(java.util.List<DynamicComponent> active, java.util.List<DynamicComponent> attached, java.util.List<DynamicComponent> parametric)
getDynamicComponents
in interface MechSystemModel
public void getConstrainers(java.util.List<Constrainer> constrainers, int level)
getConstrainers
in interface MechSystemModel
public void getForceEffectors(java.util.List<ForceEffector> forceEffectors, int level)
getForceEffectors
in interface MechSystemModel
public void getSlaveObjectComponents(java.util.List<HasSlaveObjects> comps, int level)
getSlaveObjectComponents
in interface MechSystemModel
getSlaveObjectComponents
in class MechSystemBase
comps
- HasSlaveObjects components should be added to this listpublic void updateSlavePos()
HasSlaveObjects
updateSlavePos
in interface HasSlaveObjects
public void updateSlaveVel()
HasSlaveObjects
updateSlaveVel
in interface HasSlaveObjects
public void setMaxStepSize(double sec)
setMaxStepSize
in class ModelBase
sec
- maximum step size (seconds)public double updateVolume()
public double getRestVolume()
public double updateRestVolume()
public double getVolume()
public int getNumInverted()
public double getImplicitPrecision()
public void setImplicitPrecision(double prec)
public void getBilateralSizes(VectorNi sizes)
getBilateralSizes
in interface Constrainer
public int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb)
addBilateralConstraints
in interface Constrainer
public int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo, int idx)
getBilateralInfo
in interface Constrainer
public void getUnilateralSizes(VectorNi sizes)
getUnilateralSizes
in interface Constrainer
public int addUnilateralConstraints(SparseBlockMatrix NT, VectorNd dn, int numu)
addUnilateralConstraints
in interface Constrainer
public int getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo, int idx)
getUnilateralInfo
in interface Constrainer
public int maxFrictionConstraintSets()
MechSystem
getFrictionConstraints()
.
This is used to size the finfo
array supplied to that
method.maxFrictionConstraintSets
in interface Constrainer
maxFrictionConstraintSets
in interface MechSystem
maxFrictionConstraintSets
in class MechSystemBase
public int addFrictionConstraints(SparseBlockMatrix DT, MechSystem.FrictionInfo[] finfo, int numf)
addFrictionConstraints
in interface Constrainer
public int setBilateralImpulses(VectorNd lam, double h, int idx)
setBilateralImpulses
in interface Constrainer
setBilateralImpulses
in class MechSystemBase
public void zeroImpulses()
zeroImpulses
in interface Constrainer
public int getBilateralImpulses(VectorNd lam, int idx)
getBilateralImpulses
in interface Constrainer
getBilateralImpulses
in class MechSystemBase
public int setUnilateralImpulses(VectorNd the, double h, int idx)
setUnilateralImpulses
in interface Constrainer
setUnilateralImpulses
in class MechSystemBase
public int getUnilateralImpulses(VectorNd the, int idx)
getUnilateralImpulses
in interface Constrainer
getUnilateralImpulses
in class MechSystemBase
public void recursivelyInitialize(double t, int level)
recursivelyInitialize
in interface MechSystemModel
recursivelyInitialize
in class MechSystemBase
public double getCharacteristicSize()
public DynamicComponent checkVelocityStability()
checkVelocityStability
in interface MechSystemModel
null
if there is no instabilitypublic FemModel copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
copy
in class MechSystemBase
public void propertyChanged(PropertyChangeEvent e)
propertyChanged
in interface PropertyChangeListener
public double updateConstraints(double t, int flags)
updateConstraints
in interface Constrainer
public void getConstrainedComponents(java.util.List<DynamicComponent> list)
getConstrainedComponents
in interface Constrainer
public int getJacobianType()
ForceEffector
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.getJacobianType
in interface ForceEffector
public abstract void addSolveBlocks(SparseNumberedBlockMatrix M)
ForceEffector
getSolveIndex
) for all dynamic or attached components affected by this
force effector.addSolveBlocks
in interface ForceEffector
M
- solve matrix to which blocks should be added