Exemplo n.º 1
0
    public void initIC()
    { // Utility function to initialise the payoff function
        // Initialise at the boundaries
        vecOld[vecOld.MinIndex] = pde.BCL(taxis.low);
        vecOld[vecOld.MaxIndex] = pde.BCR(taxis.high);

        // Now initialise values in interior of interval using
        // the initial function 'IC' from the PDE
        for (int j = xarr.MinIndex + 1; j <= xarr.MaxIndex - 1; j++)
        {
            vecOld[j] = pde.IC(xarr[j]);
        }

        // Matrix: rows are the time t, columns are the space x.
        res.Row(res.MinRowIndex, vecOld);
    }
Exemplo n.º 2
0
 public double BCR(double t)
 {
     return(imp.BCR(t));
 }