Merge branch 'fixf'
[wrf-fire-matlab.git] / femwind / vec_boundary_conditions_fortran.m
blobbfff7e29a95befd7c88435a8475ae0047c714a79
1 function Fb=vec_boundary_conditions_fortran(F,params); 
2 % Fb=vec_boundary_conditions_fortran(F,params); 
3 % call fortran version and compare results
4 % in:
5 %     F mesh vector 
7 %Writing to file for use by fortran tester
8 write_array(swap23(F),'F');
10 system('./fortran/vec_boundary_conditions_test.exe');
12 Fb = swap23(read_array('Fb'));
14 % the same in matlab
15 [~,Fbm]=apply_boundary_conditions([],F,{F});
17 err = big(Fbm - Fb)
18 if err > eps(single(1.0))*big(Fbm)*10
19     error('error too large')
20 end
21 end