public class ScalarSubElemField extends ScalarFemField
For a given element elem
, values should be specified for
all integration points, as returned by FemElement3dBase.getAllIntegrationPoints()
. This includes the regular
integration points, as well as the warping point, which is located at
the element center and is used by corotated linear materials. Integration
point indices should be in the range 0
to FemElement3dBase.numAllIntegrationPoints()
- 1.
ScalarFemField.Visualization
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_SHELL_ELEMS_VISIBLE |
static boolean |
DEFAULT_VOLUME_ELEMS_VISIBLE |
static PropertyList |
myProps |
DEFAULT_COLOR_INTERPOLATION, DEFAULT_VISUALIZATION
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
ScalarSubElemField()
This constructor should not be called by applications, unless
ModelComponentBase.scan(maspack.util.ReaderTokenizer, java.lang.Object) is called immediately after. |
ScalarSubElemField(FemModel3d fem)
Constructs a field for a given FEM model, with a default value of 0.
|
ScalarSubElemField(FemModel3d fem,
double defaultValue)
Constructs a field for a given FEM model and default value.
|
ScalarSubElemField(java.lang.String name,
FemModel3d fem)
Constructs a named field for a given FEM model, with a default value of
0.
|
ScalarSubElemField(java.lang.String name,
FemModel3d fem,
double defaultValue)
Constructs a named field for a given FEM model and default value.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAllValues()
Clear all values defined for the features (e.g., nodes, elements)
associated with this field.
|
void |
clearValue(FemElement3dBase elem,
int subIdx)
Clears the value at an integration of an element (either volumetric or
shell).
|
boolean |
equals(ScalarSubElemField field)
Returns
true if this field is functionally equal to another field. |
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
double |
getElementValue(int elemNum,
int subIdx)
Returns the value at an integration point of a volumetric
element.
|
double |
getShellElementValue(int elemNum,
int subIdx)
Returns the value at an integration point of a shell element.
|
boolean |
getShellElemsVisible() |
void |
getSoftReferences(java.util.List<ModelComponent> refs)
Appends all soft references for this component to a list.
|
double |
getValue(FemElement3dBase elem,
int subIdx)
Returns the value at an integration point of an element (either
volumetric or shell).
|
double |
getValue(FemFieldPoint fp)
Returns the value of the this field at a specified FEM field point.
|
double |
getValue(Point3d pos)
Returns the value of the this field at a specified spatial position.
|
Range |
getVisualizationRange() |
boolean |
getVolumeElemsVisible() |
boolean |
isValueSet(FemElement3dBase elem,
int subIdx)
Queries whether a value has been seen at an integration point of an
element (either volumetric or shell).
|
void |
postscan(java.util.Deque<ScanToken> tokens,
CompositeComponent ancestor)
Performs any required post-scanning for this component.
|
void |
setShellElemsVisible(boolean visible) |
void |
setValue(FemElement3dBase elem,
int subIdx,
double value)
Sets the value at an integration point of an element (either volumetric
or shell).
|
void |
setVolumeElemsVisible(boolean visible) |
void |
updateReferences(boolean undo,
java.util.Deque<java.lang.Object> undoInfo)
May be called by the system if any of the soft references for
this component are removed from the the component hierarchy.
|
addRenderMeshComp, clearRenderMeshComps, createDefaultRenderProps, createRenderProps, equals, getColorInterpolation, getColorMap, getDefaultValue, getRenderMeshComp, getRenderRange, getSelection, getValue, getValueRange, getVisualization, numRenderMeshComps, numSelectionQueriesNeeded, prerender, removeRenderMeshComp, render, setColorInterpolation, setColorMap, setDefaultValue, setRenderRange, setVisualization
clearCacheIfNecessary, equals, getFemModel, getRenderHints, getRenderProps, isSelectable, setRenderProps, updateBounds
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, copy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, hasChildren, hasState, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isSelectable
getRenderHints, updateBounds
getRenderProps, setRenderProps
clearCacheIfNecessary
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable
getProperty
getChildren, hasChildren
isWritable, write
public static boolean DEFAULT_VOLUME_ELEMS_VISIBLE
public static boolean DEFAULT_SHELL_ELEMS_VISIBLE
public static PropertyList myProps
public ScalarSubElemField()
ModelComponentBase.scan(maspack.util.ReaderTokenizer, java.lang.Object)
is called immediately after.public ScalarSubElemField(FemModel3d fem)
fem
- FEM model over which the field is definedpublic ScalarSubElemField(FemModel3d fem, double defaultValue)
fem
- FEM model over which the field is defineddefaultValue
- default value for integration points which don't have
explicitly set valuespublic ScalarSubElemField(java.lang.String name, FemModel3d fem)
name
- name of the fieldfem
- FEM model over which the field is definedpublic ScalarSubElemField(java.lang.String name, FemModel3d fem, double defaultValue)
name
- name of the fieldfem
- FEM model over which the field is defineddefaultValue
- default value for integration points which don't have
explicitly set valuespublic PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class ScalarFemField
public Range getVisualizationRange()
getVisualizationRange
in class ScalarFemField
public boolean getVolumeElemsVisible()
public void setVolumeElemsVisible(boolean visible)
public boolean getShellElemsVisible()
public void setShellElemsVisible(boolean visible)
public double getElementValue(int elemNum, int subIdx)
elemNum
- volumetric element numbersubIdx
- integration point index, in the range 0
to n-1
, where n
is the value returned by the element's FemElement3dBase.numAllIntegrationPoints()
methodpublic double getShellElementValue(int elemNum, int subIdx)
elemNum
- volumetric element numbersubIdx
- integration point index, in the range 0
to n-1
, where n
is the value returned by the element's FemElement3dBase.numAllIntegrationPoints()
methodpublic double getValue(FemElement3dBase elem, int subIdx)
elem
- element containing the integration pointsubIdx
- integration point index, in the range 0
to n-1
, where n
is the value returned by the element's FemElement3dBase.numAllIntegrationPoints()
methodpublic double getValue(FemFieldPoint fp)
fp
- point at which value is requestedpublic double getValue(Point3d pos)
getValue
in interface ScalarFieldComponent
getValue
in class ScalarFemField
pos
- position at which value is requestedpublic void setValue(FemElement3dBase elem, int subIdx, double value)
elem
- element containing the integration pointsubIdx
- integration point index, in the range 0
to n-1
, where n
is the value returned by the element's FemElement3dBase.numAllIntegrationPoints()
methodvalue
- new value for the integration pointpublic boolean isValueSet(FemElement3dBase elem, int subIdx)
elem
- element containing the integration pointsubIdx
- integration point index, in the range 0
to n-1
, where n
is the value returned by the element's FemElement3dBase.numAllIntegrationPoints()
methodtrue
if a value has been set at the integration pointpublic void clearValue(FemElement3dBase elem, int subIdx)
elem
- element containing the integration pointsubIdx
- integration point index, in the range 0
to n-1
, where n
is the value returned by the element's FemElement3dBase.numAllIntegrationPoints()
methodpublic void clearAllValues()
defaultValue
.clearAllValues
in class ScalarFemField
public void postscan(java.util.Deque<ScanToken> tokens, CompositeComponent ancestor) throws java.io.IOException
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 ModelComponentBase
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 void getSoftReferences(java.util.List<ModelComponent> refs)
updateReferences()
method will
be called to update its internal reference information.getSoftReferences
in interface ModelComponent
getSoftReferences
in class ScalarFemField
refs
- list to which soft references are appendedpublic void updateReferences(boolean undo, java.util.Deque<java.lang.Object> undoInfo)
undo
equal to false
,
this component should then examine its soft references and
use ComponentUtils.areConnected()
to determine which of them have been disconnected from the hierarchy.
Disconnected references should be removed, and sufficient information
should be appended to undoInfo
to allow this update
to be undone if this method is called later with undo
equal to true
. When undoing an update, the undo
information should be removed from the front of undoInfo
.updateReferences
in interface ModelComponent
updateReferences
in class ScalarFemField
undo
- if true
, indicates that the most
recent reference update should be undone, using the supplied
undo information.undoInfo
- if undo
is false
, should be used
to store information allowing the reference update to be undone.
Otherwise, if undo
is true
, then this
supplied information to undo the most recent update.public boolean equals(ScalarSubElemField field)
true
if this field is functionally equal to another field.
Intended mainly for testing and debugging.