public class MFreeModel3d extends FemModel implements TransformableGeometry, ScalableUnits, MechSystemModel, CollidableBody, CopyableComponent
FemModel.ElementFilter, FemModel.IncompMethod, FemModel.Ranging, FemModel.SurfaceRender
MechSystem.ConstraintInfo, MechSystem.FrictionInfo
Collidable.Collidability, Collidable.DefaultCollidable
ModelComponent.NavpanelVisibility
CompositeComponent.NavpanelDisplay
Modifier and Type | Field and Description |
---|---|
static boolean |
abortOnInvertedElems |
static boolean |
checkTangentStability |
static FemModel.IncompMethod |
DEFAULT_HARD_INCOMP |
static FemModel.IncompMethod |
DEFAULT_SOFT_INCOMP |
static ColorMapBase |
defaultColorMap |
static PropertyList |
myProps |
myParametricsInSystemMatrix
DEFAULT_NAVPANEL_DISPLAY
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TG_ARTICULATED, TG_SIMULATING
COMPUTE_CONTACTS, UPDATE_CONTACTS
Default, Deformable, RigidBody, Self
COPY_REFERENCES
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
MFreeModel3d() |
MFreeModel3d(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
int |
addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb) |
static void |
addControls(ControlPanel controlPanel,
FemModel femModel,
ModelComponent topModel) |
void |
addElement(MFreeElement3d e) |
void |
addElements(java.util.List<MFreeElement3d> regionList) |
void |
addMaterialBundle(MFreeAuxMaterialBundle bundle) |
MeshComponent |
addMesh(MeshBase mesh) |
void |
addNode(MFreeNode3d p) |
void |
addNodes(java.util.List<MFreeNode3d> nodes) |
void |
addNumberedElement(MFreeElement3d e,
int elemId) |
void |
addNumberedNode(MFreeNode3d p,
int number) |
void |
addPosJacobian(SparseNumberedBlockMatrix M,
double s)
Scales the components of the position Jacobian associated with this force
effector and adds it to the supplied solve matrix M.
|
void |
addSolveBlocks(SparseNumberedBlockMatrix S)
Adds any needed blocks to a solve matrix in order to accomodate the
Jacobian terms associated with this force effector.
|
void |
addTransformableDependencies(TransformGeometryContext context,
int flags)
Adds to
context any transformable components which should be
transformed as the same time as this component. |
void |
addVelJacobian(SparseNumberedBlockMatrix M,
double s)
Scales the components of the velocity Jacobian associated with this force
effector and adds it to the supplied solve matrix M.
|
boolean |
allowCollision(ContactPoint cpnt,
Collidable other,
java.util.Set<Vertex3d> attachedVertices)
Returns
true if a collision between this Collidable
and other should be allowed for the contact point
cpnt . |
void |
checkInversion() |
DynamicComponent |
checkVelocityStability()
Checks the velocity stability of this system.
|
void |
clearElements() |
void |
clearMaterialBundles() |
void |
clearMeshes() |
void |
componentChanged(ComponentChangeEvent e)
Notifies this composite component that a change has occured within one or
more of its descendants.
|
SparseMatrixNd |
computeConsistentMassMatrix() |
double |
computeConsistentMassMatrixEntry(MFreeNode3d node1,
MFreeNode3d node2) |
void |
computeShapeMatrix() |
boolean |
containsContactMaster(CollidableDynamicComponent comp)
Returns true if this Collidable contains a specified contact master
component.
|
static ColorMapBase |
createDefaultColorMap() |
void |
dispose()
Called when the model is discarded.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
void |
getAuxStateComponents(java.util.List<HasAuxState> comps,
int level) |
int |
getBilateralImpulses(VectorNd lam,
int idx) |
int |
getBilateralInfo(MechSystem.ConstraintInfo[] ginfo,
int idx) |
void |
getBilateralSizes(VectorNi sizes) |
MFreeNode3d |
getByNumber(int num)
Get the component with the specified number, or null if there is no such
component.
|
Collidable.Collidability |
getCollidable()
Returns the
Collidable.Collidability of this Collidable. |
void |
getCollidables(java.util.List<Collidable> list,
int level) |
PolygonalMesh |
getCollisionMesh()
Returns the mesh that should be used for computing collisions, or
null if there is no such mesh. |
ColorMapBase |
getColorMap() |
PropertyMode |
getColorMapMode() |
void |
getConstrainedComponents(java.util.List<DynamicComponent> list) |
boolean |
getCopyReferences(java.util.List<ModelComponent> refs,
ModelComponent ancestor)
Collects external references which must also be copied in order to
duplicate this component.
|
MFreeElement3d |
getElement(int idx) |
BVTree |
getElementBVTree() |
MFreeElement3d |
getElementByNumber(int num) |
RenderableComponentList<MFreeElement3d> |
getElements() |
double |
getElementWidgetSize() |
PropertyMode |
getElementWidgetSizeMode() |
double |
getEnergy() |
FemModel.IncompMethod |
getHardIncompMethod() |
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.
|
void |
getMassMatrixValues(SparseBlockMatrix M,
VectorNd f,
double t) |
RenderableComponentList<MFreeAuxMaterialBundle> |
getMaterialBundles() |
MeshBase |
getMesh(int idx) |
MeshComponent |
getMeshComponent(int idx) |
java.util.Collection<MeshComponent> |
getMeshes() |
MFreeNode3d |
getNode(int idx) |
BVTree |
getNodeBVTree() |
java.util.LinkedList<FemNodeNeighbor> |
getNodeNeighbors(FemNode3d node) |
PointList<MFreeNode3d> |
getNodes() |
void |
getSelection(java.util.LinkedList<java.lang.Object> list,
int qid)
Append to
list the component (or components) associated with
the qid -th selection query issued by this component's render
method. |
FemModel.IncompMethod |
getSoftIncompMethod() |
void |
getVertexMasters(java.util.List<ContactMaster> mlist,
Vertex3d vtx)
Returns all the contact master components associated with a particular
mesh vertex.
|
void |
initialize(double t0)
Causes this model to initialize itself at time t.
|
double |
integrate(Function3x1 fun) |
double |
integrateMass() |
double |
integrateVolume() |
void |
invalidateRestData() |
void |
invalidateStressAndStiffness() |
void |
invalidateSurfaceMesh() |
boolean |
isDeformable()
Returns
true if this collidable is deformable. |
boolean |
isDuplicatable()
Returns true if this component can be duplicated.
|
void |
mulInverseMass(SparseBlockMatrix M,
VectorNd a,
VectorNd f) |
int |
numSurfaceMeshes() |
void |
prerender(RenderList list)
Called prior to rendering to allow this object to update the internal
state required for rendering (such as by caching rendering coordinates).
|
void |
recursivelyFinalizeAdvance(StepAdjustment stepAdjust,
double t0,
double t1,
int flags,
int level) |
void |
recursivelyInitialize(double t,
int level) |
boolean |
removeElement(MFreeElement3d e) |
boolean |
removeMaterialBundle(MFreeAuxMaterialBundle bundle) |
boolean |
removeMesh(MeshBase mesh) |
boolean |
removeNode(MFreeNode3d p) |
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer . |
void |
resetRestPosition() |
void |
scaleDistance(double s)
Scales all distance coordinates.
|
int |
setBilateralImpulses(VectorNd lam,
double h,
int idx) |
void |
setColorMap(ColorMapBase colorMap) |
void |
setColorMapMode(PropertyMode mode) |
void |
setComputeNodalStrain(boolean enable) |
void |
setComputeNodalStress(boolean enable) |
void |
setElementWidgetSize(double size) |
void |
setElementWidgetSizeMode(PropertyMode mode) |
void |
setIncompressible(FemModel.IncompMethod method) |
void |
setMaterial(FemMaterial mat) |
void |
setSoftIncompMethod(FemModel.IncompMethod method) |
void |
setSurfaceRendering(FemModel.SurfaceRender mode) |
void |
transformGeometry(AffineTransform3dBase X)
Applies an affine transformation to the geometry of this component.
|
void |
transformGeometry(GeometryTransformer gtr,
TransformGeometryContext context,
int flags)
Transforms the geometry of this component, using the geometry transformer
gtr to transform its individual attributes. |
void |
updateAllRestVolumes() |
void |
updateAllVolumes() |
void |
updateBounds(Vector3d pmin,
Vector3d pmax)
Update the minimum and maximum points for this object.
|
double |
updateConstraints(double t,
int flags) |
void |
updateJacobians() |
void |
updateNodeMasses(double totalMass,
VectorNd massMatrixDiag) |
void |
updateSlavePos()
Called when the system's dynamic position state changes, to update the
position state of the slave objects.
|
void |
updateStressAndStiffness() |
double |
updateVolume() |
void |
zeroImpulses() |
addFrictionConstraints, addMarker, addMarker, addMarker, addMarker, addMarker, addMarker, addMarker, addUnilateralConstraints, applyForces, attachments, attachPoint, clear, copy, createDefaultMaterial, detachAllNodes, detachPoint, forcesNeedUpdating, getAttachments, getCharacteristicSize, getCollidables, getConstrainers, getDensity, getDensityMode, getDynamicComponents, getForceEffectors, getGravity, getGravityMode, getImplicitIterations, getImplicitPrecision, getIntegrator, getMass, getMassDamping, getMaterial, getMatrixSolver, getNodeMass, getNumInverted, getParticleDamping, getRestVolume, getSlaveObjectComponents, getStiffnessDamping, getStressPlotRange, getStressPlotRangeMode, getStressPlotRanging, getStressPlotRangingMode, getSurfaceRendering, getSurfaceRenderingMode, getToleranceType, getUnilateralImpulses, getUnilateralInfo, getUnilateralSizes, getVolume, hasState, markers, maxFrictionConstraintSets, numElements, numNodes, propertyChanged, removeMarker, resetStressPlotRange, scaleMass, setBounds, setDensity, setDensityMode, setGravity, setGravity, setGravityMode, setImplicitIterations, setImplicitPrecision, setIntegrator, setLinearMaterial, setMassDamping, setMatrixSolver, setMaxStepSize, setParticleDamping, setStiffnessDamping, setStressPlotRange, setStressPlotRangeMode, setStressPlotRanging, setStressPlotRangingMode, setSurfaceRenderingMode, setToleranceType, setUnilateralImpulses, updateRestVolume, updateSlaveVel, validateMatrixSolver, zeroExternalForces
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, getBilateralImpulses, getBilateralInfo, getDefaultStabilization, getDynamicsEnabled, getDynamicSizes, getForces, getFrictionConstraints, getInitialState, getInverseMassMatrix, getMassMatrix, getNumBilateralImpulses, getNumUnilateralImpulses, getParametricForces, getParametricPosState, getParametricPosStateSize, getParametricPosTarget, getParametricVelState, getParametricVelStateSize, getParametricVelTarget, getPenetrationLimit, getPrintState, getProfiling, getSolveMatrixType, getSolver, getStabilization, getState, getStructureVersion, getUnilateralConstraints, getUnilateralConstraintSizes, getUnilateralImpulses, getUnilateralInfo, getUpdateForcesAtStepEnd, getUpdateForcesAtStepEndMode, hasParameterizedType, numActiveComponents, numAttachedComponents, numParametricComponents, openPrintStateFile, preadvance, printActiveStiffness, 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, isSelectable, numSelectionQueriesNeeded, setRenderProps
actionPerformed, copy, getInitialState, getMaxStepSize, getMenuItems, hierarchyContainsReferences, setInitialState
add, add, addAll, addComponents, addFixed, addNumbered, clone, contains, contains, containsAll, ensureCapacity, findComponent, get, get, getChildren, getNavpanelDisplay, getNumberLimit, getShortName, getTypeParameter, hasChildren, indexOf, isEmpty, iterator, nextComponentNumber, numComponents, 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
scaleMass
addGeneralMassBlocks, getAttachments, getConstrainers, getDynamicComponents, getForceEffectors, getSlaveObjectComponents
advance, getMaxStepSize, preadvance
createState, getInitialState, getState, setState
addActivePosImpulse, addPosJacobian, addVelJacobian, buildMassMatrix, buildSolveMatrix, getActiveForces, getActivePosDerivative, getActivePosState, getActivePosStateSize, getActiveVelState, getActiveVelStateSize, getBilateralConstraints, getBilateralImpulses, getBilateralInfo, getFrictionConstraints, getInverseMassMatrix, getMassMatrix, getParametricForces, getParametricPosState, getParametricPosStateSize, getParametricPosTarget, getParametricVelState, getParametricVelStateSize, getParametricVelTarget, getSolveMatrixType, getStructureVersion, getUnilateralConstraints, getUnilateralImpulses, getUnilateralInfo, maxFrictionConstraintSets, numActiveComponents, numParametricComponents, setActiveForces, setActivePosState, setActiveVelState, setBilateralImpulses, setParametricForces, setParametricPosState, setParametricVelState, setUnilateralImpulses, updateConstraints, updateForces
getMass
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getProperty
getChildren, hasChildren
isWritable, write
copy
getName
public static boolean checkTangentStability
public static boolean abortOnInvertedElems
public static FemModel.IncompMethod DEFAULT_HARD_INCOMP
public static FemModel.IncompMethod DEFAULT_SOFT_INCOMP
public static ColorMapBase defaultColorMap
public static PropertyList myProps
public MFreeModel3d()
public MFreeModel3d(java.lang.String name)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class FemModel
public void setElementWidgetSize(double size)
public double getElementWidgetSize()
public void setElementWidgetSizeMode(PropertyMode mode)
public PropertyMode getElementWidgetSizeMode()
public void getCollidables(java.util.List<Collidable> list, int level)
getCollidables
in interface MechSystemModel
public void setComputeNodalStress(boolean enable)
public void setComputeNodalStrain(boolean enable)
public static ColorMapBase createDefaultColorMap()
public void addMaterialBundle(MFreeAuxMaterialBundle bundle)
public boolean removeMaterialBundle(MFreeAuxMaterialBundle bundle)
public void clearMaterialBundles()
public RenderableComponentList<MFreeAuxMaterialBundle> getMaterialBundles()
public BVTree getNodeBVTree()
public BVTree getElementBVTree()
public PointList<MFreeNode3d> getNodes()
public MFreeNode3d getNode(int idx)
public MFreeNode3d getByNumber(int num)
ComponentList
getByNumber
in interface ComponentListView<ModelComponent>
getByNumber
in interface CompositeComponent
getByNumber
in class ComponentList<ModelComponent>
num
- number of the componentpublic MFreeElement3d getElementByNumber(int num)
public RenderableComponentList<MFreeElement3d> getElements()
getElements
in class FemModel
public void addNodes(java.util.List<MFreeNode3d> nodes)
public void addNode(MFreeNode3d p)
public void addNumberedNode(MFreeNode3d p, int number)
public boolean removeNode(MFreeNode3d p)
public void addElements(java.util.List<MFreeElement3d> regionList)
public MFreeElement3d getElement(int idx)
getElement
in class FemModel
public void addElement(MFreeElement3d e)
public void addNumberedElement(MFreeElement3d e, int elemId)
public boolean removeElement(MFreeElement3d e)
public void clearElements()
public java.util.LinkedList<FemNodeNeighbor> getNodeNeighbors(FemNode3d node)
public void updateStressAndStiffness()
public FemModel.IncompMethod getHardIncompMethod()
public void setIncompressible(FemModel.IncompMethod method)
public FemModel.IncompMethod getSoftIncompMethod()
public void setSoftIncompMethod(FemModel.IncompMethod method)
public void setMaterial(FemMaterial mat)
setMaterial
in class FemModel
public void updateJacobians()
public void checkInversion()
public int numSurfaceMeshes()
public MeshBase getMesh(int idx)
public PolygonalMesh getCollisionMesh()
CollidableBody
null
if there is no such mesh. If this method
returns null
, then no collisions will
be performed for this collidable, regardless any default or explicit
collision behaviors that have been arranged by the system.getCollisionMesh
in interface CollidableBody
public Collidable.Collidability getCollidable()
Collidable
Collidable.Collidability
of this Collidable. This provides
control over whether external and/or internal collisions are enabled for
this Collidable. This setting takes precedence over default and
explicitly requested collision behaviors.
Note that for collisions to actually occur, they still need to be enabled through either a default or explicit collision behavior in the MechModel.
getCollidable
in interface Collidable
public boolean isDeformable()
Collidable
true
if this collidable is deformable. Whether or
not a collidable is deformable determines how it responds to default
collision behaviors involving deformable and rigid collidables. Also,
self-collisions among sub-collidables of a collidable A are permitted
only if A is deformable.isDeformable
in interface Collidable
true
if this collidable is deformablepublic java.util.Collection<MeshComponent> getMeshes()
public MeshComponent getMeshComponent(int idx)
public boolean removeMesh(MeshBase mesh)
public MeshComponent addMesh(MeshBase mesh)
public void clearMeshes()
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
getJacobianType
in class FemModel
public void addVelJacobian(SparseNumberedBlockMatrix M, double s)
ForceEffector
M is guaranteed to be the same matrix supplied in the most recent call to
addSolveBlocks
, and so implementations may choose
to cache the relevant matrix blocks from that call, instead of retrieving
them directly from M.
addVelJacobian
in interface ForceEffector
M
- solve matrix to which scaled velocity Jacobian is to be addeds
- scaling factor for velocity Jacobianpublic void addPosJacobian(SparseNumberedBlockMatrix M, double s)
ForceEffector
M is guaranteed to be the same matrix supplied in the most recent call to
addSolveBlocks
, and so implementations may choose
to cache the relevant matrix blocks from that call, instead of retrieving
them directly from M.
addPosJacobian
in interface ForceEffector
M
- solve matrix to which scaled position Jacobian is to be addeds
- scaling factor for position Jacobianpublic void addSolveBlocks(SparseNumberedBlockMatrix S)
ForceEffector
getSolveIndex
) for all dynamic or attached components affected by this
force effector.addSolveBlocks
in interface ForceEffector
addSolveBlocks
in class FemModel
S
- solve matrix to which blocks should be addedpublic void recursivelyInitialize(double t, int level)
recursivelyInitialize
in interface MechSystemModel
recursivelyInitialize
in class FemModel
public double integrate(Function3x1 fun)
public double integrateVolume()
public void updateAllRestVolumes()
public void updateAllVolumes()
public double integrateMass()
public double computeConsistentMassMatrixEntry(MFreeNode3d node1, MFreeNode3d node2)
public SparseMatrixNd computeConsistentMassMatrix()
public void updateNodeMasses(double totalMass, VectorNd massMatrixDiag)
public void initialize(double t0)
ModelBase
HasState.setState(artisynth.core.modelbase.ComponentState)
, in which case t
may have an arbitrary value.initialize
in interface Model
initialize
in class MechSystemBase
t0
- initialization time (seconds)public DynamicComponent checkVelocityStability()
checkVelocityStability
in interface MechSystemModel
checkVelocityStability
in class FemModel
public void setSurfaceRendering(FemModel.SurfaceRender mode)
setSurfaceRendering
in class FemModel
public void render(Renderer renderer, int flags)
IsRenderable
Renderer
.render
in interface IsRenderable
render
in class FemModel
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 prerender(RenderList list)
IsRenderable
list.addIfVisible (obj);
for each of the objects in question.prerender
in interface IsRenderable
prerender
in class RenderableModelBase
list
- list of objects to be renderedpublic void getSelection(java.util.LinkedList<java.lang.Object> list, int qid)
IsSelectable
list
the component (or components) associated with
the qid
-th selection query issued by this component's render
method. This will only be called if this component manages its own
selection (i.e., the number nums
returned by IsSelectable.numSelectionQueriesNeeded()
is positive), and qid
will in
turn be a number between 0 and nums
-1.getSelection
in interface IsSelectable
getSelection
in class RenderableModelBase
list
- selected objects are appended to the end of this listqid
- index of the selection querypublic void invalidateSurfaceMesh()
public void componentChanged(ComponentChangeEvent e)
ComponentList
This method should propagate the notification up the component hierarchy
by calling notifyParentOfChange
.
componentChanged
in interface ComponentChangeListener
componentChanged
in interface CompositeComponent
componentChanged
in class ComponentList<ModelComponent>
e
- optional argument giving specific information about the changepublic void updateSlavePos()
HasSlaveObjects
updateSlavePos
in interface HasSlaveObjects
updateSlavePos
in class FemModel
public void recursivelyFinalizeAdvance(StepAdjustment stepAdjust, double t0, double t1, int flags, int level)
recursivelyFinalizeAdvance
in interface MechSystemModel
recursivelyFinalizeAdvance
in class MechSystemBase
public double updateVolume()
updateVolume
in class FemModel
public void invalidateStressAndStiffness()
invalidateStressAndStiffness
in class FemModel
public void invalidateRestData()
invalidateRestData
in class FemModel
public void resetRestPosition()
public double updateConstraints(double t, int flags)
updateConstraints
in interface Constrainer
updateConstraints
in class FemModel
public void getConstrainedComponents(java.util.List<DynamicComponent> list)
getConstrainedComponents
in interface Constrainer
getConstrainedComponents
in class FemModel
public int setBilateralImpulses(VectorNd lam, double h, int idx)
setBilateralImpulses
in interface Constrainer
setBilateralImpulses
in class FemModel
public void zeroImpulses()
zeroImpulses
in interface Constrainer
zeroImpulses
in class FemModel
public int getBilateralImpulses(VectorNd lam, int idx)
getBilateralImpulses
in interface Constrainer
getBilateralImpulses
in class FemModel
public void getBilateralSizes(VectorNi sizes)
getBilateralSizes
in interface Constrainer
getBilateralSizes
in class FemModel
public int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb)
addBilateralConstraints
in interface Constrainer
addBilateralConstraints
in class FemModel
public int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo, int idx)
getBilateralInfo
in interface Constrainer
getBilateralInfo
in class FemModel
public static void addControls(ControlPanel controlPanel, FemModel femModel, ModelComponent topModel)
public void dispose()
ModelBase
public void scaleDistance(double s)
ScalableUnits
scaleDistance
in interface ScalableUnits
scaleDistance
in class FemModel
s
- scaling factorpublic boolean isDuplicatable()
true
if and only if CopyableComponent.getCopyReferences(java.util.List<artisynth.core.modelbase.ModelComponent>, artisynth.core.modelbase.ModelComponent)
returns true.
This method is not currently used. It is intended to provide a faster
way of determining if a component can be duplicated, without having to
use CopyableComponent.getCopyReferences(java.util.List<artisynth.core.modelbase.ModelComponent>, artisynth.core.modelbase.ModelComponent)
to build the list of copy references.
isDuplicatable
in interface CopyableComponent
true
if this component can be duplicated.public void transformGeometry(AffineTransform3dBase X)
TransformableGeometry
TransformGeometryContext.transform (this, X, 0);
transformGeometry
in interface TransformableGeometry
X
- affine transformation to apply to the componentpublic void transformGeometry(GeometryTransformer gtr, TransformGeometryContext context, int flags)
TransformableGeometry
gtr
to transform its individual attributes. The
context
argument supplies information about what other
components are currently being transformed, and also allows the
requesting of update actions to be performed after all transform called
have completed. The context is also the usual entity that calls
this method, from within its TransformGeometryContext.apply(maspack.geometry.GeometryTransformer, int)
method. The argument flags
provides flags to specify
various conditions associated with the the transformation.
At present, the available flags are TransformableGeometry.TG_SIMULATING
and
TransformableGeometry.TG_ARTICULATED
.
This method is not usually called directly by applications.
Instead, it is typically called from within the
TransformGeometryContext.apply(maspack.geometry.GeometryTransformer, int)
method of the context,
which takes care of the various operations needed for a
complete transform operation, including calling
TransformableGeometry.addTransformableDependencies(artisynth.core.modelbase.TransformGeometryContext, int)
to collect other
components that should be transformed, calling
TransformableGeometry.transformGeometry(maspack.matrix.AffineTransform3dBase)
for each component, notifying
component parents that the geometry has changed, and calling
any requested TransformGeometryAction
s. More details
are given in the documentation for
TransformGeometryContext.apply(maspack.geometry.GeometryTransformer, int)
.
TransformGeometryContext
provides a number of
static convenience transform
methods
which take care of building the context and calling
apply()
for a specified set of components.
This method should not
generally call transformGeometry()
for its descendant
components. Instead, descendants needing transformation should be
specified by adding them to the context in the method TransformableGeometry.addTransformableDependencies(artisynth.core.modelbase.TransformGeometryContext, int)
.
transformGeometry
in interface TransformableGeometry
gtr
- transformer implementing the transformcontext
- context information, including what other components
are being transformedflags
- specifies conditions associated with the transformationpublic void addTransformableDependencies(TransformGeometryContext context, int flags)
TransformableGeometry
context
any transformable components which should be
transformed as the same time as this component. This will generally
include descendant components, and may also include other components to
which this component is connected in some way.
This method is generally called from with the
TransformGeometryContext.apply(maspack.geometry.GeometryTransformer, int)
method of a
TransformGeometryContext
.
addTransformableDependencies
in interface TransformableGeometry
context
- context information, to which the dependent components
are added.flags
- specifies conditions associated with the transformationpublic boolean getCopyReferences(java.util.List<ModelComponent> refs, ModelComponent ancestor)
CopyableComponent
true
if and only if CopyableComponent.isDuplicatable()
returns
true.getCopyReferences
in interface CopyableComponent
refs
- list to which references are appendedancestor
- root node of the hierarchy from which references are to be excludedpublic void getAuxStateComponents(java.util.List<HasAuxState> comps, int level)
getAuxStateComponents
in interface MechSystemModel
public void computeShapeMatrix()
public void updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderable
updateBounds
in interface IsRenderable
updateBounds
in class FemModel
pmin
- minimum pointpmax
- maximum pointpublic ColorMapBase getColorMap()
public void setColorMap(ColorMapBase colorMap)
public PropertyMode getColorMapMode()
public void setColorMapMode(PropertyMode mode)
public void getVertexMasters(java.util.List<ContactMaster> mlist, Vertex3d vtx)
CollidableBody
mlist
. The list should not be cleared. The vertex
should be a vertex of the mesh returned by CollidableBody.getCollisionMesh()
.getVertexMasters
in interface CollidableBody
mlist
- collected master component informationvtx
- vertex for which the master components are requestedpublic boolean containsContactMaster(CollidableDynamicComponent comp)
CollidableBody
containsContactMaster
in interface CollidableBody
comp
- component to test fortrue
if comp
is contained in
this Collidablepublic boolean allowCollision(ContactPoint cpnt, Collidable other, java.util.Set<Vertex3d> attachedVertices)
CollidableBody
true
if a collision between this Collidable
and other
should be allowed for the contact point
cpnt
. In making this decision, this method may
refer to attachedVertices
, which supplies a list
of vertices on this Collidable which are attached in some way
to the other Collidable.allowCollision
in interface CollidableBody
cpnt
- contact point being testedother
- opposing collidableattachedVertices
- list of vertices attached to other
.true
if the collision should be allowedpublic void getMassMatrixValues(SparseBlockMatrix M, VectorNd f, double t)
getMassMatrixValues
in interface MechSystemModel
public void mulInverseMass(SparseBlockMatrix M, VectorNd a, VectorNd f)
mulInverseMass
in interface MechSystem
mulInverseMass
in interface MechSystemModel