public class FemModel3d extends FemModel implements TransformableGeometry, ScalableUnits, Collidable, CopyableComponent, HasNumericState, HasSurfaceMesh, PointAttachable, ConnectableBody
FemModel.ElementFilter, FemModel.IncompMethod, FemModel.Ranging, FemModel.StressStrainMeasure, FemModel.SurfaceRender
MechSystemBase.ConstraintForceStateSaver
Collidable.Collidability, Collidable.Group
ModelComponent.NavpanelVisibility
MechSystem.ConstraintInfo
CompositeComponent.NavpanelDisplay
Modifier and Type | Field and Description |
---|---|
static boolean |
abortOnInvertedElems |
static boolean |
checkTangentStability |
static boolean |
debugx |
static boolean |
DEFAULT_ABORT_ON_INVERTED_ELEMENTS |
static FemModel.IncompMethod |
DEFAULT_HARD_INCOMP |
static FemModel.IncompMethod |
DEFAULT_SOFT_INCOMP |
static java.lang.String |
DEFAULT_SURFACEMESH_NAME |
static boolean |
defaultAutoGenerateSurface |
static double |
detJStepReductionLimit |
static double |
frameMassFraction |
static PropertyList |
myProps |
static boolean |
noIncompressStiffnessDamping |
static boolean |
useFrameRelativeCouplingMasses |
static boolean |
useNodalMassWeights |
DEFAULT_STABILIZATION, DEFAULT_USE_IMPLICIT_FRICTION, myParametricsInSystemMatrix, mySaveForcesAsState, useAllDynamicComps
DEFAULT_MAX_STEP_SIZE
DEFAULT_NAVPANEL_DISPLAY
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TG_ARTICULATED, TG_DRAGGER, TG_PRESERVE_ORIENTATION, TG_SIMULATING
All, AllBodies, Deformable, Rigid, Self
COPY_REFERENCES, REST_POSITION
STATE_IS_VOLATILE
COMPUTE_CONTACTS, UPDATE_CONTACTS
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
FemModel3d() |
FemModel3d(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addAuxMaterialBundle(AuxMaterialBundle bundle) |
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. |
void |
addConnector(BodyConnector c) |
void |
addCutPlane(FemCutPlane cutPlane) |
void |
addElement(FemElement3d e) |
void |
addElements(java.util.Collection<? extends FemElement3d> elems) |
void |
addField(FieldComponent field) |
void |
addGeneralMassBlocks(SparseNumberedBlockMatrix M) |
void |
addMarker(FemMarker mkr)
Adds a marker to this FemModel.
|
FemMarker |
addMarker(Point3d pos)
Creates and adds a marker to this FemModel.
|
FemMarker |
addMarker(Point3d pos,
boolean project)
Creates and adds a marker to this FemModel.
|
void |
addMaterialBundle(MaterialBundle bundle) |
FemMeshComp |
addMesh(MeshBase mesh) |
FemMeshComp |
addMesh(java.lang.String name,
MeshBase mesh) |
void |
addMeshComp(FemMeshComp surf) |
void |
addNode(FemNode3d p) |
void |
addNodes(java.util.Collection<? extends FemNode3d> nodes) |
void |
addNumberedElement(FemElement3d e,
int elemId) |
FemMarker |
addNumberedMarker(Point3d pos,
boolean project,
int markerId) |
FemMarker |
addNumberedMarker(Point3d pos,
int markerId) |
void |
addNumberedNode(FemNode3d p,
int number) |
void |
addNumberedShellElement(ShellElement3d e,
int elemId) |
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 |
addShellElement(ShellElement3d e) |
void |
addShellElements(java.util.Collection<? extends ShellElement3d> elems) |
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.
|
void |
attachFrame(RigidTransform3d TRW) |
boolean |
checkElementCondition(FemElement3dBase e,
double detJ,
boolean recordInversion) |
void |
clearAuxMaterialBundles() |
void |
clearCutPlanes() |
void |
clearElementConditionInfo() |
void |
clearElements() |
void |
clearFields() |
void |
clearMaterialBundles() |
void |
clearMeshComps() |
void |
clearShellElements() |
double |
collectStrainEnergy() |
void |
computeStressAndStiffness(FemElement3d e,
FemMaterial mat,
java.util.ArrayList<FemMaterial> amats,
Matrix6d D,
FemModel.IncompMethod softIncomp) |
boolean |
containsConnector(BodyConnector c) |
FemModel3d |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component.
|
static ColorMapBase |
createDefaultColorMap() |
FrameFem3dAttachment |
createFrameAttachment(Frame frame,
RigidTransform3d TFW)
Returns a FrameAttachment that attaches a
frame to this
component. |
FrameFem3dAttachment |
createFrameAttachment(Frame frame,
RigidTransform3d TFW,
boolean project)
Returns a FrameAttachment that attaches a
frame to this
component. |
PointAttachment |
createPointAttachment(Point pnt)
Returns a PointAttachment that attaches
pnt
to this component. |
PointAttachment |
createPointAttachment(Point pnt,
double reduceTol) |
FemMeshComp |
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. |
FemElement3dBase |
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 nearest element.
|
FemElement3dBase |
findNearestElement(Point3d loc,
Point3d pnt,
FemModel.ElementFilter filter) |
FemNode3d |
findNearestNode(Point3d pnt,
double maxDist)
Finds the nearest node to a specified point that is within
a specified maximum distance.
|
java.util.ArrayList<FemNode3d> |
findNearestNodes(Point3d pnt,
double maxDist)
Finds and returns a list of all the nodes of an FEM that are within a
specified maximum distance of a specified point.
|
ShellElement3d |
findNearestShellElement(Point3d loc,
Point3d pnt)
Returns the shell element within an FEM that is nearest to a
specified point.
|
FemElement3dBase |
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.
|
FemElement3d |
findNearestVolumetricElement(Point3d loc,
Point3d pnt)
Returns the volumetric element within an FEM that contains a specified
point, or if there is no such element, finds the nearest element.
|
java.util.ArrayList<FemElement3dBase> |
getAllElements()
Returns a list of all elements, volumetric and shell.
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
void |
getAttachments(java.util.List<DynamicAttachment> list,
int level) |
java.util.ArrayList<FemMaterial> |
getAugmentingMaterials()
Returns a list of augmenting materials which are applied to all
elements, or
null if there are none. |
RenderableComponentList<AuxMaterialBundle> |
getAuxMaterialBundles() |
void |
getAuxStateComponents(java.util.List<HasNumericState> comps,
int level) |
double |
getAxisLength() |
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.
|
BVTree |
getBVTree()
Return BV tree for those who know what to do with it
|
FemNode3d |
getByNumber(int num)
Deprecated.
use
getNodeByNumber(int) instead |
Collidable.Collidability |
getCollidable()
Returns the
Collidable.Collidability of this Collidable. |
Collidable |
getCollidableAncestor()
Returns the most immediate Collidable ancestor of this Collidable,
if any.
|
void |
getCollidables(java.util.List<Collidable> list,
int level) |
ColorMapBase |
getColorMap() |
PropertyMode |
getColorMapMode() |
java.util.List<BodyConnector> |
getConnectors() |
void |
getConstrainedComponents(java.util.List<DynamicComponent> list)
Collected all the dynamic components constrained by this constrainer.
|
boolean |
getCopyReferences(java.util.List<ModelComponent> refs,
ModelComponent ancestor)
Collects external references which must also be copied in order to
duplicate this component.
|
FemCutPlane |
getCutPlane(int idx) |
RenderableComponentList<FemCutPlane> |
getCutPlanes() |
double |
getDirectorRenderLen() |
void |
getDynamicComponents(java.util.List<DynamicComponent> comps) |
void |
getDynamicComponents(java.util.List<DynamicComponent> active,
java.util.List<DynamicComponent> attached,
java.util.List<DynamicComponent> parametric) |
FemElement3d |
getElement(int idx) |
FemElement3d |
getElementByNumber(int num) |
FemMaterial |
getElementMaterial(FemElement3dBase e) |
java.util.LinkedList<FemElement3d> |
getElementNeighbors(FemNode3d node) |
java.util.ArrayList<Element3dValuePair> |
getElementRestVolumes()
Returns a list of element-value pairs describing the rest volumes of all
the volumetric elements in this model.
|
FemElement3dList<FemElement3d> |
getElements() |
double |
getElementWidgetSize() |
PropertyMode |
getElementWidgetSizeMode() |
FieldComponent |
getField(java.lang.String name) |
ComponentList<FieldComponent> |
getFields() |
FemModelFrame |
getFrame() |
FrameFem3dConstraint |
getFrameConstraint() |
FemModel.IncompMethod |
getHardIncompMethod() |
double |
getIncompCompliance() |
int |
getIncompForces(double[] lbuf,
int idx) |
FemModel.IncompMethod |
getIncompressible() |
Range |
getIncompressibleRange() |
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(SparseNumberedBlockMatrix M,
VectorNd f,
double t) |
RenderableComponentList<MaterialBundle> |
getMaterialBundles() |
FemMeshComp |
getMeshComp(int idx) |
FemMeshComp |
getMeshComp(java.lang.String name) |
MeshComponentList<FemMeshComp> |
getMeshComps() |
DoubleInterval |
getNodalPlotRange(FemModel.SurfaceRender rendering) |
DoubleInterval |
getNodalPlotRangeX(FemModel.SurfaceRender rendering) |
FemNode3d |
getNode(int idx) |
FemNode3d |
getNodeByNumber(int num)
Locates a node within this FEM by number instead of index.
|
java.util.ArrayList<FemNodeNeighbor> |
getNodeNeighbors(FemNode3d node) |
PointList<FemNode3d> |
getNodes() |
boolean |
getOneBasedNodeElementNumbering()
Queries whether the numbering for the nodes, elements and shell elements
in this FEM is one-based.
|
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. |
ShellElement3d |
getShellElement(int idx) |
ShellElement3d |
getShellElementByNumber(int num) |
FemElement3dList<ShellElement3d> |
getShellElements() |
ShellElement3d |
getShellSurfaceElement(Face face) |
FemModel.IncompMethod |
getSoftIncompMethod() |
Range |
getSoftIncompMethodRange() |
void |
getState(DataBuffer data)
Saves state information for this component by adding data to the
supplied DataBuffer.
|
FemElement3dBase |
getSurfaceElement(Face face) |
PolygonalMesh |
getSurfaceMesh()
Returns the surface mesh associated with this component, or
null if no mesh exists. |
FemMeshComp |
getSurfaceMeshComp() |
PolygonalMesh[] |
getSurfaceMeshes()
Returns an array listing all the (non-null) surface meshes associated
with this component, or a zero-length array if there are none.
|
FemNode3d |
getSurfaceNode(Vertex3d vtx)
Returns the FEM node (if any) associated with a specified
surface mesh vertex.
|
Vertex3d |
getSurfaceVertex(FemNode3d node)
Returns the surface mesh vertex (if any) associated with a specified
node.
|
java.util.ArrayList<Element3dValuePair> |
getTetAspectRatios()
Returns a list of element-value pairs describing the aspect ratios of all
the tet elements in this model.
|
boolean |
getUseConsistentMass() |
void |
handleComponentChanged(ComponentChangeEvent e) |
boolean |
hasHexMesh() |
boolean |
hasTetMesh() |
void |
invalidateElementRotationData() |
void |
invalidateRestData() |
void |
invalidateStressAndStiffness() |
void |
invalidateSurfaceMesh() |
boolean |
isAbortOnInvertedElements() |
boolean |
isAutoGeneratingSurface() |
boolean |
isCompound()
Queries whether or not this collidable has sub-collidables.
|
boolean |
isDeformable()
Returns
true if this collidable is deformable. |
boolean |
isDuplicatable()
Returns true if this component can be duplicated.
|
boolean |
isFrameRelative() |
boolean |
isFreeBody() |
boolean |
isSurfaceEdge(FemNode3d node0,
FemNode3d node1)
Returns true if a specified node pair lies along an edge of the surface
mesh returned by
getSurfaceMesh() . |
boolean |
isSurfaceMeshValid() |
boolean |
isSurfaceNode(FemNode3d node)
Returns true if a specified node lies on the surface mesh returned by
getSurfaceMesh() . |
boolean |
isVolumeValid() |
boolean |
isWarnOnInvertedElements() |
int |
markInvertedRestElements() |
void |
mulInverseMass(SparseBlockMatrix M,
VectorNd a,
VectorNd f) |
int |
numAllElements()
Returns the number of all elements, volumetric and shell.
|
int |
numCutPlanes() |
int |
numElements() |
int |
numFields() |
int |
numHexElements() |
int |
numMeshComps() |
int |
numQuadraticElements() |
int |
numShellElements() |
int |
numSurfaceMeshes()
Returns the number of surfaces meshes associated with this
component, or 0 if no meshes exist.
|
int |
numTetElements() |
void |
postscan(java.util.Deque<ScanToken> tokens,
CompositeComponent ancestor)
Performs any required post-scanning for this component.
|
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 |
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) |
boolean |
removeAuxMaterialBundle(AuxMaterialBundle bundle) |
void |
removeConnector(BodyConnector c) |
boolean |
removeCutPlane(FemCutPlane cutPlane) |
boolean |
removeElement(FemElement3d e) |
boolean |
removeField(FieldComponent field) |
boolean |
removeMaterialBundle(MaterialBundle bundle) |
boolean |
removeMeshComp(FemMeshComp surf) |
boolean |
removeNode(FemNode3d p) |
boolean |
removeShellElement(ShellElement3d e) |
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.
|
void |
scaleMass(double s)
Scales all mass units.
|
void |
scan(ReaderTokenizer rtok,
java.lang.Object ref)
Scans this element from a ReaderTokenizer.
|
FemMeshComp |
scanMesh(ReaderTokenizer rtok) |
FemMeshComp |
scanMesh(java.lang.String fileName) |
FemMeshComp |
scanSurfaceMesh(ReaderTokenizer rtok) |
FemMeshComp |
scanSurfaceMesh(java.lang.String fileName) |
void |
setAbortOnInvertedElements(boolean set) |
void |
setAutoGenerateSurface(boolean val) |
void |
setAxisLength(double len) |
int |
setBilateralForces(VectorNd lam,
double s,
int idx)
Sets the bilateral forces that were computed to enforce this
constraint.
|
void |
setCollidable(Collidable.Collidability c) |
void |
setColorMap(ColorMapBase colorMap) |
void |
setColorMapMode(PropertyMode mode) |
void |
setComputeStrainEnergy(boolean enable)
Sets whether strain energy is computed for this model.
|
void |
setDirectorRenderLen(double len) |
void |
setElementWidgetSize(double size) |
void |
setElementWidgetSizeMode(PropertyMode mode) |
void |
setFrameRelative(boolean enable) |
void |
setIncompCompliance(double c) |
int |
setIncompForces(double[] lbuf,
double s,
int idx) |
void |
setIncompressible(FemModel.IncompMethod method) |
<T extends FemMaterial> |
setMaterial(T mat) |
void |
setOneBasedNodeElementNumbering(boolean oneBased)
Sets the numbering for the nodes, elements and shell elements in this FEM
to be one-based (as opposed to the default numbering, which is
zero-based).
|
void |
setSoftIncompMethod(FemModel.IncompMethod method) |
void |
setState(DataBuffer data)
Restores the state for this component by reading from the supplied
data buffer, starting at the current buffer offsets.
|
FemMeshComp |
setSurfaceMesh(PolygonalMesh mesh) |
void |
setSurfaceMeshComp(FemMeshComp mesh) |
void |
setUseConsistentMass(boolean enable) |
void |
setWarnOnInvertedElements(boolean set) |
void |
subdivideHex(HexElement hex) |
void |
subdivideHexs(java.util.List<HexElement> hexs) |
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 |
transformPose(RigidTransform3d T) |
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. |
void |
updateSlavePos()
Called when the system's dynamic position state changes, to update the
position state of the slave objects.
|
void |
updateStress() |
void |
updateStressAndStiffness() |
int |
updateStressStrainRenderFlags()
Updates stress and strain rendering flags, and returns a bit mask
of any flags that were newly set.
|
boolean |
usingAttachedRelativeFrame() |
boolean |
writeSurfaceMesh(java.io.PrintWriter pw) |
void |
writeSurfaceMesh(java.lang.String fileName) |
void |
zeroForces()
Zeros all bilateral and unilateral constraint forces in this constraint.
|
addFrictionConstraints, addMarker, addMarker, addMarker, addMarker, addMarker, addMarker, addUnilateralConstraints, applyForces, attachments, attachPoint, checkVelocityStability, clear, clearComputeNodalStressStrain, componentChanged, createDefaultMaterial, detachAllNodes, detachPoint, forcesNeedUpdating, getCharacteristicSize, getCollidables, getComputeNodalEnergyDensity, getComputeNodalStrain, getComputeNodalStress, getComputeStrainEnergy, getConstrainers, getDensity, getDensityMode, getEnergy, getForceEffectors, getFrictionForces, getFrictionState, getGravity, getGravityMode, getImplicitIterations, getImplicitPrecision, getKineticEnergy, getMass, getMassDamping, getMaterial, getNodeMass, getNumInverted, getParticleDamping, getRestVolume, getSlaveObjectComponents, getStiffnessDamping, getStrainEnergy, getStressPlotRange, getStressPlotRangeMode, getStressPlotRanging, getStressPlotRangingMode, getSurfaceRendering, getSurfaceRenderingMode, getToleranceType, getUnilateralForces, getUnilateralInfo, getUnilateralSizes, getUnilateralState, getVolume, hasState, markers, maxFrictionConstraintSets, needsNodalStress, numNodes, printNodeMasses, propertyChanged, removeMarker, resetAutoStressPlotRange, setBounds, setComputeNodalEnergyDensity, setComputeNodalStrain, setComputeNodalStress, setComputeNodalStressStrain, setDensity, setDensityMode, setFrictionForces, setFrictionState, setGravity, setGravity, setGravityMode, setImplicitIterations, setImplicitPrecision, setLinearMaterial, setMassDamping, setMaxStepSize, setParticleDamping, setStiffnessDamping, setStressPlotRange, setStressPlotRangeMode, setStressPlotRanging, setStressPlotRangingMode, setSurfaceRendering, setSurfaceRenderingMode, setToleranceType, setUnilateralForces, setUnilateralState, updateRestVolume, updateSlaveVel, updateVolume, zeroExternalForces
addActivePosImpulse, addAttachmentJacobian, addAttachmentSolveBlocks, 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, 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, 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, updateForces, updatePosState, updateVelState, writeBilateralConstraintMatrix, writeBilateralConstraintMatrix, writeMassMatrix, writeMassMatrix, writePrintStateHeader, writeStiffnessMatrix, writeStiffnessMatrix
createRenderProps, getRenderHints, getRenderProps, isSelectable, numSelectionQueriesNeeded, setRenderProps
actionPerformed, copy, getDefaultMaxStepSize, getMaxStepSize, getMenuItems, hasParameterizedType, hierarchyContainsReferences, setDefaultMaxStepSize
add, add, addAll, addComponents, addFixed, addNumbered, clone, contains, contains, containsAll, ensureCapacity, findComponent, get, get, getChildren, getNavpanelDisplay, getNumberLimit, getOneBasedNumbering, getParameterType, getShortName, hasChildren, indexOf, invalidateNumbers, isEditable, isEmpty, iterator, nextComponentNumber, numComponents, remove, remove, removeAll, removeAll, removeComponents, resetNumbersToIndices, retainAll, set, setEditable, setNavpanelDisplay, setNumbered, setOneBasedNumbering, setShortName, size, toArray, toArray, updateNameMap
checkFlag, 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, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
transformPriority
advanceState, getAuxVarDerivative, getAuxVarState, getStateVersion, hasState, numAuxVars, requiresAdvance, setAuxVarState
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getProperty
getChildren, hasChildren
isWritable, write
getMaxStepSize
getName
public static boolean useFrameRelativeCouplingMasses
public static boolean DEFAULT_ABORT_ON_INVERTED_ELEMENTS
public static boolean abortOnInvertedElems
public static boolean checkTangentStability
public static boolean noIncompressStiffnessDamping
public static boolean useNodalMassWeights
public static double detJStepReductionLimit
public static double frameMassFraction
public static FemModel.IncompMethod DEFAULT_HARD_INCOMP
public static FemModel.IncompMethod DEFAULT_SOFT_INCOMP
public static PropertyList myProps
public static boolean defaultAutoGenerateSurface
public static java.lang.String DEFAULT_SURFACEMESH_NAME
public static boolean debugx
public FemModel3d()
public FemModel3d(java.lang.String name)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class FemModel
public double getAxisLength()
public void setAxisLength(double len)
public boolean isFrameRelative()
public void setFrameRelative(boolean enable)
public void setElementWidgetSize(double size)
public double getElementWidgetSize()
public void setElementWidgetSizeMode(PropertyMode mode)
public PropertyMode getElementWidgetSizeMode()
public FemModel.IncompMethod getIncompressible()
public FemModel.IncompMethod getHardIncompMethod()
public void setIncompressible(FemModel.IncompMethod method)
public Range getIncompressibleRange()
public void setSoftIncompMethod(FemModel.IncompMethod method)
public FemModel.IncompMethod getSoftIncompMethod()
public Range getSoftIncompMethodRange()
public double getIncompCompliance()
public void setIncompCompliance(double c)
public static ColorMapBase createDefaultColorMap()
public ColorMapBase getColorMap()
public void setColorMap(ColorMapBase colorMap)
public PropertyMode getColorMapMode()
public void setColorMapMode(PropertyMode mode)
public double getDirectorRenderLen()
public void setDirectorRenderLen(double len)
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 void setCollidable(Collidable.Collidability c)
public boolean getUseConsistentMass()
public void setUseConsistentMass(boolean enable)
public <T extends FemMaterial> void setMaterial(T mat)
setMaterial
in class FemModel
public FemMaterial getElementMaterial(FemElement3dBase e)
public int updateStressStrainRenderFlags()
FemModel
public void addAuxMaterialBundle(AuxMaterialBundle bundle)
public boolean removeAuxMaterialBundle(AuxMaterialBundle bundle)
public void clearAuxMaterialBundles()
public RenderableComponentList<AuxMaterialBundle> getAuxMaterialBundles()
public void addMaterialBundle(MaterialBundle bundle)
public boolean removeMaterialBundle(MaterialBundle bundle)
public void clearMaterialBundles()
public RenderableComponentList<MaterialBundle> getMaterialBundles()
public FemNode3d getByNumber(int num)
getNodeByNumber(int)
insteadComponentList
getByNumber
in interface ComponentListView<ModelComponent>
getByNumber
in interface CompositeComponent
getByNumber
in class ComponentList<ModelComponent>
num
- number of the componentpublic FemNode3d getNodeByNumber(int num)
getNodeByNumber
in class FemModel
num
- number of the node to locatenull
if no such node
is presentpublic void addNode(FemNode3d p)
public void addNodes(java.util.Collection<? extends FemNode3d> nodes)
public void addNumberedNode(FemNode3d p, int number)
public boolean removeNode(FemNode3d p)
public java.util.ArrayList<FemNodeNeighbor> getNodeNeighbors(FemNode3d node)
public java.util.ArrayList<FemElement3dBase> getAllElements()
getElements()
and
getShellElements()
.getAllElements
in class FemModel
public int numAllElements()
numElements()
and
numShellElements()
.numAllElements
in class FemModel
public double collectStrainEnergy()
public void setComputeStrainEnergy(boolean enable)
FemModel
false
to avoid unnecessary computation.setComputeStrainEnergy
in class FemModel
enable
- if true
, enables strain energy computationpublic FemElement3d getElement(int idx)
public FemElement3d getElementByNumber(int num)
public FemElement3dList<FemElement3d> getElements()
public int numElements()
public java.util.LinkedList<FemElement3d> getElementNeighbors(FemNode3d node)
public FemElement3dBase getSurfaceElement(Face face)
public void addElement(FemElement3d e)
public void addElements(java.util.Collection<? extends FemElement3d> elems)
public void addNumberedElement(FemElement3d e, int elemId)
public boolean removeElement(FemElement3d e)
public void clearElements()
public int numShellElements()
public ShellElement3d getShellElement(int idx)
public ShellElement3d getShellElementByNumber(int num)
public FemElement3dList<ShellElement3d> getShellElements()
public ShellElement3d getShellSurfaceElement(Face face)
public void addShellElement(ShellElement3d e)
public void addShellElements(java.util.Collection<? extends ShellElement3d> elems)
public void addNumberedShellElement(ShellElement3d e, int elemId)
public boolean removeShellElement(ShellElement3d e)
public void clearShellElements()
public void addMarker(FemMarker mkr)
public FemMarker addMarker(Point3d pos)
pos
- position to place a marker in the modelpublic FemMarker addMarker(Point3d pos, boolean project)
project == true
, it will be
projected onto the model's surface.pos
- position to place a marker in the modelproject
- if true and pnt is outside the model, projects to the nearest element.
Otherwise, uses the original position.public FemElement3d findContainingElement(Point3d pnt)
null
if there is no such element.pnt
- Point for which containing element is desired.public FemElement3dBase 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 FemElement3dBase findNearestElement(Point3d loc, Point3d pnt, FemModel.ElementFilter filter)
public FemElement3dBase findNearestElement(Point3d loc, Point3d pnt)
loc
- (optional) If non-null, returns the location of the
point, within the FEM or projected onto the nearest element.pnt
- Point for which the nearest element is desired.public FemElement3d findNearestVolumetricElement(Point3d loc, Point3d pnt)
loc
- (optional) If non-null, returns the location of the point,
within the FEM or projected onto the nearest element.pnt
- Point for which the nearest element is desired.public ShellElement3d findNearestShellElement(Point3d loc, Point3d pnt)
loc
- (optional) If non-null, returns the location of the
point projected onto the nearest element.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 java.util.ArrayList<FemNode3d> findNearestNodes(Point3d pnt, double maxDist)
pnt
- Point for which the nearest nodes should be locatedmaxDist
- Maximum distance that the nodes must be from the
pointpublic FemMeshComp addMesh(MeshBase mesh)
public FemMeshComp addMesh(java.lang.String name, MeshBase mesh)
public FemMeshComp getMeshComp(java.lang.String name)
public FemMeshComp getMeshComp(int idx)
public MeshComponentList<FemMeshComp> getMeshComps()
public int numMeshComps()
public void addMeshComp(FemMeshComp surf)
public boolean removeMeshComp(FemMeshComp surf)
public void clearMeshComps()
public FemCutPlane getCutPlane(int idx)
public RenderableComponentList<FemCutPlane> getCutPlanes()
public int numCutPlanes()
public void addCutPlane(FemCutPlane cutPlane)
public boolean removeCutPlane(FemCutPlane cutPlane)
public void clearCutPlanes()
public FieldComponent getField(java.lang.String name)
public ComponentList<FieldComponent> getFields()
public int numFields()
public void addField(FieldComponent field)
public boolean removeField(FieldComponent field)
public void clearFields()
public Vertex3d getSurfaceVertex(FemNode3d node)
getSurfaceMesh()
.node
- node to checknode
, or
null
if no such vertex existspublic FemNode3d getSurfaceNode(Vertex3d vtx)
getSurfaceMesh()
.vtx
- vertex to checkvtx
, or
null
if no such node existspublic boolean isSurfaceNode(FemNode3d node)
getSurfaceMesh()
.node
- node to checktrue
if node
lies on the surface meshpublic boolean isSurfaceEdge(FemNode3d node0, FemNode3d node1)
getSurfaceMesh()
.node0
- first node to checknode1
- secnd node to checktrue
if both nodes form an edge on the surface meshpublic FemMeshComp createSurfaceMesh(FemModel.ElementFilter efilter)
public FemMeshComp getSurfaceMeshComp()
public PolygonalMesh getSurfaceMesh()
HasSurfaceMesh
null
if no mesh exists. If multiple surface
meshes exist, this should be first one in the array returned
by HasSurfaceMesh.getSurfaceMeshes()
.getSurfaceMesh
in interface HasSurfaceMesh
public int numSurfaceMeshes()
HasSurfaceMesh
HasSurfaceMesh.getSurfaceMesh()
returns null
, then this method should return 0.numSurfaceMeshes
in interface HasSurfaceMesh
public PolygonalMesh[] getSurfaceMeshes()
HasSurfaceMesh
HasSurfaceMesh.getSurfaceMesh()
returns null
, then a
zero-length array should be returned.getSurfaceMeshes
in interface HasSurfaceMesh
public void setAutoGenerateSurface(boolean val)
public boolean isAutoGeneratingSurface()
public boolean isSurfaceMeshValid()
public FemMeshComp setSurfaceMesh(PolygonalMesh mesh)
public void setSurfaceMeshComp(FemMeshComp mesh)
public void invalidateSurfaceMesh()
public void getCollidables(java.util.List<Collidable> list, int level)
getCollidables
in interface MechSystemModel
public Collidable getCollidableAncestor()
Collidable
null
.getCollidableAncestor
in interface Collidable
null
.public boolean isCompound()
Collidable
isCompound
in interface Collidable
true
if this collidable has sub-collidablespublic 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
isDeformable
in interface ConnectableBody
true
if this collidable is deformablepublic 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 void scaleDistance(double s)
ScalableUnits
scaleDistance
in interface ScalableUnits
scaleDistance
in class FemModel
s
- scaling factorpublic void scaleMass(double s)
ScalableUnits
scaleMass
in interface ScalableUnits
scaleMass
in class FemModel
s
- scaling factorpublic void addConnector(BodyConnector c)
addConnector
in interface ConnectableBody
public void removeConnector(BodyConnector c)
removeConnector
in interface ConnectableBody
public boolean containsConnector(BodyConnector c)
containsConnector
in interface ConnectableBody
public java.util.List<BodyConnector> getConnectors()
getConnectors
in interface ConnectableBody
public void transformPose(RigidTransform3d T)
transformPose
in interface ConnectableBody
public boolean isFreeBody()
isFreeBody
in interface ConnectableBody
public void handleComponentChanged(ComponentChangeEvent e)
public void invalidateRestData()
invalidateRestData
in class FemModel
public void resetRestPosition()
public void updateSlavePos()
HasSlaveObjects
updateSlavePos
in interface HasSlaveObjects
updateSlavePos
in class FemModel
public void invalidateElementRotationData()
public boolean isAbortOnInvertedElements()
public void setAbortOnInvertedElements(boolean set)
public void setWarnOnInvertedElements(boolean set)
public boolean isWarnOnInvertedElements()
public int markInvertedRestElements()
public boolean isVolumeValid()
public void recursivelyFinalizeAdvance(StepAdjustment stepAdjust, double t0, double t1, int flags, int level)
recursivelyFinalizeAdvance
in interface MechSystemModel
recursivelyFinalizeAdvance
in class MechSystemBase
public void recursivelyInitialize(double t, int level)
recursivelyInitialize
in interface MechSystemModel
recursivelyInitialize
in class FemModel
public void invalidateStressAndStiffness()
invalidateStressAndStiffness
in class FemModel
public void updateStress()
public void updateStressAndStiffness()
public void computeStressAndStiffness(FemElement3d e, FemMaterial mat, java.util.ArrayList<FemMaterial> amats, Matrix6d D, FemModel.IncompMethod softIncomp)
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 java.util.ArrayList<FemMaterial> getAugmentingMaterials()
null
if there are none.public 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 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 DoubleInterval getNodalPlotRangeX(FemModel.SurfaceRender rendering)
public DoubleInterval getNodalPlotRange(FemModel.SurfaceRender rendering)
public int numTetElements()
public boolean hasTetMesh()
public int numHexElements()
public boolean hasHexMesh()
public int numQuadraticElements()
public java.util.ArrayList<Element3dValuePair> getTetAspectRatios()
public java.util.ArrayList<Element3dValuePair> getElementRestVolumes()
public void clearElementConditionInfo()
public boolean checkElementCondition(FemElement3dBase e, double detJ, boolean recordInversion)
public PointAttachment createPointAttachment(Point pnt)
PointAttachable
pnt
to this component. It should not be assumed that pnt
is currently connected to the component hierarchy, and no attempt
should be made to connect the returned attachment to the hierarchy;
the latter, if desired, is the responsibility of the caller.
In some cases, it may not be possible to attach the point at its present location. In that case, the method will create an attachment to the nearest feasible location.
createPointAttachment
in interface PointAttachable
pnt
- point for which an attachment should be createdpnt
to this componentpublic PointAttachment createPointAttachment(Point pnt, double reduceTol)
public FrameFem3dAttachment createFrameAttachment(Frame frame, RigidTransform3d TFW)
frame
to this
component. Once attached the frame will follow the body around. The
initial pose of the frame is specified by TFW
, which gives
its position and orientation in world coordinates. If TFW
is
null
, then the current pose of the frame is used. If
frame
is null
, then a virtual attachment is
created at the initial pose specified by
TFW
. frame
and TFW
cannot both be
null
.
In some cases, it may not be possible to attach the frame at the requested location. In that case, the method will relocate the frame to the nearest feasible attachment location.
createFrameAttachment
in interface FrameAttachable
frame
- frame to be attachedTFW
- transform from (initial) frame coordinates to world
coordinatesframe
to this componentpublic FrameFem3dAttachment createFrameAttachment(Frame frame, RigidTransform3d TFW, boolean project)
frame
to this
component. Once attached the frame will follow the body around. The
initial pose of the frame is specified by TFW
, which gives
its position and orientation in world coordinates. If TFW
is
null
, then the current pose of the frame is used. If
frame
is null
, then a virtual attachment is
created at the initial pose specified by
TFW
. frame
and TFW
cannot both be
null
.frame
- frame to be attachedTFW
- transform from (initial) frame coordinates to world
coordinatesproject
- if true and if the frame is outside the FEM, then
the frame gets projected to the nearest point on the FEMframe
to this componentpublic void subdivideHexs(java.util.List<HexElement> hexs)
public void subdivideHex(HexElement hex)
public double updateConstraints(double t, int flags)
Constrainer
>
0 associated with all of them. If no constraints are
presently active, returns -1.updateConstraints
in interface Constrainer
updateConstraints
in class FemModel
public void getConstrainedComponents(java.util.List<DynamicComponent> list)
Constrainer
getConstrainedComponents
in interface Constrainer
getConstrainedComponents
in class FemModel
list
- list to which constrained components should be appendedpublic int setIncompForces(double[] lbuf, double s, int idx)
public int setBilateralForces(VectorNd lam, double s, int idx)
Constrainer
lam
, 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 Constrainer
setBilateralForces
in class FemModel
lam
- supplies the force impulses, which should be scaled by s
s
- scaling factor for the force valuesidx
- starting index of forces in lam
idx
public void zeroForces()
Constrainer
zeroForces
in interface Constrainer
zeroForces
in class FemModel
public int getIncompForces(double[] lbuf, int idx)
public int getBilateralForces(VectorNd lam, int idx)
Constrainer
Constrainer.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 Constrainer
getBilateralForces
in class FemModel
lam
- returns the forcesidx
- starting index for forces in lam
idx
public void getBilateralSizes(VectorNi sizes)
Constrainer
sizes
.getBilateralSizes
in interface Constrainer
getBilateralSizes
in class FemModel
sizes
- vector to which the block column sizes are appendedpublic int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb)
Constrainer
Gc^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 Constrainer
addBilateralConstraints
in class FemModel
GT
- 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 dg
numb
public int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo, int idx)
Constrainer
Gc 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 Constrainer
getBilateralInfo
in class FemModel
ginfo
- returns the constraint informationidx
- starting location in ginfo
for returning constraint
infoidx
public void getAuxStateComponents(java.util.List<HasNumericState> comps, int level)
getAuxStateComponents
in interface MechSystemModel
public void getState(DataBuffer data)
HasNumericState
getState
in interface HasNumericState
getState
in class FemModel
data
- buffer for storing the state values.public void setState(DataBuffer data)
HasNumericState
setState
in interface HasNumericState
setState
in class FemModel
data
- buffer containing the state informationpublic 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 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 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 updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderable
updateBounds
in interface IsRenderable
updateBounds
in class FemModel
pmin
- minimum pointpmax
- maximum pointpublic 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
PostScannable
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 PostScannable
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
- if an error is encountered (such as a reference to a
non-existent component)public boolean writeSurfaceMesh(java.io.PrintWriter pw)
public void writeSurfaceMesh(java.lang.String fileName)
public FemMeshComp scanSurfaceMesh(ReaderTokenizer rtok) throws java.io.IOException
java.io.IOException
public FemMeshComp scanSurfaceMesh(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public FemMeshComp scanMesh(ReaderTokenizer rtok) throws java.io.IOException
java.io.IOException
public FemMeshComp scanMesh(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public 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 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
flags
- flags to control the copyingcopyMap
- map to possible existing instances of referenced
componentspublic 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 void setOneBasedNodeElementNumbering(boolean oneBased)
This method is mainly intended to be used for testing and debugging. When one-based numbering is enabled, the numbers of any existing nodes and elements are incremented by one. Likewise, when numbering is disabled, the numbers of existing nodes and elements are decremented incremented by one. To avoid number-related inconsistencies with other components, such as fields, is it recommended that this method be called when the FEM is first created, and before it is used within an Ansys or Abaqus reader.
oneBased
- enables (or diables) one-based numbering for this FEMpublic boolean getOneBasedNodeElementNumbering()
setOneBasedNodeElementNumbering(boolean)
for details.true
if node and element numbering is one-based.public FemModelFrame getFrame()
public boolean usingAttachedRelativeFrame()
public FrameFem3dConstraint getFrameConstraint()
public void attachFrame(RigidTransform3d TRW)
public void getDynamicComponents(java.util.List<DynamicComponent> active, java.util.List<DynamicComponent> attached, java.util.List<DynamicComponent> parametric)
getDynamicComponents
in interface MechSystemModel
getDynamicComponents
in class FemModel
public void getDynamicComponents(java.util.List<DynamicComponent> comps)
getDynamicComponents
in interface MechSystemModel
getDynamicComponents
in class FemModel
public void addGeneralMassBlocks(SparseNumberedBlockMatrix M)
addGeneralMassBlocks
in interface MechSystemModel
addGeneralMassBlocks
in class MechSystemBase
public void getMassMatrixValues(SparseNumberedBlockMatrix 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
public void getAttachments(java.util.List<DynamicAttachment> list, int level)
getAttachments
in interface MechSystemModel
getAttachments
in class FemModel
public void dispose()
ModelBase
public BVTree getBVTree()