5

There is a difference between the requirements for a hyperbolic pde like $$ u_t + a u_x = 0 $$ and for a purely parabolic pde like $$ u_t = u_{xx} $$ Suppose the solutions are smooth and you approximate them by some finite difference method. Then in case of hyperbolic problem, the maximum error in the numerical solution depends on the time interval of ...


1

Here is a fast implementation using sparse matrices and sparse Jacobian estimation: % define square domain [-1,1] x [-1,1] n = 51; x=linspace(-1,1,n); y=x; [X,Y]=meshgrid(x,x); % build finite differences operators dx=x(2)-x(1); e=ones(n,1); d0x=ones(n,1); grad = spdiags([-e 0*e e],-1:1,n,n)/2/dx; % use Kronecker product to build matrix of d/dx and d/dy ...


Only top voted, non community-wiki answers of a minimum length are eligible