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




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" Mode
    RdToR1 diffusionFunction()
    Retrieve the Rd to R1 Diffusion Function
    EvolutionGrid1D evolutionGrid1D()
    Retrieve the 1D Evolution Grid
    R1EvolutionSnapshot evolve​(double[] startingStateResponseArray)
    Evolve the State Response from the Starting Value
    boolean stabilityCheck​(double time, double timeIncrement, double factor, double factorIncrement)
    Indicate if the Step Sizes enable Stable Usage of the Crank-Nicolson Scheme
    double vonNeumannStabilityNumber​(double time, double timeIncrement, double factor, double factorIncrement)
    Compute the von Neumann Stability Number

    Methods 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.Exception
      CNDiscretizedEvolver1D Constructor
      Parameters:
      evolutionGrid1D - R1 Evolution Increment
      diffusionFunction - Diffusion Function
      diagnosticsOn - TRUE - "Diagnostics On" Mode
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • evolutionGrid1D

      public EvolutionGrid1D evolutionGrid1D()
      Retrieve the 1D Evolution Grid
      Returns:
      1D Evolution Grid
    • diffusionFunction

      public RdToR1 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.Exception
      Compute the von Neumann Stability Number
      Parameters:
      time - Time
      timeIncrement - Time Increment
      factor - Factor
      factorIncrement - 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.Exception
      Indicate if the Step Sizes enable Stable Usage of the Crank-Nicolson Scheme
      Parameters:
      time - Time
      timeIncrement - Time Increment
      factor - Factor
      factorIncrement - 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

      public R1EvolutionSnapshot evolve​(double[] startingStateResponseArray)
      Evolve the State Response from the Starting Value
      Parameters:
      startingStateResponseArray - Starting State Response Array
      Returns:
      Time Map of Factor Predictor/State Response Array