public abstract class MaterialBase extends java.lang.Object implements CompositeProperty, PostScannable, ScalableUnits, Clonable, HasMaterialState
Modifier and Type | Field and Description |
---|---|
static PropertyList |
myProps |
Constructor and Description |
---|
MaterialBase() |
Modifier and Type | Method and Description |
---|---|
void |
advanceState(MaterialStateObject state,
double t0,
double t1) |
MaterialBase |
clone()
Returns a clone of this composite property.
|
MaterialStateObject |
createStateObject() |
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
Property |
getProperty(java.lang.String name)
Returns a property associated with a specified path name.
|
HasProperties |
getPropertyHost()
Returns the host for this property
|
PropertyInfo |
getPropertyInfo()
If this object is a property, returns the corresponding information
|
boolean |
hasProperty(java.lang.String name) |
boolean |
hasState() |
boolean |
hasSymmetricTangent()
Returns true if the tangent matrix for this material is symmetric.
|
boolean |
isWritable()
Returns
true if this component should in fact be written to
secondary storage. |
void |
postscan(java.util.Deque<ScanToken> tokens,
CompositeComponent ancestor)
Performs any required post-scanning for this component.
|
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.
|
void |
setPropertyHost(HasProperties newParent)
Sets the host for this property.
|
void |
setPropertyInfo(PropertyInfo info)
Sets the property information for this property.
|
static MaterialChangeEvent |
symmetryOrStateChanged(java.lang.String name,
MaterialBase mat1,
MaterialBase mat2) |
static <T extends MaterialBase> |
updateMaterial(HasProperties comp,
java.lang.String matName,
MaterialBase oldMat,
T newMat) |
void |
write(java.io.PrintWriter pw,
NumberFormat fmt,
java.lang.Object ref)
Writes a text description of this element to a PrintWriter.
|
void |
writeItems(java.io.PrintWriter pw,
NumberFormat fmt,
CompositeComponent ancestor) |
public static PropertyList myProps
public PropertyInfo getPropertyInfo()
CompositeProperty
getPropertyInfo
in interface CompositeProperty
public void setPropertyInfo(PropertyInfo info)
CompositeProperty
setPropertyInfo
in interface CompositeProperty
info
- property informationpublic HasProperties getPropertyHost()
CompositeProperty
getPropertyHost
in interface CompositeProperty
public void setPropertyHost(HasProperties newParent)
CompositeProperty
setPropertyHost
in interface CompositeProperty
newParent
- host for this propertypublic Property getProperty(java.lang.String name)
HasProperties
.
' characters. A sub-property
exists if the value of a property is itself an object which exports
properties. It is only possible to obtain a sub-property handle if each of
its ancestor properties exports their values by reference.getProperty
in interface HasProperties
name
- name of the desired property or sub-propertypublic boolean hasProperty(java.lang.String name)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
public MaterialBase clone()
CompositeProperty
clone
in interface CompositeProperty
clone
in interface Clonable
clone
in class java.lang.Object
public boolean isWritable()
Scannable
true
if this component should in fact be written to
secondary storage. This gives subclasses control over whether or
not they are actually written out.isWritable
in interface Scannable
true
if this component should be written to
secondary storage.public void writeItems(java.io.PrintWriter pw, NumberFormat fmt, CompositeComponent ancestor) throws java.io.IOException
java.io.IOException
public void write(java.io.PrintWriter pw, NumberFormat fmt, java.lang.Object ref) throws java.io.IOException
Scannable
scan
and complete
enough to allow full reconstruction of the element.public void scan(ReaderTokenizer rtok, java.lang.Object ref) throws java.io.IOException
Scannable
write
.public 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
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 static <T extends MaterialBase> T updateMaterial(HasProperties comp, java.lang.String matName, MaterialBase oldMat, T newMat)
public boolean hasSymmetricTangent()
public void scaleDistance(double s)
ScalableUnits
scaleDistance
in interface ScalableUnits
s
- scaling factorpublic void scaleMass(double s)
ScalableUnits
scaleMass
in interface ScalableUnits
s
- scaling factorpublic static MaterialChangeEvent symmetryOrStateChanged(java.lang.String name, MaterialBase mat1, MaterialBase mat2)
public boolean hasState()
hasState
in interface HasMaterialState
public MaterialStateObject createStateObject()
createStateObject
in interface HasMaterialState
public void advanceState(MaterialStateObject state, double t0, double t1)
advanceState
in interface HasMaterialState