public class FemModel3d extends FemModel implements TransformableGeometry, ScalableUnits, MechSystemModel, Collidable, CopyableComponent, HasAuxState
FemModel.ElementFilter, FemModel.IncompMethod, FemModel.Ranging, FemModel.SurfaceRender
ModelComponent.NavpanelVisibility
MechSystem.ConstraintInfo, MechSystem.FrictionInfo
Collidable.DefaultCollidable
HasAuxState.StateContext
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 java.lang.String |
DEFAULT_SURFACEMESH_NAME |
static boolean |
defaultAutoGenerateSurface |
static ColorMapBase |
defaultColorMap |
static double |
detJStepReductionLimit |
static PropertyList |
myProps |
static boolean |
noIncompressStiffnessDamping |
myParametricsInSystemMatrix
DEFAULT_NAVPANEL_DISPLAY
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
ARTICULATED, SIMULATING
COMPUTE_CONTACTS, UPDATE_CONTACTS
Default, Deformable, RigidBody, Self
COPY_REFERENCES
TRANSLUCENT, TWO_DIMENSIONAL
Constructor and Description |
---|
FemModel3d() |
FemModel3d(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
int |
addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb,
IntHolder changeCnt) |
void |
addElement(FemElement3d e) |
void |
addMarker(FemMarker mkr)
Adds a marker to this FemModel.
|
FemMarker |
addMarker(Point3d pos)
Adds a marker to this FemModel.
|
void |
addMaterialBundle(AuxMaterialBundle bundle) |
void |
addMesh(FemMesh surf) |
FemMesh |
addMesh(MeshBase mesh) |
FemMesh |
addMesh(java.lang.String name,
MeshBase mesh) |
void |
addNode(FemNode3d p) |
void |
addNumberedElement(FemElement3d e,
int elemId) |
FemMarker |
addNumberedMarker(Point3d pos,
int markerId) |
void |
addNumberedNode(FemNode3d 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 |
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.
|
StepAdjustment |
advance(double t0,
double t1,
int flags)
Advances this object from time t0 to time t1.
|
void |
advanceAuxState(double t0,
double t1)
Called at the very beginning of the time step (in the system's
preadvance() method) to perform any required updating of the component's
state before the application in input probes or controllers.
|
void |
clearElements() |
void |
clearMaterialBundles() |
void |
componentChanged(ComponentChangeEvent e)
Notifies this composite component that a change has occured within one or
more of its descendants.
|
FemModel3d |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component.
|
DeformableCollisionData |
createCollisionData() |
FemMesh |
createFineSurfaceMesh(int resolution,
FemModel.ElementFilter efilter) |
static FemModel3d |
createGrid(java.lang.String name,
double widthX,
double widthY,
double widthZ,
int numX,
int numY,
int numZ,
double density) |
static FemModel3d |
createHexGrid(java.lang.String name,
double widthX,
double widthY,
double widthZ,
int numX,
int numY,
int numZ,
double density) |
FemMesh |
createSurfaceMesh(java.util.Collection<FemElement> elems) |
FemMesh |
createSurfaceMesh(FemModel.ElementFilter efilter) |
void |
dispose()
Called when the model is discarded.
|
FemElement3d |
findContainingElement(Point3d pnt)
Returns the element within an FEM that contains a specified
point, or
null if there is no such element. |
FemElement3d |
findNearestElement(Point3d loc,
Point3d pnt)
Returns the element within an FEM that contains a specified point, or if
there is no such element, finds the closest surface element.
|
FemNode3d |
findNearestNode(Point3d pnt,
double maxDist)
Finds the nearest node to a specified point that is within
a specified maximum distance.
|
FemElement3d |
findNearestSurfaceElement(Point3d loc,
Point3d pnt)
Returns the nearest surface element to a specified point,
which is found by projecting the point onto the FEM surface.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
void |
getAuxState(DataBuffer data)
Saves state information for this component by adding data to the
supplied DataBuffer.
|
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) |
FemNode3d |
getByNumber(int num)
Get the component with the specified number, or null if there is no such
component.
|
void |
getCollidables(java.util.List<Collidable> list,
int level) |
ColorMapBase |
getColorMap() |
PropertyMode |
getColorMapMode() |
boolean |
getCopyReferences(java.util.List<ModelComponent> refs,
ModelComponent ancestor)
Collects external references which must also be copied in order to
duplicate this component.
|
FemElement3d |
getElement(int idx) |
FemElement3d |
getElementByNumber(int num) |
java.util.LinkedList<FemElement3d> |
getElementNeighbors(FemNode3d node) |
RenderableComponentList<FemElement3d> |
getElements() |
double |
getElementWidgetSize() |
PropertyMode |
getElementWidgetSizeMode() |
FemModel.IncompMethod |
getHardIncompMethod() |
Range |
getHardIncompMethodRange() |
double |
getIncompCompliance() |
FemModel.IncompMethod |
getIncompressible() |
void |
getInitialAuxState(DataBuffer newData,
DataBuffer oldData)
Saves initial state information data for this component by adding data
to the supplied data buffer.
|
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.
|
RenderableComponentList<AuxMaterialBundle> |
getMaterialBundles() |
FemMesh |
getMesh(java.lang.String name) |
MeshComponentList<FemMesh> |
getMeshes() |
DoubleInterval |
getNodalPlotRange(FemModel.SurfaceRender rendering) |
FemNode3d |
getNode(int idx) |
java.util.LinkedList<FemNodeNeighbor> |
getNodeNeighbors(FemNode3d node) |
PointList<FemNode3d> |
getNodes() |
int |
getNumMeshes() |
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() |
Range |
getSoftIncompMethodRange() |
FemElement3d |
getSurfaceElement(Face face) |
PolygonalMesh |
getSurfaceMesh() |
FemMeshVertex |
getSurfaceMeshVertex(FemNode node) |
void |
invalidateRestData() |
void |
invalidateStressAndStiffness() |
void |
invalidateSurfaceMesh() |
boolean |
isAbortOnInvertedElements() |
boolean |
isAutoGeneratingSurface() |
boolean |
isCollidable() |
boolean |
isDuplicatable()
Returns true if this component can be duplicated.
|
boolean |
isSurfaceNode(FemNode3d node) |
boolean |
isWarnOnInvertedElements() |
int |
markInvertedRestElements() |
int |
numQuadraticElements() |
int |
numTetElements() |
void |
postscan(java.util.Deque<ScanToken> tokens,
CompositeComponent ancestor)
Performs any required post-scanning for this component.
|
void |
prerender(RenderList list)
Prepare for rendering, and potentially add itself to a list to be drawn
by a GLRenderer.
|
void |
printANSYSElements(java.io.PrintWriter pw)
Prints the elements of this FEM in a format which is compatible with
ANSYS.
|
void |
printANSYSNodes(java.io.PrintWriter pw)
Prints the nodes of this FEM in a format which is compatible with ANSYS.
|
void |
recursivelyFinalizeAdvance(StepAdjustment stepAdjust,
double t0,
double t1,
int flags,
int level) |
void |
recursivelyInitialize(double t,
int level) |
void |
removeAllMeshes() |
boolean |
removeElement(FemElement3d e) |
boolean |
removeMaterialBundle(AuxMaterialBundle bundle) |
boolean |
removeMesh(FemMesh surf) |
boolean |
removeNode(FemNode3d p) |
void |
render(GLRenderer renderer,
int flags)
Render this object using Open GL via the JOGL.
|
void |
resetRestPosition() |
void |
scaleDistance(double s)
Scales all distance coordinates.
|
void |
scan(ReaderTokenizer rtok,
java.lang.Object ref)
Scans this element from a ReaderTokenizer.
|
PolygonalMesh |
scanMesh(ReaderTokenizer rtok)
Creates a triangular polygonal mesh from a list of faces whose vertices
are described by FEM node numbers.
|
PolygonalMesh |
scanMesh(java.lang.String fileName) |
void |
scanSurfaceMesh(ReaderTokenizer rtok) |
void |
scanSurfaceMesh(java.lang.String fileName) |
void |
setAbortOnInvertedElements(boolean set) |
void |
setAutoGenerateSurface(boolean val) |
void |
setAuxState(DataBuffer data)
Restores the state for this component by reading from the supplied
data buffer, starting at the current buffer offsets.
|
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 |
setIncompCompliance(double c) |
void |
setIncompressible(FemModel.IncompMethod method) |
void |
setMaterial(FemMaterial mat) |
void |
setSoftIncompMethod(FemModel.IncompMethod method) |
FemMesh |
setSurfaceMesh(PolygonalMesh mesh) |
void |
setSurfaceRendering(FemModel.SurfaceRender mode) |
void |
setWarnOnInvertedElements(boolean set) |
void |
skipAuxState(DataBuffer data)
Skips over the state information for this component contained
in the supplied data buffer, starting at the current buffer offsets.
|
void |
subdivideHex(HexElement hex) |
void |
subdivideHexs(java.util.List<HexElement> hexs) |
void |
transformGeometry(AffineTransform3dBase X)
Applies an affine transformation to the geometry of this object.
|
void |
transformGeometry(AffineTransform3dBase X,
TransformableGeometry topObject,
int flags)
Applies an affine transformation to the geometry of this object.
|
double |
updateConstraints(double t,
int flags) |
void |
updateSlavePos()
Called when the system's dynamic position state changes, to update the
position state of the slave objects.
|
void |
updateStress() |
void |
updateStressAndStiffness() |
void |
useAnsysNumbering() |
void |
writeMesh(java.io.PrintWriter pw,
PolygonalMesh mesh) |
void |
writeSurfaceMesh(java.io.PrintWriter pw) |
void |
writeSurfaceMesh(java.lang.String fileName) |
void |
zeroImpulses() |
addFrictionConstraints, addMarker, addMarker, addUnilateralConstraints, applyForces, attachments, attachPoint, checkVelocityStability, clear, createDefaultMaterial, detachAllNodes, detachPoint, forcesNeedUpdating, getAttachments, getCharacteristicSize, getCollidables, getConstrainers, getDensity, getDensityMode, getDynamicComponents, getEnergy, getForceEffectors, getGravity, getGravityMode, getImplicitIterations, getImplicitPrecision, getIntegrator, getMass, getMaterial, getMatrixSolver, getNodeMass, getNumInverted, getParticleDamping, getRestVolume, getSlaveObjectComponents, getStiffnessDamping, getStressPlotRange, getStressPlotRangeMode, getStressPlotRanging, getStressPlotRangingMode, getSurfaceRendering, getSurfaceRenderingMode, getToleranceType, getUnilateralImpulses, getUnilateralInfo, getUnilateralSizes, getVolume, hasState, isProfile, markers, maxFrictionConstraintSets, numElements, numNodes, propertyChanged, removeMarker, resetStressPlotRange, scaleMass, setBounds, setDensity, setDensityMode, setGravity, setGravity, setGravityMode, setImplicitIterations, setImplicitPrecision, setIntegrator, setLinearMaterial, setMatrixSolver, setMaxStepSize, setParticleDamping, setProfile, setStiffnessDamping, setStressPlotRange, setStressPlotRangeMode, setStressPlotRanging, setStressPlotRangingMode, setSurfaceRenderingMode, setToleranceType, setUnilateralImpulses, updateBounds, updateRestVolume, updateSlaveVel, updateVolume, validateMatrixSolver, zeroExternalForces
addActivePosImpulse, addAttachmentJacobian, addAttachmentSolveBlocks, addGeneralSolveBlocks, addPosJacobian, addVelJacobian, applyAttachmentForces, buildMassMatrix, buildSolveMatrix, createState, createVelocityJacobian, getActiveForces, getActivePosDerivative, getActivePosState, getActivePosStateSize, getActiveStiffness, getActiveVelState, getActiveVelState, getActiveVelStateSize, getAttachmentConstraints, getAttachmentDerivatives, getBilateralConstraints, getBilateralConstraintSizes, getBilateralImpulses, getBilateralInfo, getDefaultStabilization, getDynamicsEnabled, getFrictionConstraints, getInitialState, getInverseMassMatrix, getMassMatrix, getNumBilateralImpulses, getNumUnilateralImpulses, getParametricForces, getParametricPosState, getParametricPosStateSize, getParametricPosTarget, getParametricVelState, getParametricVelStateSize, getParametricVelTarget, getPenetrationLimit, getSolveMatrixType, getSolver, getStabilization, getState, getStructureVersion, getUnilateralConstraints, getUnilateralConstraintSizes, getUnilateralImpulses, getUnilateralInfo, getUpdateForcesAtStepEnd, hasParameterizedType, initialize, numActiveComponents, numAttachedComponents, numParametricComponents, preadvance, printActiveStiffness, reduceVelocityJacobian, setActiveForces, setActivePosState, setActiveVelState, setBilateralImpulses, setDefaultStabilization, setDynamicsEnabled, setParametricForces, setParametricPosState, setParametricVelState, setPenetrationLimit, setStabilization, setState, setUnilateralImpulses, setUpdateForcesAtStepEnd, updateAttachmentPos, updateAttachmentVel, updateConstraints, updateForces, updatePosState, updateVelState, writeBilateralConstraintMatrix, writeMassMatrix, writeStiffnessMatrix
createRenderProps, getRenderHints, getRenderProps, isSelectable, numSelectionQueriesNeeded, setRenderProps
copy, getInitialState, getMaxStepSize, 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, remove, remove, removeAll, removeAll, removeComponents, retainAll, setNavpanelDisplay, setNumberingStartAtOne, setShortName, size, toArray, toArray, updateNameMap
checkFlag, checkName, checkNameUniqueness, clearFlag, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, 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
checkVelocityStability, getAttachments, getConstrainers, getDynamicComponents, getForceEffectors, getSlaveObjectComponents
getMaxStepSize, initialize, preadvance
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getProperty
getChildren, hasChildren
isWritable, write
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
getName
public static boolean abortOnInvertedElems
public static boolean checkTangentStability
public static boolean noIncompressStiffnessDamping
public static double detJStepReductionLimit
public static FemModel.IncompMethod DEFAULT_HARD_INCOMP
public static FemModel.IncompMethod DEFAULT_SOFT_INCOMP
public static ColorMapBase defaultColorMap
public static PropertyList myProps
public static boolean defaultAutoGenerateSurface
public static java.lang.String DEFAULT_SURFACEMESH_NAME
public FemModel3d()
public FemModel3d(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 void addMaterialBundle(AuxMaterialBundle bundle)
public boolean removeMaterialBundle(AuxMaterialBundle bundle)
public void clearMaterialBundles()
public RenderableComponentList<AuxMaterialBundle> getMaterialBundles()
public FemNode3d getByNumber(int num)
ComponentList
getByNumber
in interface ComponentListView<ModelComponent>
getByNumber
in interface CompositeComponent
getByNumber
in class ComponentList<ModelComponent>
num
- number of the componentpublic FemElement3d getElementByNumber(int num)
public RenderableComponentList<FemElement3d> getElements()
getElements
in class FemModel
public void addNode(FemNode3d p)
public void addNumberedNode(FemNode3d p, int number)
public boolean removeNode(FemNode3d p)
public FemElement3d getElement(int idx)
getElement
in class FemModel
public java.util.LinkedList<FemNodeNeighbor> getNodeNeighbors(FemNode3d node)
public java.util.LinkedList<FemElement3d> getElementNeighbors(FemNode3d node)
public void addElement(FemElement3d e)
public void addNumberedElement(FemElement3d e, int elemId)
public boolean removeElement(FemElement3d e)
public void clearElements()
public void addMarker(FemMarker mkr)
mkr
- marker point to add to the modelpublic FemMarker addMarker(Point3d pos)
pnt
- point to place a marker in the modelpublic void updateStressAndStiffness()
public void updateStress()
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 StepAdjustment advance(double t0, double t1, int flags)
ModelBase
If the method determines that the step size should be
reduced, it can return a StepAdjustment
object indicating
the recommended reduction. Otherwise, the method may return
null
public void setSurfaceRendering(FemModel.SurfaceRender mode)
setSurfaceRendering
in class FemModel
public void render(GLRenderer renderer, int flags)
GLRenderable
render
in interface GLRenderable
render
in class FemModel
renderer
- renderer object which is used to perform the rendering. Provides pointers
to GL and GLU, along with helper functions.flags
- supplies flags that may be used to control different
aspects of the rendering. Flags are defined in GLRenderer
and currently include
GLRenderer.SELECTED
,
GLRenderer.VERTEX_COLORING
,
GLRenderer.HSV_COLOR_INTERPOLATION
,
GLRenderer.SORT_FACES
, and
GLRenderer.CLEAR_MESH_DISPLAY_LISTS
.public DoubleInterval getNodalPlotRange(FemModel.SurfaceRender rendering)
public void prerender(RenderList list)
GLRenderable
prerender
in interface GLRenderable
prerender
in class RenderableModelBase
public void getSelection(java.util.LinkedList<java.lang.Object> list, int qid)
GLSelectable
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 GLSelectable.numSelectionQueriesNeeded()
is positive), and qid
will in
turn be a number between 0 and nums
-1.getSelection
in interface GLSelectable
getSelection
in class RenderableModelBase
list
- selected objects are appended to the end of this listqid
- index of the selection querypublic static FemModel3d createGrid(java.lang.String name, double widthX, double widthY, double widthZ, int numX, int numY, int numZ, double density)
public static FemModel3d createHexGrid(java.lang.String name, double widthX, double widthY, double widthZ, int numX, int numY, int numZ, double density)
public void scan(ReaderTokenizer rtok, java.lang.Object ref) throws java.io.IOException
ModelComponentBase
write
.scan
in interface ModelComponent
scan
in interface Scannable
scan
in class ComponentList<ModelComponent>
rtok
- Tokenizer from which to scan the elementref
- optional reference object which can be used for resolving references to
other objectsjava.io.IOException
- if an I/O or formatting error occuredpublic void postscan(java.util.Deque<ScanToken> tokens, CompositeComponent ancestor) throws java.io.IOException
ModelComponent
scan()
method and stored in the token queue.
The most common use of this method is to resolve the paths
of component references, which may not have been created
at the time of the initial scan()
call.postscan
in interface ModelComponent
postscan
in class ComponentList<ModelComponent>
tokens
- token information that was stored during
scan()
.ancestor
- ancestor component with respect to which
reference component paths are defined.java.io.IOException
public void writeMesh(java.io.PrintWriter pw, PolygonalMesh mesh)
public PolygonalMesh scanMesh(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public PolygonalMesh scanMesh(ReaderTokenizer rtok) throws java.io.IOException
java.io.IOException
public void writeSurfaceMesh(java.io.PrintWriter pw)
public void writeSurfaceMesh(java.lang.String fileName)
public void scanSurfaceMesh(ReaderTokenizer rtok) throws java.io.IOException
java.io.IOException
public void scanSurfaceMesh(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public void transformGeometry(AffineTransform3dBase X)
TransformableGeometry
transformGeometry (X, this, 0);
transformGeometry
in interface TransformableGeometry
X
- affine transformationpublic void transformGeometry(AffineTransform3dBase X, TransformableGeometry topObject, int flags)
TransformableGeometry
topComponent
should be the component for which the method
was initially invoked. The variable flags
provides
information about the context in which the transformation is
being applied. At present, the available flags are
TransformableGeometry.SIMULATING
and TransformableGeometry.ARTICULATED
.transformGeometry
in interface TransformableGeometry
X
- affine transformationtopObject
- component on which the method was initially invokedflags
- provides information about the context in which the
transformation is being applied.public FemModel.IncompMethod getIncompressible()
public void setMaterial(FemMaterial mat)
setMaterial
in class FemModel
public FemModel.IncompMethod getHardIncompMethod()
public void setIncompressible(FemModel.IncompMethod method)
public Range getHardIncompMethodRange()
public void setSoftIncompMethod(FemModel.IncompMethod method)
public FemModel.IncompMethod getSoftIncompMethod()
public Range getSoftIncompMethodRange()
public double getIncompCompliance()
public void setIncompCompliance(double c)
public int numTetElements()
public int numQuadraticElements()
public void printANSYSNodes(java.io.PrintWriter pw)
pw
- PrintWriter to which nodes are writtenpublic void printANSYSElements(java.io.PrintWriter pw)
pw
- PrintWriter to which elements are writtenpublic FemMeshVertex getSurfaceMeshVertex(FemNode node)
public boolean isSurfaceNode(FemNode3d node)
public FemMesh createSurfaceMesh(java.util.Collection<FemElement> elems)
public FemMesh createSurfaceMesh(FemModel.ElementFilter efilter)
public FemMesh createFineSurfaceMesh(int resolution, FemModel.ElementFilter efilter)
public PolygonalMesh getSurfaceMesh()
public boolean isCollidable()
isCollidable
in interface Collidable
public FemMesh getMesh(java.lang.String name)
public MeshComponentList<FemMesh> getMeshes()
public int getNumMeshes()
public void addMesh(FemMesh surf)
public boolean removeMesh(FemMesh surf)
public void removeAllMeshes()
public void setAutoGenerateSurface(boolean val)
public boolean isAutoGeneratingSurface()
public FemMesh setSurfaceMesh(PolygonalMesh mesh)
public 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 FemElement3d getSurfaceElement(Face face)
public FemElement3d findContainingElement(Point3d pnt)
null
if there is no such element.pnt
- Point for which containing element is desired.public FemElement3d findNearestSurfaceElement(Point3d loc, Point3d pnt)
loc
.loc
- Projected location of the point onto the surface.pnt
- Point for which nearest surface element is desired.public FemElement3d findNearestElement(Point3d loc, Point3d pnt)
loc
- Location of the point, within the FEM or projected onto the
surface.pnt
- Point for which the nearest element is desired.public FemNode3d findNearestNode(Point3d pnt, double maxDist)
null
is returned.pnt
- Point for which the nearest node should be locatedmaxDist
- Maximum distance that the node must be from the
point. If maxDist
< 0, then null
will be returned.null
if there is no such pointpublic void updateSlavePos()
HasSlaveObjects
updateSlavePos
in interface HasSlaveObjects
updateSlavePos
in class FemModel
public int markInvertedRestElements()
public void recursivelyFinalizeAdvance(StepAdjustment stepAdjust, double t0, double t1, int flags, int level)
recursivelyFinalizeAdvance
in interface MechSystemModel
recursivelyFinalizeAdvance
in class MechSystemBase
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 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, IntHolder changeCnt)
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 void subdivideHexs(java.util.List<HexElement> hexs)
public void subdivideHex(HexElement hex)
public void dispose()
ModelBase
public void useAnsysNumbering()
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 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 advanceAuxState(double t0, double t1)
HasAuxState
advanceAuxState
in interface HasAuxState
t0
- beginning time associated with the time step advancet1
- end time associated with the time step advancepublic void skipAuxState(DataBuffer data)
skipAuxState
in interface HasAuxState
data
- buffer containing the state informationpublic void getAuxState(DataBuffer data)
HasAuxState
getAuxState
in interface HasAuxState
getAuxState
in class MechSystemBase
data
- buffer for storing the state values.public void getInitialAuxState(DataBuffer newData, DataBuffer oldData)
HasAuxState
If oldData
is non-null, then this contains
previously stored initial state information (starting at its current
buffer offsets), which should be stored into
newData
in place of the current component state data.
This may only be partially possible if the component's state structure
has changed since oldData
was written.
getInitialAuxState
in interface HasAuxState
newData
- buffer for storing the state values.oldData
- if non-null, contains old state information that should be
written into newData
in place of the current state
information.public void setAuxState(DataBuffer data)
HasAuxState
setAuxState
in interface HasAuxState
setAuxState
in class MechSystemBase
data
- buffer containing the state informationpublic FemModel3d copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
CopyableComponent
COPY_REFERENCES
is set in flags
, then any component referenced
by this component should itself be set to a copy. This
should be done first checking copyMap
for an
existing copy of the referenced component. If there is no existing
copy, then a copy should be created by calling copy
recursively and adding the new copy to copyMap
.copy
in interface CopyableComponent
copy
in class FemModel
public ColorMapBase getColorMap()
public void setColorMap(ColorMapBase colorMap)
public PropertyMode getColorMapMode()
public void setColorMapMode(PropertyMode mode)
public DeformableCollisionData createCollisionData()
createCollisionData
in interface Collidable
public boolean isAbortOnInvertedElements()
public void setAbortOnInvertedElements(boolean set)
public void setWarnOnInvertedElements(boolean set)
public boolean isWarnOnInvertedElements()