public abstract class FemModel extends MechSystemBase implements TransformableGeometry, ScalableUnits, Constrainer, ForceEffector, PropertyChangeListener, HasSlaveObjects
| Modifier and Type | Class and Description |
|---|---|
static interface |
FemModel.ElementFilter
Interface that determines if an element is valid
|
static class |
FemModel.IncompMethod |
static class |
FemModel.Ranging |
static class |
FemModel.StressStrainMeasure
Specifies a scalar stress/strain measure.
|
static class |
FemModel.SurfaceRender
Specifies how FEM surface meshes should be rendered.
|
MechSystemBase.ConstraintForceStateSaverModelComponent.FilePathSaveType, ModelComponent.NavpanelVisibilityMechSystem.ConstraintInfoCompositeComponent.NavpanelDisplay| Modifier and Type | Field and Description |
|---|---|
static PropertyList |
myProps |
DEFAULT_STABILIZATION, DEFAULT_USE_IMPLICIT_FRICTION, myParametricsInSystemMatrix, mySaveForcesAsState, useAllDynamicCompsDEFAULT_MAX_STEP_SIZEDEFAULT_NAVPANEL_DISPLAYenforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesTG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATINGSTATE_IS_VOLATILECOMPUTE_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)
Appends the current bilateral force constraint matrix
Gc^T to the
matrix GT, by appending block columns to it. |
int |
addFrictionConstraints(SparseBlockMatrix DT,
java.util.ArrayList<FrictionInfo> finfo,
boolean prune,
int numf)
Appends the friction force constraint matrix
Dc^T to the matrix
DT, by appending block columns to it. |
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)
Appends the current unilateral force constraint matrix
Nc^T to the
matrix NT, by appending block columns to it. |
void |
applyForces(double t)
Adds forces to the components affected by this force effector at a
particular time.
|
ComponentList<DynamicAttachmentComp> |
attachments() |
void |
attachPoint(Point p,
FemNode[] nodes,
double[] coords) |
DynamicComponent |
checkVelocityStability()
Checks the velocity stability of this system.
|
void |
clear() |
void |
clearComputeNodalStressStrain()
Cancels the computation of nodal stress, strain and energy density values
for this model.
|
void |
componentChanged(ComponentChangeEvent e)
Notifies this composite component that a change has occured within one or
more of its descendants.
|
FemModel |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap) |
static FemMaterial |
createDefaultMaterial() |
void |
detachAllNodes() |
boolean |
detachPoint(Point p) |
boolean |
forcesNeedUpdating() |
abstract java.util.ArrayList<? extends FemElement> |
getAllElements() |
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 |
getBilateralForces(VectorNd lam,
int idx)
Returns the bilateral forces that were most recently set for this
constrainer using
Constrainer.setBilateralForces(maspack.matrix.VectorNd, double, int). |
int |
getBilateralInfo(MechSystem.ConstraintInfo[] ginfo,
int idx)
Returns constraint information for each row of the bilateral
constraint system
|
void |
getBilateralSizes(VectorNi sizes)
Returns the sizes of each block column in the bilateral force constraint
matrix.
|
double |
getCharacteristicSize() |
void |
getCollidables(java.util.List<Collidable> list) |
boolean |
getComputeNodalEnergyDensity()
Queries whether nodal strain energy densities are computed for this
model.
|
boolean |
getComputeNodalStrain()
Queries whether nodal strains are computed for this model.
|
boolean |
getComputeNodalStress()
Queries whether nodal stresses are computed for this model.
|
boolean |
getComputeStrainEnergy()
Queries whether strain energy is computed for this model.
|
void |
getConstrainedComponents(java.util.HashSet<DynamicComponent> comps)
Collected all the dynamic components constrained by this constrainer.
|
void |
getConstrainers(java.util.List<Constrainer> constrainers,
int level) |
double |
getDensity() |
PropertyMode |
getDensityMode() |
void |
getDynamicComponents(java.util.List<DynamicComponent> comps) |
void |
getDynamicComponents(java.util.List<DynamicComponent> active,
java.util.List<DynamicComponent> attached,
java.util.List<DynamicComponent> parametric) |
double |
getEnergy()
Deprecated.
Use
getKineticEnergy() instead. |
void |
getForceEffectors(java.util.List<ForceEffector> forceEffectors,
int level) |
int |
getFrictionForces(VectorNd phi,
int idx)
Returns the friction forces that were most recently set for this
constrainer using
Constrainer.setFrictionForces(maspack.matrix.VectorNd, double, int). |
int |
getFrictionState(VectorNi state,
int idx) |
Vector3d |
getGravity() |
PropertyMode |
getGravityMode() |
int |
getImplicitIterations() |
double |
getImplicitPrecision() |
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 |
getKineticEnergy()
Queries the current kinetic energy in this FEM model, assuming lumped
nodal masses.
|
double |
getMass() |
double |
getMassDamping()
Gets the Rayleigh damping coefficient associated with the FEM's mass
|
FemMaterial |
getMaterial() |
abstract FemNode |
getNode(int idx) |
abstract FemNode |
getNodeByNumber(int num) |
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.
|
void |
getState(DataBuffer data) |
double |
getStiffnessDamping()
Gets the Rayleigh damping coefficient associated with the FEM's stiffness
|
double |
getStrainEnergy()
Returns the strain energy for this model.
|
DoubleInterval |
getStressPlotRange() |
PropertyMode |
getStressPlotRangeMode() |
FemModel.Ranging |
getStressPlotRanging() |
PropertyMode |
getStressPlotRangingMode() |
FemModel.SurfaceRender |
getSurfaceRendering() |
PropertyMode |
getSurfaceRenderingMode() |
IterativeSolver.ToleranceType |
getToleranceType() |
int |
getUnilateralForces(VectorNd the,
int idx)
Returns the unilateral forces that were most recently set for this
constrainer using
Constrainer.setUnilateralForces(maspack.matrix.VectorNd, double, int). |
int |
getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo,
int idx)
Returns constraint information for each row of the unilateral
constraint system
|
void |
getUnilateralSizes(VectorNi sizes)
Returns the sizes of each block column in the unilateral force constraint
matrix.
|
int |
getUnilateralState(VectorNi state,
int idx) |
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(). |
boolean |
needsNodalStress()
Internal method indicating whether nodal stresses need to be computed
because of either an explicit application request or for mesh rendering.
|
abstract int |
numAllElements() |
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 |
resetAutoStressPlotRange() |
void |
scaleDistance(double s)
Scales all distance coordinates.
|
void |
scaleMass(double s)
Scales all mass units.
|
int |
setBilateralForces(VectorNd lam,
double s,
int idx)
Sets the bilateral forces that were computed to enforce this
constraint.
|
void |
setBounds(Point3d pmin,
Point3d pmax) |
void |
setComputeNodalEnergyDensity(boolean enable)
Sets whether nodal strain energy densities are computed for this
model.
|
void |
setComputeNodalStrain(boolean enable)
Sets whether nodal strains are computed for this model.
|
void |
setComputeNodalStress(boolean enable)
Sets whether nodal stresses are computed for this model.
|
void |
setComputeNodalStressStrain(FemModel.StressStrainMeasure m)
Explicitly enables the collection of nodal stress, strain or energy
density values for this model, as required for the specified
stress/strain measure.
|
void |
setComputeStrainEnergy(boolean enable)
Sets whether strain energy is computed for this model.
|
void |
setDensity(double p) |
void |
setDensityMode(PropertyMode mode) |
int |
setFrictionForces(VectorNd phi,
double s,
int idx)
Sets the friction forces that were computed to enforce this
constraint.
|
int |
setFrictionState(VectorNi state,
int idx) |
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 |
setLinearMaterial(double E,
double nu,
boolean corotated) |
void |
setMassDamping(double d)
Sets the Rayleigh damping coefficient associated with the FEM's mass
|
<T extends FemMaterial> |
setMaterial(T mat) |
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 |
setState(DataBuffer data) |
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 rendering) |
void |
setSurfaceRenderingMode(PropertyMode mode) |
void |
setToleranceType(IterativeSolver.ToleranceType type) |
int |
setUnilateralForces(VectorNd the,
double s,
int idx)
Sets the unilateral forces that were computed to enforce this
constraint.
|
int |
setUnilateralState(VectorNi state,
int idx) |
void |
updateBounds(Vector3d pmin,
Vector3d pmax)
Update the minimum and maximum points for this object.
|
double |
updateConstraints(double t,
int flags)
Updates the current set of constraints, and returns the maximum
penetration
> 0 associated with all of them. |
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() |
void |
zeroExternalForces() |
void |
zeroForces()
Zeros all bilateral and unilateral constraint forces in this constraint.
|
addActivePosImpulse, addAttachmentJacobian, addAttachmentSolveBlocks, addGeneralMassBlocks, addGeneralSolveBlocks, addPosJacobian, addVelJacobian, advance, advanceAuxState, applyAttachmentForces, buildMassMatrix, buildSolveMatrix, closePrintStateFile, collectInitialForces, createState, createVelocityJacobian, getActiveDampingMatrix, getActiveDynamicComponents, getActiveForces, getActiveMass, getActiveMassMatrix, getActivePosDerivative, getActivePosState, getActivePosStateSize, getActiveStiffnessMatrix, getActiveVelState, getActiveVelState, getActiveVelStateSize, getAttachmentConstraints, getAttachmentDerivatives, getAuxAdvanceState, getAuxVarDerivative, getAuxVarState, getAuxVarStateSize, getBilateralConstraints, getBilateralConstraintSizes, getBilateralForces, getBilateralInfo, getDefaultMatrixSolver, getDefaultStabilization, getDefaultUseImplicitFriction, getDynamicComponents, getDynamicDOFs, getDynamicsEnabled, getForceEffectors, getForces, getFrictionConstraints, getFrictionForces, getFrictionState, getInitialState, getIntegrator, getInverseMassMatrix, getMassMatrix, getMatrixSolver, getMatrixSolverRange, getNumBilateralForces, getNumUnilateralForces, getParametricForces, getParametricPosState, getParametricPosStateSize, getParametricPosTarget, getParametricVelState, getParametricVelStateSize, getParametricVelTarget, getPenetrationLimit, getPrintState, getProfiling, getSolveMatrixType, getSolver, getStabilization, getState, getStructureVersion, getUnilateralConstraints, getUnilateralConstraintSizes, getUnilateralForces, getUnilateralInfo, getUnilateralState, getUpdateForcesAtStepEnd, getUpdateForcesAtStepEndMode, getUseImplicitFriction, initialize, isBilateralStructureConstant, numActiveComponents, numAttachedComponents, numParametricComponents, openPrintStateFile, placeDynamicComponent, preadvance, printActiveMass, printActiveMass, printActiveStiffness, printActiveStiffness, recursivelyFinalizeAdvance, recursivelyPrepareAdvance, reduceVelocityJacobian, reopenPrintStateFile, setActiveForces, setActivePosState, setActiveVelState, setAuxAdvanceState, setAuxVarState, setBilateralForces, setDefaultMatrixSolver, setDefaultStabilization, setDefaultUseImplicitFriction, setDynamicsEnabled, setForces, setFrictionForces, setFrictionState, setIntegrator, setMatrixSolver, setParametricForces, setParametricPosState, setParametricVelState, setPenetrationLimit, setPrintState, setPrintState, setProfiling, setStabilization, setState, setUnilateralForces, setUnilateralState, setUpdateForcesAtStepEnd, setUpdateForcesAtStepEndMode, setUseImplicitFriction, topMechSystem, updateAttachmentPos, updateAttachmentVel, updateConstraints, updateDynamicComponentLists, updateForceComponentList, updateForces, updatePosState, updateVelState, writeBilateralConstraintMatrix, writeBilateralConstraintMatrix, writeMassMatrix, writeMassMatrix, writePrintStateHeader, writeStiffnessMatrix, writeStiffnessMatrixcreateRenderProps, getRenderHints, getRenderProps, getSelection, isSelectable, numSelectionQueriesNeeded, prerender, setRenderPropsactionPerformed, copy, dispose, getDefaultMaxStepSize, getMaxStepSize, getMenuItems, hasParameterizedType, hierarchyContainsReferences, setDefaultMaxStepSizeadd, add, addAll, addComponents, addFixed, addNumbered, clone, contains, contains, containsAll, ensureCapacity, findComponent, get, get, getByNumber, getChildren, getMinNumber, getNavpanelDisplay, getNumberLimit, getOneBasedNumbering, getParameterType, getShortName, hasChildren, incrementNumbering, indexOf, invalidateNumbers, isEditable, isEmpty, iterator, nextComponentNumber, numComponents, postscan, remove, remove, removeAll, removeAll, removeComponents, resetNumbersToIndices, retainAll, scan, set, setEditable, setNavpanelDisplay, setNumbered, setOneBasedNumbering, setShortName, size, toArray, toArray, updateNameMapcheckFlag, checkName, checkNameUniqueness, clearFlag, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddTransformableDependencies, transformGeometry, transformGeometry, transformPriorityaddPosJacobian, addVelJacobiangetAuxStateComponents, getCollidables, getMassMatrixValues, mulInverseMassdispose, getMaxStepSizeconnectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferencesgetPropertygetChildren, hasChildrenpostscanisWritable, writegetNameequals, hashCode, parallelStream, removeIf, spliterator, streamrecursivelyFindpublic static PropertyList myProps
public PropertyList getAllPropertyInfo()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class RenderableModelBasepublic static FemMaterial createDefaultMaterial()
public FemMaterial getMaterial()
public <T extends FemMaterial> void setMaterial(T mat)
public void setLinearMaterial(double E,
double nu,
boolean corotated)
public void setSurfaceRendering(FemModel.SurfaceRender rendering)
public FemModel.SurfaceRender getSurfaceRendering()
public void setSurfaceRenderingMode(PropertyMode mode)
public PropertyMode getSurfaceRenderingMode()
public void setStressPlotRanging(FemModel.Ranging ranging)
public FemModel.Ranging getStressPlotRanging()
public void setStressPlotRangingMode(PropertyMode mode)
public PropertyMode getStressPlotRangingMode()
public void setStressPlotRange(DoubleInterval range)
public void resetAutoStressPlotRange()
public DoubleInterval getStressPlotRange()
public void setStressPlotRangeMode(PropertyMode mode)
public PropertyMode getStressPlotRangeMode()
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 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 FemNode getNodeByNumber(int num)
public abstract java.util.ArrayList<? extends FemElement> getAllElements()
public abstract int numAllElements()
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<DynamicAttachmentComp> 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 void componentChanged(ComponentChangeEvent e)
ComponentList
This method should propagate the notification up the component hierarchy
by calling notifyParentOfChange.
componentChanged in interface ComponentChangeListenercomponentChanged in interface CompositeComponentcomponentChanged in class ComponentList<ModelComponent>e - optional argument giving specific information about the changepublic void getState(DataBuffer data)
public void setState(DataBuffer data)
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()
getKineticEnergy() instead.public double getKineticEnergy()
public double getStrainEnergy()
getComputeStrainEnergy() returns true; otherwise,
zero is returned.public boolean getComputeNodalStress()
true if nodal stresses are computedpublic void setComputeNodalStress(boolean enable)
false to avoid unnecessary computation.enable - if true, enables nodal stress computationpublic boolean getComputeNodalStrain()
true if nodal strains are computedpublic void setComputeNodalStrain(boolean enable)
false to avoid unnecessary computation.enable - if true, enables nodal strain computationpublic boolean getComputeNodalEnergyDensity()
true if nodal energy densities are computedpublic void setComputeNodalEnergyDensity(boolean enable)
false to avoid unnecessary
computation.enable - if true, enables nodal energy density computationpublic boolean needsNodalStress()
public void setComputeNodalStressStrain(FemModel.StressStrainMeasure m)
m - measure indicating whether stress, strain or energy density
values are neededpublic void clearComputeNodalStressStrain()
public boolean getComputeStrainEnergy()
true if strain energy is computedpublic void setComputeStrainEnergy(boolean enable)
false to avoid unnecessary computation.enable - if true, enables strain energy computationpublic 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 getDynamicComponents(java.util.List<DynamicComponent> comps)
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)
Constrainersizes.getBilateralSizes in interface Constrainersizes - vector to which the block column sizes are appendedpublic int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb)
ConstrainerGc^T to the
matrix GT, by appending block columns to it. If the argument
dg is non-null, it should be used to return the
velocity constraint time derivative, defined by
\dot Gc velstarting at the location
numb. In all cases, the method must
return an updated value of numb, incremented by the total row
size of Gc.addBilateralConstraints in interface ConstrainerGT - matrix to which the bilateral force contraint matrix
is appended.dg - if non-null, returns the velocity constraint time
derivativenumb - starting index for time derivative in dgnumbpublic int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo, int idx)
ConstrainerGc vel = 0.This information is placed in pre-allocated
MechSystem.ConstraintInfo
structures in ginfo, starting at idx. The method must
return an updated value of idx, incremented by the number of
rows of Gc.
The constraint information to be set in ConstraintInfo includes:
dist // distance to the constraint surface. compliance // if > 0, gives constraint compliance value damping // damping; only used if compliance > 0 force // used for computing non-linear compliance
getBilateralInfo in interface Constrainerginfo - returns the constraint informationidx - starting location in ginfo for returning constraint
infoidxpublic void getUnilateralSizes(VectorNi sizes)
Constrainersizes.getUnilateralSizes in interface Constrainersizes - vector to which the block column sizes are appendedpublic int addUnilateralConstraints(SparseBlockMatrix NT, VectorNd dn, int numu)
ConstrainerNc^T to the
matrix NT, by appending block columns to it. If the argument
dn is non-null, it should be used to return the
velocity constraint time derivative, defined by
\dot Nc velstarting at the location
numu. In all cases, the method must
return an updated value of numu, incremented by the total row
size of Nc.addUnilateralConstraints in interface ConstrainerNT - matrix to which the unilateral force contraint matrix
is appended.dn - if non-null, returns the velocity constraint time
derivativenumu - starting index for time derivative in dnnumupublic int getUnilateralInfo(MechSystem.ConstraintInfo[] ninfo, int idx)
ConstrainerNc vel > 0.This information is placed in pre-allocated
MechSystem.ConstraintInfo
structures in ninfo, starting at idx. The method must
return an updated value of idx, incremented by the number of
rows of Nc.
The constraint information to be set in ConstraintInfo includes:
dist // distance to the constraint surface. compliance // if > 0, gives constraint compliance value damping // damping; only used if compliance > 0 force // used for computing non-linear compliance
getUnilateralInfo in interface Constrainerninfo - returns the constraint informationidx - starting location in ninfo for returning constraint
infoidxpublic 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, java.util.ArrayList<FrictionInfo> finfo, boolean prune, int numf)
ConstrainerDc^T to the matrix
DT, by appending block columns to it. Each block column in Dc^T corresponds to a friction constraint set, for which
information should be supplied in the pre-allocated FrictionInfo
structures in finfo, starting at idx. The method must
return an updated value of idx, incremented by the number of
friction constraint sets.addFrictionConstraints in interface ConstrainerDT - matrix to which the friction force contraint matrix
is appended.finfo - returns friction constraint information for each
block column in Dc^Tprune - restrict entries of DT to friction constraints
for which the contact force is > 0.numf - starting index for friction information in finfoidxpublic int setBilateralForces(VectorNd lam, double s, int idx)
Constrainerlam, starting at the index idx, and should be
scaled by s. (In practice, s is used to convert from
impulses to forces.) The method must return an updated value of idx, incremented by the number of forces associated with this constraint.setBilateralForces in interface ConstrainersetBilateralForces in class MechSystemBaselam - supplies the force impulses, which should be scaled by ss - scaling factor for the force valuesidx - starting index of forces in lamidxpublic void zeroForces()
ConstrainerzeroForces in interface Constrainerpublic int getBilateralForces(VectorNd lam, int idx)
ConstrainerConstrainer.setBilateralForces(maspack.matrix.VectorNd, double, int). The forces are returned in
lam, starting at the index idx. The method must return
an updated value of idx, incremented by the number of forces
associated with this constraint.getBilateralForces in interface ConstrainergetBilateralForces in class MechSystemBaselam - returns the forcesidx - starting index for forces in lamidxpublic int setUnilateralForces(VectorNd the, double s, int idx)
Constrainerthe, starting at the index idx, and should be
scaled by s. (In practice, s is used to convert from
impulses to forces.) The method must return an updated value of idx, incremented by the number of forces associated with this constraint.setUnilateralForces in interface ConstrainersetUnilateralForces in class MechSystemBasethe - supplies the force impulses, which should be scaled by ss - scaling factor for the force valuesidx - starting index of forces in theidxpublic int getUnilateralForces(VectorNd the, int idx)
ConstrainerConstrainer.setUnilateralForces(maspack.matrix.VectorNd, double, int). The forces are returned in
the, starting at the index idx. The method must return
an updated value of idx, incremented by the number of forces
associated with this constraint.getUnilateralForces in interface ConstrainergetUnilateralForces in class MechSystemBasethe - returns the forcesidx - starting index for forces in theidxpublic int setUnilateralState(VectorNi state, int idx)
setUnilateralState in interface ConstrainersetUnilateralState in interface MechSystemsetUnilateralState in class MechSystemBasepublic int getUnilateralState(VectorNi state, int idx)
getUnilateralState in interface ConstrainergetUnilateralState in interface MechSystemgetUnilateralState in class MechSystemBasepublic int setFrictionForces(VectorNd phi, double s, int idx)
phi, starting at the index idx, and should be
scaled by s. (In practice, s is used to convert from
impulses to forces.) The method must return an updated value of idx, incremented by the number of forces associated with this constraint.setFrictionForces in interface ConstrainersetFrictionForces in class MechSystemBasephi - supplies the force impulses, which should be scaled by ss - scaling factor for the force valuesidx - starting index of forces in phiidxpublic int getFrictionForces(VectorNd phi, int idx)
Constrainer.setFrictionForces(maspack.matrix.VectorNd, double, int). The forces are returned in
phi, starting at the index idx. The method must return
an updated value of idx, incremented by the number of forces
associated with this constraint.getFrictionForces in interface ConstrainergetFrictionForces in class MechSystemBasephi - returns the forcesidx - starting index for forces in phiidxpublic int setFrictionState(VectorNi state, int idx)
setFrictionState in interface ConstrainersetFrictionState in interface MechSystemsetFrictionState in class MechSystemBasepublic int getFrictionState(VectorNi state, int idx)
getFrictionState in interface ConstrainergetFrictionState in interface MechSystemgetFrictionState 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)
Constrainer> 0 associated with all of them. If no constraints are
presently active, returns -1.updateConstraints in interface Constrainerpublic void getConstrainedComponents(java.util.HashSet<DynamicComponent> comps)
ConstrainergetConstrainedComponents in interface Constrainercomps - set to which constrained components should be addedpublic 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