Class ExplicitNonlinearSolver
- java.lang.Object
-
- pulse.util.UpwardsNavigable
-
- pulse.util.Group
-
- pulse.util.Accessible
-
- pulse.util.PropertyHolder
-
- pulse.problem.schemes.DifferenceScheme
-
- pulse.problem.schemes.OneDimensionalScheme
-
- pulse.problem.schemes.ExplicitScheme
-
- pulse.problem.schemes.solvers.ExplicitNonlinearSolver
-
- All Implemented Interfaces:
Serializable,FixedPointIterations,Solver<NonlinearProblem>,Descriptive,Reflexive
public class ExplicitNonlinearSolver extends ExplicitScheme implements Solver<NonlinearProblem>, FixedPointIterations
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExplicitNonlinearSolver()ExplicitNonlinearSolver(NumericProperty N, NumericProperty timeFactor)ExplicitNonlinearSolver(NumericProperty N, NumericProperty timeFactor, NumericProperty timeLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DifferenceSchemecopy()Creates aDifferenceScheme, which is an exact copy of this object.Class<? extends Problem>[]domain()Retrieves all problem statements that can be solved with this implementation of the difference scheme.NumericPropertygetNonlinearPrecision()voiditeration(int m)Performs an iteration at timemList<Property>listedTypes()By default, collects a list of default properties corresponding to types defined by listedKeywords().voidprepare(Problem problem)Contains preparatory steps to ensure smooth running of the solver.This includes creating aDiscretePulseobject and adjusting the grid of this scheme to match theDiscretePulsecreated for thisproblemFinally, a heating curve is cleared from the previously calculated values.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.voidsetNonlinearPrecision(NumericProperty nonlinearPrecision)voidsolve(NonlinearProblem problem)Calculates the solution of thetand stores it in the respectiveHeatingCurve.voidtimeStep(int m)-
Methods inherited from class pulse.problem.schemes.ExplicitScheme
explicitSolution, phi, toString
-
Methods inherited from class pulse.problem.schemes.OneDimensionalScheme
clearArrays, finaliseStep, getCurrentSolution, getPreviousSolution, setSolutionAt, signal
-
Methods inherited from class pulse.problem.schemes.DifferenceScheme
areDetailsHidden, copyFrom, getCurrentPulseValue, getDiscretePulse, getGrid, getTimeInterval, getTimeLimit, initFrom, listedKeywords, normalOperation, prepareStep, pulse, runTimeSequence, runTimeSequence, scaleSolution, setDetailsHidden, setGrid, setTimeInterval, setTimeLimit
-
Methods inherited from class pulse.util.PropertyHolder
addListener, data, describe, firePropertyChanged, getDescriptor, getListeners, getPrefix, ignoreSiblings, initListeners, isListedNumericType, isListedParameter, 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface pulse.problem.schemes.FixedPointIterations
doIterations, finaliseIteration
-
-
-
-
Constructor Detail
-
ExplicitNonlinearSolver
public ExplicitNonlinearSolver()
-
ExplicitNonlinearSolver
public ExplicitNonlinearSolver(NumericProperty N, NumericProperty timeFactor)
-
ExplicitNonlinearSolver
public ExplicitNonlinearSolver(NumericProperty N, NumericProperty timeFactor, NumericProperty timeLimit)
-
-
Method Detail
-
prepare
public void prepare(Problem problem) throws SolverException
Description copied from class:DifferenceSchemeContains preparatory steps to ensure smooth running of the solver.This includes creating a
DiscretePulseobject and adjusting the grid of this scheme to match theDiscretePulsecreated for thisproblemFinally, a heating curve is cleared from the previously calculated values.All subclasses of
DifferenceSchemeshould override and explicitly call this superclass method where appropriate.- Overrides:
preparein classDifferenceScheme- Parameters:
problem- the heat problem to be solved- Throws:
SolverException
-
timeStep
public void timeStep(int m) throws SolverException- Specified by:
timeStepin classDifferenceScheme- Throws:
SolverException
-
iteration
public void iteration(int m)
Description copied from interface:FixedPointIterationsPerforms an iteration at timem- Specified by:
iterationin interfaceFixedPointIterations- Parameters:
m- time step
-
solve
public void solve(NonlinearProblem problem) throws SolverException
Description copied from interface:SolverCalculates the solution of thetand stores it in the respectiveHeatingCurve.- Specified by:
solvein interfaceSolver<NonlinearProblem>- Parameters:
problem- - an accepted instance ofT- Throws:
SolverException
-
copy
public DifferenceScheme copy()
Description copied from class:DifferenceSchemeCreates aDifferenceScheme, which is an exact copy of this object.- Specified by:
copyin classDifferenceScheme- Returns:
- an exact copy of this
DifferenceScheme.
-
domain
public Class<? extends Problem>[] domain()
Description copied from class:DifferenceSchemeRetrieves all problem statements that can be solved with this implementation of the difference scheme.- Specified by:
domainin classDifferenceScheme- Returns:
- an array containing subclasses of the
Problemclass which can be used as input for this difference scheme.
-
getNonlinearPrecision
public NumericProperty getNonlinearPrecision()
-
setNonlinearPrecision
public void setNonlinearPrecision(NumericProperty nonlinearPrecision)
-
listedTypes
public List<Property> listedTypes()
Description copied from class:PropertyHolderBy default, collects a list of default properties corresponding to types defined by listedKeywords(). However, this method is overridable to include non-numeric properties.
- Overrides:
listedTypesin classPropertyHolder- Returns:
- a list of
Propertyinstances, 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.- Overrides:
setin classDifferenceScheme- Parameters:
type- the type, which must be equal by definition toproperty.getType().property- the property, which contains new information.
-
-