protected double delta_T; // Step length public OneStepFDM(int NSteps, ODE ode) { this.NSteps = NSteps; this.ode = ode; vOld = ode.InitialCondition; vNew = vOld; mesh = new double[NSteps + 1]; mesh[0] = 0.0; mesh[NSteps] = ode.Expiry; delta_T = (mesh[NSteps] - mesh[0]) / NSteps; for (int n = 1; n < NSteps; n++) { mesh[n] = mesh[n - 1] + delta_T; Console.Write(", {0}", mesh[n]); } }
public ExplicitEuler(int NSteps, ODE ode) : base(NSteps, ode) { }