public static class CrankNicolsonConvectionDiffusionEquation1D.Coefficients extends Object
Constructor and Description |
---|
Coefficients(ConvectionDiffusionEquation1D pde,
int M,
int N,
double[] x)
Constructs the coefficient computation
|
Modifier and Type | Method and Description |
---|---|
TridiagonalMatrix |
getLHS(double tm)
Gets the left hand side coefficient matrix of the Crank-Nicolson
scheme.
|
Vector |
getRHS(Vector um,
double tm)
Computes the right hand side vector of the Crank-Nicolson scheme.
|
public Coefficients(ConvectionDiffusionEquation1D pde, int M, int N, double[] x)
pde
- a 1 dimensional convection-diffusion equationM
- the number of grid points along the time-axis (excluding
the initial condition)N
- the number of grid points along the space-axis (excluding
the two boundaries)x
- the spatial gridpublic TridiagonalMatrix getLHS(double tm)
tm
- a timestampCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.