double precision function exa(x,y,t,ax,ay) c General information: c Function exa returns an exact solution to the two-dimensional c convection equation c c u_t + ax u_x + ay u_y =0. c Function exa requires an arbitrary two parameter function c f(x,y). c The returned exact solution will be c f(x - ax t, y - ay t). c Copyright 1997 Leon van Dommelen c Version 1.0 Leon van Dommelen 1/10/97 c Arguments: c Avoid typos: implicit none c Input: the position for which to return the exact solution: double precision x,y c Input: the time at which to return the exact solution: double precision t c Input: the components ax and ay of the convection velocity: double precision ax,ay c External variables: c An arbitrary two-parameter function: double precision f external f c Executable statements: c Return the exact solution: exa=f(x-ax*t,y-ay*t) c Exit: return end