コード例 #1
0
    public IBVPFDM(IIBVPImp source, Range <double> Xrange, Range <double> Trange, int JSteps, int NSteps)
    {
        xaxis = new Range <double>(Xrange);
        taxis = new Range <double>(Trange);

        pde = source;
        initMesh(JSteps, NSteps);
        initIC();
    }
コード例 #2
0
    public IBVPFDM(Range <double> Xrange, Range <double> Trange)
    {
        xaxis = new Range <double>(Xrange);
        taxis = new Range <double>(Trange);

        pde = null;
        initMesh(10, 10);
        initIC();
    }
コード例 #3
0
    private Vector <double> F;       // Right-hand side of matrix



    public ImplicitEulerIBVP(IIBVPImp source, Range <double> Xrange, Range <double> Trange, int NSteps, int JSteps)
        : base(source, Xrange, Trange, NSteps, JSteps)
    {
        // !!! number of unknowns is J - 1 (Dirichlet)
        A = new Vector <double>(J - 1, 1);
        B = new Vector <double>(J - 1, 1);
        C = new Vector <double>(J - 1, 1);

        F = new Vector <double>(J - 1, 1);
    }
コード例 #4
0
ファイル: ADE.cs プロジェクト: laraag/CsForFinancialMarkets
    public ADE(IIBVPImp myPDE, Range <double> Xrange, Range <double> Trange, int JSteps, int NSteps)
        : base(myPDE, Xrange, Trange, JSteps, NSteps)
    {
        // Two sweeps U and V will get the initial conditions
        U = new Vector <double>(vecOld);
        V = new Vector <double>(vecOld);

        UOld = new Vector <double>(U);
        VOld = new Vector <double>(V);

        alpha = new Vector <double>(U);
        beta  = new Vector <double>(U);
        gamma = new Vector <double>(U);
        rhs   = new Vector <double>(U);
    }
コード例 #5
0
    private double A, B, C;                 // Coefficients in FD scheme


    public ExplicitEulerIBVP(IIBVPImp source, Range <double> Xrange, Range <double> Trange, int NSteps, int JSteps)
        : base(source, Xrange, Trange, NSteps, JSteps)
    {
    }
コード例 #6
0
 public IBVP(IIBVPImp imp, Range <double> Xrange, Range <double> Trange)
 {
     this.imp = imp;
     xaxis    = new Range <double>(Xrange);
     taxis    = new Range <double>(Trange);
 }