Package dev.nm.analysis.differentialequation.pde.finitedifference.parabolic.dim1.convectiondiffusionequation
Class CrankNicolsonConvectionDiffusionEquation1D.Coefficients
- java.lang.Object
-
- dev.nm.analysis.differentialequation.pde.finitedifference.parabolic.dim1.convectiondiffusionequation.CrankNicolsonConvectionDiffusionEquation1D.Coefficients
-
- Enclosing class:
- CrankNicolsonConvectionDiffusionEquation1D
public static class CrankNicolsonConvectionDiffusionEquation1D.Coefficients extends Object
Gets the coefficients of a discretized 1D convection-diffusion equation for each time step.
-
-
Constructor Summary
Constructors Constructor Description Coefficients(ConvectionDiffusionEquation1D pde, int M, int N, double[] x)Constructs the coefficient computation
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TridiagonalMatrixgetLHS(double tm)Gets the left hand side coefficient matrix of the Crank-Nicolson scheme.VectorgetRHS(Vector um, double tm)Computes the right hand side vector of the Crank-Nicolson scheme.
-
-
-
Constructor Detail
-
Coefficients
public Coefficients(ConvectionDiffusionEquation1D pde, int M, int N, double[] x)
Constructs the coefficient computation- Parameters:
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 grid
-
-
Method Detail
-
getLHS
public TridiagonalMatrix getLHS(double tm)
Gets the left hand side coefficient matrix of the Crank-Nicolson scheme.- Parameters:
tm- a timestamp- Returns:
- the left hand side tridiagonal coefficient matrix
-
-