Class ParabolicEquationSolver
java.lang.Object
io.github.andreipunko.math.pde.solver.AbstractEquationSolver<ParabolicEquation>
io.github.andreipunko.math.pde.solver.ParabolicEquationSolver
- All Implemented Interfaces:
EquationSolver<ParabolicEquation>
Solver for parabolic partial differential equations.
Implements numerical method for solving parabolic equations using
implicit finite difference scheme. The algorithm is based on the Thomas algorithm
for solving tridiagonal systems of linear equations.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.andreipunko.math.pde.solver.AbstractEquationSolver
AbstractEquationSolver.KappaNu -
Constructor Summary
ConstructorsConstructorDescriptionCreates a solver for parabolic equations using the implicit finite-difference scheme. -
Method Summary
Modifier and TypeMethodDescriptionsolve(ParabolicEquation eqn, double h, double tau) Solves parabolic partial differential equation using numerical method.Methods inherited from class io.github.andreipunko.math.pde.solver.AbstractEquationSolver
buildArea, calcKappaNu, prepare, solve3DiagonalEquationsSystem
-
Constructor Details
-
ParabolicEquationSolver
public ParabolicEquationSolver()Creates a solver for parabolic equations using the implicit finite-difference scheme.
-
-
Method Details
-
solve
Solves parabolic partial differential equation using numerical method. Uses implicit finite difference scheme with weights for derivative approximation. Solution is found using the Thomas algorithm on each time step.- Parameters:
eqn- parabolic partial differential equation to solveh- spatial step size (must be positive)tau- time step size (must be positive)- Returns:
Solutionwith function values on the grid inSolution.matrix()- Throws:
IllegalArgumentException- if parameters h or tau are invalid, or if a time-step tridiagonal system is degenerate (seeAbstractEquationSolver.solve3DiagonalEquationsSystem(double[], double[], double[], double[], io.github.andreipunko.math.pde.solver.AbstractEquationSolver.KappaNu, io.github.andreipunko.math.pde.solver.AbstractEquationSolver.KappaNu))
-