## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

## Appendix C: Programs in the ‘C’ Language

/* ......It solves by the ADI-scheme the 2-D heat-conduction eq.

* ...... u_t = K(u_xx + u_yy), */

/* ......initial condition:

* ...... u(x,y,o) = sin(pi x)sin(pi y), 0<= x,y <= 1, */

/* ......boundary conditions:

* ...... u=0, on all the boundaries. */

/* ......Known exact solution:

* ...... u(x,y,t) = e^(−pi^2 t)*sin(pi x) sin(pi y). */

/* ......Take delta x=delta y=0.2, r_1=r_2=1, KK=1. */

/* ......dth is the half time-step. nm=nmax, jm=jmax, km=kmax */

/*........................................................... */

#include <stdio.h>

#include <stdlib.h>

#include <math.h>

static int

strid(double *, double *, double *, double *, int); ...

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required