1 function Kb=ndt_boundary_conditions_fortran(K,params);
2 % Kb=ndt_boundary_conditions_fortran(K,params);
3 % call fortran version and compare results
5 % K global stiffness matrix ndt14 format
9 error('K must be in ndt 14 storage scheme')
12 %Writing to file for use by fortran tester
13 write_array_nd(swap23(K),'K');
15 system('./fortran/ndt_boundary_conditions_test.exe');
17 Kb = swap23(read_array_nd('Kb'));
20 Ks = ndt_convert(K,'sparse');
21 [Ksb,~]=apply_boundary_conditions(Ks,[],{K(:,:,:,1)});
23 % convert to sparse and compare
24 Kbs = ndt_convert(Kb,'sparse');
26 if err > eps(single(1.0))*big(Ksb)*10
27 error('error too large')