
Parallel Computing Applied to a Diffusive ModelParallel Computing Applied to a Diffusive Model 143
Let us now consider the corresponding MATLAB solution code
represented in Program 6.1. One more time, even when the Finite Difference
description has the principal disadvantage of uniform division (and
identical computational cost to analyze all the points inside the domain), a
very quick method of generating the successive set of points representing
densities is necessary .
Program 6.1 Explicit solution of telegraphers equation.
clear all; clc; hold off;
g2 = 0.2;c = 1;N = 400;L = 200;atten = .0010; t=0;
dx = L / N;
dt = sqrt(g2)*dx/c;
x = dx : ...