Package org.drip.fdm.cranknicolson
Class CNDiscretizedEvolver1D
java.lang.Object
org.drip.fdm.cranknicolson.CNDiscretizedEvolver1D
public class CNDiscretizedEvolver1D
extends java.lang.Object
CNDiscretizedEvolver1D implements the 1D Crank-Nicolson Discretized State-Space Evolution Scheme.
The References are:
- Datta, B. N. (2010): Numerical Linear Algebra and Applications 2nd Edition SIAM Philadelphia, PA
- Cebeci, T. (2002): Convective Heat Transfer Horizon Publishing Hammond, IN
- Crank, J., and P. Nicolson (1947): A Practical Method for Numerical Evaluation of Solutions of Partial Differential Equations of the Heat Conduction Type Proceedings of the Cambridge Philosophical Society 43 (1) 50-67
- Thomas, J. W. (1995): Numerical Partial Differential Equations: Finite Difference Methods Springer-Verlag Berlin, Germany
- Wikipedia (2023): Alternating-direction implicit method https://en.wikipedia.org/wiki/Alternating-direction_implicit_method
- Wikipedia (2024): CrankâNicolson method https://en.wikipedia.org/wiki/Crank%E2%80%93Nicolson_method
- Module = Computational Core Module
- Library = Numerical Analysis Library
- Project = Numerical Solution Schemes for PDEs
- Package = Finite Difference Crank-Nicolson Discretizer
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description CNDiscretizedEvolver1D(EvolutionGrid1D evolutionGrid1D, RdToR1 diffusionFunction, boolean diagnosticsOn)
CNDiscretizedEvolver1D Constructor -
Method Summary
Modifier and Type Method Description boolean
diagnosticsOn()
Retrieve the "Diagnostics On" ModeRdToR1
diffusionFunction()
Retrieve the Rd to R1 Diffusion FunctionEvolutionGrid1D
evolutionGrid1D()
Retrieve the 1D Evolution GridR1EvolutionSnapshot
evolve(double[] startingStateResponseArray)
Evolve the State Response from the Starting Valueboolean
stabilityCheck(double time, double timeIncrement, double factor, double factorIncrement)
Indicate if the Step Sizes enable Stable Usage of the Crank-Nicolson Schemedouble
vonNeumannStabilityNumber(double time, double timeIncrement, double factor, double factorIncrement)
Compute the von Neumann Stability NumberMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
CNDiscretizedEvolver1D
public CNDiscretizedEvolver1D(EvolutionGrid1D evolutionGrid1D, RdToR1 diffusionFunction, boolean diagnosticsOn) throws java.lang.ExceptionCNDiscretizedEvolver1D Constructor- Parameters:
evolutionGrid1D
- R1 Evolution IncrementdiffusionFunction
- Diffusion FunctiondiagnosticsOn
- TRUE - "Diagnostics On" Mode- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
-
Method Details
-
evolutionGrid1D
Retrieve the 1D Evolution Grid- Returns:
- 1D Evolution Grid
-
diffusionFunction
Retrieve the Rd to R1 Diffusion Function- Returns:
- Rd to R1 Diffusion Function
-
diagnosticsOn
public boolean diagnosticsOn()Retrieve the "Diagnostics On" Mode- Returns:
- "Diagnostics On" Mode
-
vonNeumannStabilityNumber
public double vonNeumannStabilityNumber(double time, double timeIncrement, double factor, double factorIncrement) throws java.lang.ExceptionCompute the von Neumann Stability Number- Parameters:
time
- TimetimeIncrement
- Time Incrementfactor
- FactorfactorIncrement
- Factor Increment- Returns:
- von Neumann Stability Number
- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
stabilityCheck
public boolean stabilityCheck(double time, double timeIncrement, double factor, double factorIncrement) throws java.lang.ExceptionIndicate if the Step Sizes enable Stable Usage of the Crank-Nicolson Scheme- Parameters:
time
- TimetimeIncrement
- Time Incrementfactor
- FactorfactorIncrement
- Factor Increment- Returns:
- TRUE - Step Sizes enable Stable Usage of the Crank-Nicolson Scheme
- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
evolve
Evolve the State Response from the Starting Value- Parameters:
startingStateResponseArray
- Starting State Response Array- Returns:
- Time Map of Factor Predictor/State Response Array
-