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.NavpanelVisibilityMechSystem.ConstraintInfo, MechSystem.FrictionInfoCompositeComponent.NavpanelDisplay| Modifier and Type | Field and Description |
|---|---|
static PropertyList |
myProps |
myParametricsInSystemMatrixDEFAULT_NAVPANEL_DISPLAYenforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesTG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATINGCOMPUTE_CONTACTS, UPDATE_CONTACTSTRANSPARENT, 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, writeStiffnessMatrixcreateRenderProps, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, prerender, setRenderPropsactionPerformed, copy, dispose, getInitialState, getMaxStepSize, getMenuItems, hierarchyContainsReferences, setInitialStateadd, 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, updateNameMapcheckFlag, 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, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddTransformableDependencies, transformGeometry, transformGeometryaddPosJacobian, addVelJacobiangetAuxStateComponents, getCollidables, getMassMatrixValues, mulInverseMassdispose, getMaxStepSizeconnectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferencesgetPropertygetChildren, hasChildrenisWritable, writegetNamepublic static PropertyList myProps
public PropertyList getAllPropertyInfo()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class RenderableModelBasepublic 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)
ForceEffectorapplyForces in interface ForceEffectort - time (seconds)public void updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderableupdateBounds in interface IsRenderableupdateBounds in class RenderableModelBasepmin - minimum pointpmax - maximum pointpublic void render(Renderer renderer, int flags)
IsRenderableRenderer.render in interface IsRenderablerender in class RenderableModelBaserenderer - 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 MechSystemModelpublic boolean hasState()
hasState in interface ModelComponenthasState in class ModelComponentBasetrue 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)
ScalableUnitsscaleDistance in interface ScalableUnitss - scaling factorpublic double getMass()
public double getNodeMass()
public void printNodeMasses(int num)
public double getEnergy()
public void scaleMass(double s)
ScalableUnitsscaleMass in interface ScalableUnitss - 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 MechSystemModelpublic void getConstrainers(java.util.List<Constrainer> constrainers, int level)
getConstrainers in interface MechSystemModelpublic void getForceEffectors(java.util.List<ForceEffector> forceEffectors, int level)
getForceEffectors in interface MechSystemModelpublic void getSlaveObjectComponents(java.util.List<HasSlaveObjects> comps, int level)
getSlaveObjectComponents in interface MechSystemModelgetSlaveObjectComponents in class MechSystemBasecomps - HasSlaveObjects components should be added to this listpublic void updateSlavePos()
HasSlaveObjectsupdateSlavePos in interface HasSlaveObjectspublic void updateSlaveVel()
HasSlaveObjectsupdateSlaveVel in interface HasSlaveObjectspublic void setMaxStepSize(double sec)
setMaxStepSize in class ModelBasesec - 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 Constrainerpublic int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb)
addBilateralConstraints in interface Constrainerpublic int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo, int idx)
getBilateralInfo in interface Constrainerpublic void getUnilateralSizes(VectorNi sizes)
getUnilateralSizes in interface Constrainerpublic int addUnilateralConstraints(SparseBlockMatrix NT, VectorNd dn, int numu)
addUnilateralConstraints in interface Constrainerpublic int getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo, int idx)
getUnilateralInfo in interface Constrainerpublic int maxFrictionConstraintSets()
MechSystemgetFrictionConstraints().
This is used to size the finfo array supplied to that
method.maxFrictionConstraintSets in interface ConstrainermaxFrictionConstraintSets in interface MechSystemmaxFrictionConstraintSets in class MechSystemBasepublic int addFrictionConstraints(SparseBlockMatrix DT, MechSystem.FrictionInfo[] finfo, int numf)
addFrictionConstraints in interface Constrainerpublic int setBilateralImpulses(VectorNd lam, double h, int idx)
setBilateralImpulses in interface ConstrainersetBilateralImpulses in class MechSystemBasepublic void zeroImpulses()
zeroImpulses in interface Constrainerpublic int getBilateralImpulses(VectorNd lam, int idx)
getBilateralImpulses in interface ConstrainergetBilateralImpulses in class MechSystemBasepublic int setUnilateralImpulses(VectorNd the, double h, int idx)
setUnilateralImpulses in interface ConstrainersetUnilateralImpulses in class MechSystemBasepublic int getUnilateralImpulses(VectorNd the, int idx)
getUnilateralImpulses in interface ConstrainergetUnilateralImpulses in class MechSystemBasepublic void recursivelyInitialize(double t,
int level)
recursivelyInitialize in interface MechSystemModelrecursivelyInitialize in class MechSystemBasepublic double getCharacteristicSize()
public DynamicComponent checkVelocityStability()
checkVelocityStability in interface MechSystemModelnull if there is no instabilitypublic FemModel copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
copy in class MechSystemBasepublic void propertyChanged(PropertyChangeEvent e)
propertyChanged in interface PropertyChangeListenerpublic double updateConstraints(double t,
int flags)
updateConstraints in interface Constrainerpublic void getConstrainedComponents(java.util.List<DynamicComponent> list)
getConstrainedComponents in interface Constrainerpublic int getJacobianType()
ForceEffectorMatrix.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 ForceEffectorpublic abstract void addSolveBlocks(SparseNumberedBlockMatrix M)
ForceEffectorgetSolveIndex) for all dynamic or attached components affected by this
force effector.addSolveBlocks in interface ForceEffectorM - solve matrix to which blocks should be added