module magfield_interface interface subroutine read_field(field_file, map, xmin) use magfield implicit none type(magfield_struct), allocatable :: position(:), map(:,:,:) type(magfield_struct) x0,xmin character(*) field_file end subroutine end interface interface subroutine quadratic_fit(dxyz,b1,b2) use magfield implicit none type(magfield_struct) dxyz(-1:1) real(rp) b0(3), b1(3), b2(3) end subroutine end interface interface subroutine compute_derivatives(map) use magfield implicit none type(magfield_struct), allocatable :: map(:,:,:) type(magfield_struct) x0, xmax, xmin, dxyz(-1:1) integer i,j,k,l, ntot(3), ix,jx end subroutine end interface interface subroutine sum_fields(map_inj,map_inf, xmin_inj, xmin_inf,map, xmin) use magfield implicit none type(magfield_struct), allocatable :: map_inj(:,:,:), map_inf(:,:,:) type(magfield_struct), allocatable :: map(:,:,:) type(magfield_struct) x0, xmax, xmin, dxyz(-1:1), xmin_inj, xmin_inf integer ntot(3), ntot_inf(3), idif(3) end subroutine end interface interface subroutine get_g2_fields(field_file_inj, field_file_inf, & x,B,b1,b2, out_of_range) use magfield implicit none logical out_of_range character(*) field_file_inj, field_file_inf real(rp) x(3), B(3) ,b1(3,3),b2(3,3) end subroutine end interface end module