public class PWRAssembly extends LWRComposite
The PWRAssembly class contains a collection of LWRRods mapped to locations on a grid. When the addLWRRod() operation is used, if a LWRRod with the same name exists in the collection, then the LWRRod will not be added and a value of false will be returned. When using the setLWRRodLocation() operation, if a LWRRod with the same name exists at the provided location, then the current LWRRod name at the provided location will be overwritten.
StatePointData for LWRRods should be stored by position and accessed by the getLWRRodDataProviderAtLocation operation.
iComponentVisitor
iComponentListener
Constructor and Description |
---|
PWRAssembly(int size)
A parameterized Constructor.
|
PWRAssembly(java.lang.String name,
int size)
A parameterized Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addComponent(Component component)
This operation overrides the LWRComposite's operation.
|
boolean |
addLWRRod(LWRRod lWRRod)
Adds a LWRRod to the collection of LWRRods.
|
java.lang.Object |
clone()
Deep copies and returns a newly instantiated object.
|
void |
copy(PWRAssembly otherObject)
Deep copies the contents of the object.
|
boolean |
equals(java.lang.Object otherObject)
Overrides the equals operation to check the attributes on this object
with another object of the same type.
|
LWRRod |
getLWRRodByLocation(int row,
int column)
Returns the LWRRod corresponding to the provided column and row or null
if one is not found at the provided location.
|
LWRRod |
getLWRRodByName(java.lang.String name)
Returns the LWRRod corresponding to the provided name or null if the name
is not found.
|
LWRDataProvider |
getLWRRodDataProviderAtLocation(int row,
int column)
Returns the data provider for specific group at location or null if it
does not exist.
|
java.util.ArrayList<java.lang.String> |
getLWRRodNames()
Returns an ArrayList of names for each element of the collection of
LWRRods.
|
int |
getNumberOfLWRRods()
Returns the number of LWRRods in the collection of LWRRods.
|
double |
getRodPitch()
Returns the distance between centers of adjacent fuel rods.
|
int |
getSize()
Returns the size of either dimension of this PWRAssembly.
|
java.util.ArrayList<IHdfWriteable> |
getWriteableChildren()
This operation returns an ArrayList of IHdfWriteable child objects.
|
int |
hashCode()
Returns the hashCode of the object.
|
boolean |
readAttributes(ncsa.hdf.object.h5.H5Group h5Group)
This operation reads Attributes from h5Group and assigns their values to
class variables.
|
boolean |
readChild(IHdfReadable iHdfReadable)
This operation returns an ArrayList of IHdfReadable child objects.
|
void |
removeComponent(int childId)
An operation that overrides the LWRComposite's operation.
|
void |
removeComponent(java.lang.String name)
An operation that overrides the LWRComposite's operation.
|
boolean |
removeLWRRod(java.lang.String lWRRodName)
Removes a LWRRod from the collection of LWRRods.
|
boolean |
removeLWRRodFromLocation(int row,
int column)
Removes the LWRRod at the provided location.
|
boolean |
setLWRRodLocation(java.lang.String lWRRodName,
int row,
int column)
Sets the location for the provided name.
|
void |
setRodPitch(double rodPitch)
Sets the distance between centers of adjacent fuel rods in the fuel
lattice.
|
boolean |
writeAttributes(ncsa.hdf.object.h5.H5File h5File,
ncsa.hdf.object.h5.H5Group h5Group)
This operation writes HDF5 Attributes to the metadata of h5Group in the
h5File.
|
copy, getComponent, getComponent, getComponentNames, getComponents, getNumberOfComponents
accept, accept, addData, copy, createGroup, getCurrentTime, getDataAtCurrentTime, getDescription, getFeatureList, getFeaturesAtCurrentTime, getHDF5LWRTag, getId, getName, getNumberOfTimeSteps, getSourceInfo, getTimes, getTimeStep, getTimeUnits, readDatasets, register, removeAllDataFromFeature, setDescription, setId, setName, setSourceInfo, setTime, setTimeUnits, toString, unregister, update, writeDatasets
register, unregister, update
getDescription, getId, getName, setDescription, setId, setName
public PWRAssembly(int size)
A parameterized Constructor.
size
- The size of either dimension of this PWRAssembly.
public PWRAssembly(java.lang.String name, int size)
A parameterized Constructor.
name
- The name of this PWRAssembly.
size
- The size of either dimension of this PWRAssembly.
public int getSize()
Returns the size of either dimension of this PWRAssembly.
The size of either dimension of this PWRAssembly.
public boolean addLWRRod(LWRRod lWRRod)
Adds a LWRRod to the collection of LWRRods. If a LWRRod with the same name exists in the collection or the passed parameter is null, then the LWRRod will not be added and a value of false will be returned.
lWRRod
- The LWRRod to add to the collection of LWRRods.
True, if the LWRRod was added successfully.
public boolean removeLWRRod(java.lang.String lWRRodName)
Removes a LWRRod from the collection of LWRRods. The passed string can not be null.
lWRRodName
- The name of the LWRRod to be removed. Returns true if the LWRRod was removed successfully.
True, if the LWRRod was removed successfully.
public java.util.ArrayList<java.lang.String> getLWRRodNames()
Returns an ArrayList of names for each element of the collection of LWRRods.
An ArrayList of names for each element of the collection of LWRRods.
public LWRRod getLWRRodByName(java.lang.String name)
Returns the LWRRod corresponding to the provided name or null if the name is not found.
name
- The provided LWRRod's name.
The LWRRod corresponding to the provided name or null if the name is not found.
public LWRRod getLWRRodByLocation(int row, int column)
Returns the LWRRod corresponding to the provided column and row or null if one is not found at the provided location.
row
- The row position.
column
- The column position.
The LWRRod corresponding to the provided column and row or null if one is not found at the provided location.
public int getNumberOfLWRRods()
Returns the number of LWRRods in the collection of LWRRods.
The number of LWRRods in the collection of LWRRods.
public boolean setLWRRodLocation(java.lang.String lWRRodName, int row, int column)
Sets the location for the provided name. Overrides the location of another component name as required. Returns true if this operation was successful, false otherwise. Note it will return true if the same name is overridden.
lWRRodName
- The LWRRod's name.
row
- The row position.
column
- The column position.
True, if the location of the LWRRod was set successfully.
public boolean removeLWRRodFromLocation(int row, int column)
Removes the LWRRod at the provided location. Returns true if the removal was successful.
row
- The row position.
column
- The column position.
True, if the removal was successful.
public double getRodPitch()
Returns the distance between centers of adjacent fuel rods.
The distance between centers of adjacent fuel rods in the fuel lattice.
public void setRodPitch(double rodPitch)
Sets the distance between centers of adjacent fuel rods in the fuel lattice. The rodPitch value must be greater than zero.
rodPitch
- The distance between centers of adjacent fuel rods in the fuel lattice.
public void addComponent(Component component)
This operation overrides the LWRComposite's operation. This operation does nothing and requires that the appropriate, more defined, associated operation to be utilized on this class.
addComponent
in interface Composite
addComponent
in class LWRComposite
component
- The component to be added.
Composite.addComponent(Component child)
public void removeComponent(int childId)
An operation that overrides the LWRComposite's operation. This operation does nothing and requires that the appropriate, more defined, associated operation to be utilized on this class.
removeComponent
in interface Composite
removeComponent
in class LWRComposite
childId
- The id of the LWRComponent to remove.
Composite.removeComponent(int childId)
public void removeComponent(java.lang.String name)
An operation that overrides the LWRComposite's operation. This operation does nothing and requires that the appropriate, more defined, associated operation to be utilized on this class.
removeComponent
in class LWRComposite
name
- The name of the LWRComponent to remove.
public boolean equals(java.lang.Object otherObject)
Overrides the equals operation to check the attributes on this object with another object of the same type. Returns true if the objects are equal. False otherwise.
equals
in interface Identifiable
equals
in class LWRComposite
otherObject
- The object to be compared.
True if otherObject is equal. False otherwise.
public int hashCode()
Returns the hashCode of the object.
hashCode
in interface Identifiable
hashCode
in class LWRComposite
The hash of the object.
public void copy(PWRAssembly otherObject)
Deep copies the contents of the object.
otherObject
- The object to be copied.
public java.lang.Object clone()
Deep copies and returns a newly instantiated object.
clone
in interface Identifiable
clone
in class LWRComposite
The newly instantiated copied object.
public boolean writeAttributes(ncsa.hdf.object.h5.H5File h5File, ncsa.hdf.object.h5.H5Group h5Group)
IHdfWriteable
This operation writes HDF5 Attributes to the metadata of h5Group in the h5File. If the h5Group is null or h5File is null or can not be opened, then false is returned. If the operation fails to write all Attributes, then false is returned. Otherwise, true is returned.
writeAttributes
in interface IHdfWriteable
writeAttributes
in class LWRComponent
h5File
- h5Group
- public java.util.ArrayList<IHdfWriteable> getWriteableChildren()
IHdfWriteable
This operation returns an ArrayList of IHdfWriteable child objects. If this IHdfWriteable has no IHdfWriteable child objects, then null is returned.
getWriteableChildren
in interface IHdfWriteable
getWriteableChildren
in class LWRComposite
public boolean readAttributes(ncsa.hdf.object.h5.H5Group h5Group)
IHdfReadable
This operation reads Attributes from h5Group and assigns their values to class variables. If h5Group is null, false is returned. If any Attribute values are null, false is returned. Otherwise, true is returned.
readAttributes
in interface IHdfReadable
readAttributes
in class LWRComponent
h5Group
- public LWRDataProvider getLWRRodDataProviderAtLocation(int row, int column)
Returns the data provider for specific group at location or null if it does not exist.
row
- the row
column
- The column
the provider
public boolean readChild(IHdfReadable iHdfReadable)
This operation returns an ArrayList of IHdfReadable child objects. If this IHdfReadable has no IHdfReadable child objects, then null is returned.
readChild
in interface IHdfReadable
readChild
in class LWRComposite
iHdfReadable
-