1 function [w,rate]=femwind_solve_fortran(A,X,u0,params)
3 exe = './fortran/femwind_solve.exe';
4 if exist(exe,'file') & params.run_fortran
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}),'Xu0');
9 write_array_nd(swap23(u0{2}),'Yu0');
10 write_array_nd(swap23(u0{3}),'Zu0');
13 write_array(iflags,'iflags')
22 disp(['running ',exe])
24 Xw=swap23(read_array_nd('Xw'));
25 Yw=swap23(read_array_nd('Yw'));
26 Zw=swap23(read_array_nd('Zw'));
27 rate=read_array_nd('rate');
38 [wm,rate]=femwind_solve(A,X,u0,params)
42 if exist('wf','var') & exist('wm','var')
44 tol = 10*eps(single(1.));
49 err= norm(wwf(:)-wwm(:),inf)/norm(wwm(:));
51 fprintf('error %g OK, tol = %g\n',err,tol)
53 warning(sprintf('error %g too large, tol=%g',err,tol))