SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.analysis.differentialequation.pde.finitedifference

Interface PDESolutionTimeSpaceGrid1D

• public interface PDESolutionTimeSpaceGrid1D
A solution to an one-dimensional PDE, which is applicable to methods which produce the solution as a grid of time and space. The valid index ranges are 0 ≤ k ≤ m and 0 ≤ j ≤ n+1, where k=0 is the initial condition and the values at the boundaries are at j=0 and j=n+1 respectively.
• Method Summary

All Methods
Modifier and Type Method and Description
int M()
Gets the number of interior time-axis grid points in the solution.
int N()
Gets the number of interior space-axis grid points in the solution.
double t(int m)
Gets the value on the time axis at index k.
double u(int m, int n)
Gets the value of the grid point at (tm, xn).
double x(int n)
Gets the value on the space axis at index j.
• Method Detail

• u

double u(int m,
int n)
Gets the value of the grid point at (tm, xn).
Parameters:
m - the index along the time axis
n - the index along the space axis
Returns:
the value at that point
• t

double t(int m)
Gets the value on the time axis at index k.
Parameters:
m - the index of the grid point
Returns:
tm
• x

double x(int n)
Gets the value on the space axis at index j.
Parameters:
n - the index of the grid point
Returns:
xn
• M

int M()
Gets the number of interior time-axis grid points in the solution.
Returns:
the number of solution grid points along the time-axis
• N

int N()
Gets the number of interior space-axis grid points in the solution.
Returns:
the number of solution grid points along the space-axis