Research Article
Bernoulli Collocation Method for Solving Linear Multidimensional Diffusion and Wave Equations with Dirichlet Boundary Conditions
Algorithm 1
Implementation of BCM for solving (
1)–(
3).
Step : Collocating the main equation (1): | for | for | ; | ; | end | end | Step : Collocating the boundary conditions (3): | for | ; | ; | ; | ; | end | Step : Collocating the initial condition (2): | for | ; | | end | Step : Assembling the coefficient matrices and right hand side column vectors: | ; | ; | maxit = ; | tol = ; | = gmres (, , tol, maxit) |
|