Package pulse.problem.schemes.rte.dom
Class StretchedGrid
- java.lang.Object
-
- pulse.util.UpwardsNavigable
-
- pulse.util.Group
-
- pulse.util.Accessible
-
- pulse.util.PropertyHolder
-
- pulse.problem.schemes.rte.dom.StretchedGrid
-
- All Implemented Interfaces:
Serializable,Descriptive
public class StretchedGrid extends PropertyHolder
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description StretchedGrid(double dimension)Constructs a uniform grid where the dimension is set to the argument.StretchedGrid(NumericProperty gridDensity, double dimension)Constructs a non-uniform grid where the dimension and the grid density are specified by the arguments.protectedStretchedGrid(NumericProperty gridDensity, double dimension, NumericProperty stretchingFactor, boolean uniform)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerate(int n)voidgenerateUniform(boolean scaled)voidgenerateUniformBase(int n, boolean scaled)intgetDensity()StringgetDescriptor()If not null, will return the prefix, otherwise calls the superclass method.doublegetDimension()doublegetNode(int i)double[]getNodes()NumericPropertygetStretchingFactor()Set<NumericPropertyKeyword>listedKeywords()By default, this will search the children of thisPropertyHolderto collect the types of their listed numeric parameters recursively.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.voidsetStretchingFactor(NumericProperty p)doublestep(int i, double sign)doublestepLeft(int i)doublestepRight(int i)doubletanh(double x, double stretchingFactor)StringtoString()-
Methods inherited from class pulse.util.PropertyHolder
addListener, areDetailsHidden, data, describe, firePropertyChanged, 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
-
StretchedGrid
public StretchedGrid(double dimension)
Constructs a uniform grid where the dimension is set to the argument. The stretching factor and grid density are set to a default value.- Parameters:
dimension- the dimension of the grid
-
StretchedGrid
public StretchedGrid(NumericProperty gridDensity, double dimension)
Constructs a non-uniform grid where the dimension and the grid density are specified by the arguments. The stretching factor and grid density are set to a default value.- Parameters:
gridDensity- the grid density, which is a property of theDOM_GRID_DENSITYtypedimension- the dimension of the grid
-
StretchedGrid
protected StretchedGrid(NumericProperty gridDensity, double dimension, NumericProperty stretchingFactor, boolean uniform)
-
-
Method Detail
-
generate
public void generate(int n)
-
generateUniform
public void generateUniform(boolean scaled)
-
generateUniformBase
public void generateUniformBase(int n, boolean scaled)
-
getDensity
public int getDensity()
-
getStretchingFactor
public NumericProperty getStretchingFactor()
-
setStretchingFactor
public void setStretchingFactor(NumericProperty p)
-
getDimension
public double getDimension()
-
getNode
public double getNode(int i)
-
getNodes
public double[] getNodes()
-
step
public double step(int i, double sign)
-
stepLeft
public double stepLeft(int i)
-
stepRight
public double stepRight(int i)
-
tanh
public double tanh(double x, double stretchingFactor)
-
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.
-
listedKeywords
public Set<NumericPropertyKeyword> listedKeywords()
Description copied from class:PropertyHolderBy default, this will search the children of this
PropertyHolderto collect the types of their listed numeric parameters recursively.- Overrides:
listedKeywordsin classPropertyHolder- Returns:
- a set of
NumericPropertyKeywordinstances, which have been explicitly marked as a listed parameter for thisPropertyHolder.
-
getDescriptor
public String getDescriptor()
Description copied from class:PropertyHolderIf not null, will return the prefix, otherwise calls the superclass method.- Overrides:
getDescriptorin classPropertyHolder- Returns:
- the descriptor
- See Also:
Group.getSimpleName()
-
-