Package pulse.problem.schemes
Class Grid
- java.lang.Object
-
- pulse.util.UpwardsNavigable
-
- pulse.util.Group
-
- pulse.util.Accessible
-
- pulse.util.PropertyHolder
-
- pulse.problem.schemes.Grid
-
- All Implemented Interfaces:
Serializable,Descriptive
- Direct Known Subclasses:
Grid2D
public class Grid extends PropertyHolder
A
Gridis used to partition the space and time domain of aProblemto allow a numeric solution with aDifferenceScheme. This specific class of grids is one-dimensional in space, meaning that it only defines rules for partitioning the axial dimension in the laser flash experiment.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGrid()Grid(NumericProperty gridDensity, NumericProperty timeFactor)Creates aGridobject with the specifiedgridDensityandtimeFactor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Gridcopy()Creates a newGridobject with exactly the same parameters as this one.NumericPropertygetGridDensity()Retrieves the value of thegridDensityused to calculate thehxandtau.protected intgetGridDensityValue()NumericPropertygetTimeFactor()Retrieves the value of the τ-factor, or the time factor, used in finite-difference calculation.doublegetTimeStep()Retrieves the value of the τ time step used in finite-difference calculation.doublegetXStep()Retrieves the value of the coordinate step used in finite-difference calculation.doublegridAxialDistance(double distance, double lengthFactor)The dimensionless axial distance on thisGrid, which is thedistance/lengthFactorrounded up to a factor of the coordinate stephx.doublegridTime(double time, double dimensionFactor)The dimensionless time on thisGrid, which is thetime/dimensionFactorrounded up to a factor of the time steptau.Set<NumericPropertyKeyword>listedKeywords()The listed properties includeGRID_DENSITYandTAU_FACTOR.voidset(NumericPropertyKeyword type, NumericProperty property)An abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer)NumericProperties in subclasses ofAccessible.voidsetGridDensity(NumericProperty gridDensity)Sets the value of thegridDensity.protected voidsetGridDensityValue(int N)voidsetTimeFactor(NumericProperty timeFactor)Sets the value of thetauFactor.protected voidsetTimeStep(double tau)voidsetXStep(double hx)Sets the value of the coordinate step.StringtoString()-
Methods inherited from class pulse.util.PropertyHolder
addListener, areDetailsHidden, data, describe, firePropertyChanged, getDescriptor, getListeners, getPrefix, ignoreSiblings, initListeners, isListedNumericType, isListedParameter, listedTypes, numericData, parameterListChanged, removeListeners, setPrefix, updateProperties, updateProperty
-
Methods inherited from class pulse.util.Accessible
accessibleChildren, genericProperties, genericProperty, numericProperties, numericProperty, property, update, update
-
Methods inherited from class pulse.util.UpwardsNavigable
addHierarchyListener, getHierarchyListeners, getParent, identify, removeHierarchyListener, removeHierarchyListeners, setParent, specificAncestor, tellParent
-
-
-
-
Constructor Detail
-
Grid
public Grid(NumericProperty gridDensity, NumericProperty timeFactor)
Creates aGridobject with the specifiedgridDensityandtimeFactor.- Parameters:
gridDensity- aNumericPropertyof the typeGRID_DENSITYtimeFactor- aNumericPropertyof the typeTIME_FACTOR- See Also:
NumericPropertyKeyword
-
Grid
protected Grid()
-
-
Method Detail
-
copy
public Grid copy()
Creates a newGridobject with exactly the same parameters as this one.- Returns:
- a new
Gridobject replicating thisGrid
-
listedKeywords
public Set<NumericPropertyKeyword> listedKeywords()
The listed properties includeGRID_DENSITYandTAU_FACTOR.- Overrides:
listedKeywordsin classPropertyHolder- Returns:
- a set of
NumericPropertyKeywordinstances, which have been explicitly marked as a listed parameter for thisPropertyHolder.
-
set
public void set(NumericPropertyKeyword type, NumericProperty property)
Description copied from class:AccessibleAn abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer)
NumericProperties in subclasses ofAccessible. Typically this involves aswitchstatement that goes through the different options for thetypeand invokes differentset(...)methods to update the matchingNumericPropertywithproperty.- Specified by:
setin classAccessible- Parameters:
type- the type, which must be equal by definition toproperty.getType().property- the property, which contains new information.
-
getXStep
public final double getXStep()
Retrieves the value of the coordinate step used in finite-difference calculation.- Returns:
- a double, representing the
hxvalue.
-
setXStep
public final void setXStep(double hx)
Sets the value of the coordinate step.- Parameters:
hx- a double, representing the newhxvalue.
-
getTimeStep
public final double getTimeStep()
Retrieves the value of the τ time step used in finite-difference calculation.- Returns:
- a double, representing the
tauvalue.
-
setTimeStep
protected final void setTimeStep(double tau)
-
getTimeFactor
public final NumericProperty getTimeFactor()
Retrieves the value of the τ-factor, or the time factor, used in finite-difference calculation. This factor determines the proportionally coefficient between τ and .- Returns:
- a NumericProperty of the
TAU_FACTORtype, representing thetauFactorvalue.
-
getGridDensity
public final NumericProperty getGridDensity()
Retrieves the value of thegridDensityused to calculate thehxandtau.- Returns:
- a NumericProperty of the
GRID_DENSITYtype, representing thegridDensityvalue.
-
getGridDensityValue
protected final int getGridDensityValue()
-
setGridDensityValue
protected void setGridDensityValue(int N)
-
setGridDensity
public void setGridDensity(NumericProperty gridDensity)
Sets the value of thegridDensity. Automatically recalculates thehxvalue.- Parameters:
gridDensity- a NumericProperty of theGRID_DENSITYtype
-
setTimeFactor
public void setTimeFactor(NumericProperty timeFactor)
Sets the value of thetauFactor. Automatically recalculates thetauvalue.- Parameters:
timeFactor- a NumericProperty of theTAU_FACTORtype
-
gridTime
public final double gridTime(double time, double dimensionFactor)The dimensionless time on thisGrid, which is thetime/dimensionFactorrounded up to a factor of the time steptau.- Parameters:
time- the timedimensionFactor- a conversion factor with the dimension of time- Returns:
- a double representing the time on the finite grid
-
gridAxialDistance
public final double gridAxialDistance(double distance, double lengthFactor)The dimensionless axial distance on thisGrid, which is thedistance/lengthFactorrounded up to a factor of the coordinate stephx.- Parameters:
distance- the distance along the axial directionlengthFactor- a conversion factor with the dimension of length- Returns:
- a double representing the axial distance on the finite grid
-
-