February 2006
Intermediate to advanced
595 pages
14h 27m
English
/* ......Program 3.1: adi.c. */
/* ......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); ...
Read now
Unlock full access