1 program ndt_boundary_conditions_test
3 use module_boundary_conditions
! testing only
4 use module_io_matlab
! to read and write matrices as text files from matlab
8 real, pointer:: kmat(:,:,:,:), & ! fortran is not case sensitive
13 ifds
, ifde
, kfds
, kfde
, jfds
, jfde
, & ! fire domain bounds
14 ifms
, ifme
, kfms
, kfme
, jfms
, jfme
, & ! fire memory bounds
15 ifps
, ifpe
, kfps
, kfpe
, jfps
, jfpe
, & ! fire patch bounds
16 ifts
, ifte
, kfts
, kfte
, jfts
,jfte
! fire tile bounds
19 ! read input arrays in ikj index ordering and tight bounds
20 call read_array_nd(a
,s
,'kmat')
21 allocate(kmat_m(s(1),s(2),s(3),s(4)))
32 if(msize
.ne
.14)call crash('msize must be 14')
40 ! allocate a little bigger with zeros in extra areas
41 allocate(kmat(ifms
:ifme
,kfms
:kfme
,jfms
:jfme
,1:msize
))
49 kmat(i
,k
,j
,jx
) = kmat_m(i
,j
,k
,jx
)
55 write(*,'(a)')'calling ntd_boundary_conditions'
56 call ndt_boundary_conditions( &
57 ifds
, ifde
, kfds
, kfde
, jfds
, jfde
, & ! fire domain bounds
58 ifms
, ifme
, kfms
, kfme
, jfms
, jfme
, & ! fire memory bounds
59 ifps
, ifpe
, kfps
, kfpe
, jfps
, jfpe
, & ! fire patch bounds
60 ifts
, ifte
, kfts
, kfte
, jfts
,jfte
, & ! fire tile bounds
63 ! copy the output data
68 kmat_m(i
,k
,j
,jx
) = kmat(i
,j
,k
,jx
)
74 call write_array_nd(reshape(kmat_m
,(/product(s
)/)),s
,'kmat')
76 end program ndt_boundary_conditions_test