public class CrankNicholson extends AbstractDiffuse
| Modifier and Type | Field and Description |
|---|---|
static int |
AMATRIX |
static int |
BMATRIX |
boundaryCondition, D, dt, ghostpts, grid, initialCondition, Params, reporter, time, tstop, u| Constructor and Description |
|---|
CrankNicholson() |
CrankNicholson(NDGrid g) |
CrankNicholson(NDGrid g,
BoundaryCondition BC) |
| Modifier and Type | Method and Description |
|---|---|
void |
generateMatrix(int type) |
SblMatrix |
getAMatrix()
Returns the sparse matrix representation of the "backward" or implicit matrix A of the Crank-Nicholson
scheme A*u(t+1) = B*u(t)
|
SblMatrix |
getBMatrix()
Returns the sparse matrix representation of the "forward" matrix B of the Crank-Nicholson
scheme A*u(t+1) = B*u(t)
|
DblMatrix |
getRHSA() |
DblMatrix |
getRHSB() |
void |
solve() |
void |
updateGrid(NDGrid grid) |
getBoundaryCondition, getDiffusionCoefficient, getDimension, getInitialCondition, getParam, getReporter, getSolution, getTime, hasParameter, parameterSet, replaceParams, setBoundaryCondition, setDiffusionCoefficient, setInitialCondition, setParam, setReporter, setTimepublic static final int BMATRIX
public static final int AMATRIX
public CrankNicholson()
public CrankNicholson(NDGrid g)
public CrankNicholson(NDGrid g, BoundaryCondition BC)
public void updateGrid(NDGrid grid)
public SblMatrix getAMatrix()
public SblMatrix getBMatrix()
public DblMatrix getRHSA()
public DblMatrix getRHSB()
public void generateMatrix(int type)
public void solve()
solve in interface PartialDifferentialEquationsolve in class AbstractDiffuseCopyright © 2011, 2013. Daniel P. Dougherty