1 program coarsening_icl_test
4 use module_utils
! to read and write matrices as text files from matlab
8 real, pointer, dimension(:,:,:):: icl_z_m
,dx_m
,dy_m
,dz_m
,A_m
,minaspect_m
,maxaspect_m
! to read from files
9 real, dimension(1,1,1)::cr_x_m
,cr_y_m
10 real:: A(3,3), dx
,dy
,minaspect
,maxaspect
! to pass on
12 integer, pointer:: icl_z(:)
18 call read_array(dx_m
,'dx')
20 call read_array(dy_m
,'dy')
22 call read_array(dz_m
,'dz')
25 dz
=reshape(dz_m
,(/n3
/))
26 call read_array(A_m
,'A')
27 A
=reshape(A_m
,(/3,3/))
28 call read_array(minaspect_m
,'minaspect')
29 minaspect
=minaspect_m(1,1,1)
30 call read_array(maxaspect_m
,'maxaspect')
31 maxaspect
=maxaspect_m(1,1,1)
33 call coarsening_icl(cr_x
,cr_y
,icl_z
,dx
,dy
,dz
,A
,minaspect
,maxaspect
)
36 call write_array(cr_x_m
,'cr_x')
38 call write_array(cr_y_m
,'cr_y')
39 call write_array(reshape(real(icl_z
),(/size(icl_z
),1,1/)),'icl_z')
41 end program coarsening_icl_test