1 function [W,rate]=femwind_fortran(A,X,u0,params)
3 exe = './fortran/femwind_test.exe';
4 if isfield(params,'run_fortran') && params.run_fortran && exist(exe,'file')
5 write_array_nd(swap23(X{1}),'X');
6 write_array_nd(swap23(X{2}),'Y');
7 write_array_nd(swap23(X{3}),'Z');
8 write_array_nd(swap23(u0{1}),'u0');
9 write_array_nd(swap23(u0{2}),'v0');
10 write_array_nd(swap23(u0{3}),'w0');
22 disp(['running ',exe])
24 u=swap23(read_array_nd('u'));
25 v=swap23(read_array_nd('v'));
26 w=swap23(read_array_nd('w'));
27 rate=read_array_nd('rate');
35 if isfield(params,'run_matlab') && params.run_matlab
37 [wm,rate]=femwind_solve(A,X,u0,params)
40 if exist('wf','var') & exist('wm','var')
42 tol = 10*eps(single(1.));
47 err= norm(wwf(:)-wwm(:),inf)/norm(wwm(:));
49 fprintf('error %g OK, tol = %g\n',err,tol)
51 warning(sprintf('error %g too large, tol=%g',err,tol))