1 function err=sweeps_fortran(K,K14,n1,n2,n3,F,X,x)
3 % compare the result of matlab ndt_mult and fortran ndt_mult
4 y=vertical_sweeps(K,F,X,x);
9 x_r = reshape(x,n1,n2,n3);
10 F_r = reshape(F,n1,n2,n3);
12 write_array_nd(K14,'Kmat');
13 write_array_nd(F_r,'Fmat');
14 write_array_nd(x_r,'x_sweeps');
16 system('./fortran/sweeps_test.exe');
18 y_f=read_array_nd('x_sweeps');
20 err=norm(y(:)-y_f(:),inf);