1 program f_assembly_test
8 real, pointer:: F(:,:,:),Xmat(:,:,:),Ymat(:,:,:),Zmat(:,:,:), &
9 Xu0mat(:,:,:), Yu0mat(:,:,:), Zu0mat(:,:,:) ! fortran is not case sensitive
11 integer :: F_dim
, x_dim(3),u_dim(3), &
12 ifds
, ifde
, kfds
, kfde
, jfds
, jfde
, & ! fire domain bounds
13 ifms
, ifme
, kfms
, kfme
, jfms
, jfme
, & ! fire memory bounds
14 ifps
, ifpe
, kfps
, kfpe
, jfps
, jfpe
, & ! fire patch bounds
15 ifts
, ifte
, kfts
, kfte
, jfts
, jfte
! fire tile bounds
17 real, pointer:: A(:,:,:), X(:,:,:),Y(:,:,:),Z(:,:,:), &
18 Xu0(:,:,:), Yu0(:,:,:), Zu0(:,:,:), &
19 Fm(:,:,:) ! fortran is not case sensitive
23 call read_array(A
,'A')
24 call read_array(X
,'X')
25 call read_array(Y
,'Y')
26 call read_array(Z
,'Z')
27 call read_array(Xu0
, 'Xu0')
28 call read_array(Yu0
, 'Yu0')
29 call read_array(Zu0
, 'Zu0')
54 allocate(Xmat(ifms
:ifme
,kfms
:kfme
,jfms
:jfme
))
55 allocate(Ymat(ifms
:ifme
,kfms
:kfme
,jfms
:jfme
))
56 allocate(Zmat(ifms
:ifme
,kfms
:kfme
,jfms
:jfme
))
57 allocate(Xu0mat(ifms
:ifme
,kfms
:kfme
,jfms
:jfme
))
58 allocate(Yu0mat(ifms
:ifme
,kfms
:kfme
,jfms
:jfme
))
59 allocate(Zu0mat(ifms
:ifme
,kfms
:kfme
,jfms
:jfme
))
61 ! copy the input data to tile sized bounds
62 ! X Y Z are corner based, upper bound larger by one
66 Xmat(i
,k
,j
) = X(i
,k
,j
)
67 Ymat(i
,k
,j
) = Y(i
,k
,j
)
68 Zmat(i
,k
,j
) = Z(i
,k
,j
)
77 Xu0mat(i
,k
,j
) = Xu0(i
,k
,j
)
78 Yu0mat(i
,k
,j
) = Yu0(i
,k
,j
)
79 Zu0mat(i
,k
,j
) = Zu0(i
,k
,j
)
87 F_dim
= x_dim(1)*x_dim(2)*x_dim(3)
88 allocate(F(ifms
:ifme
, kfms
:kfme
, jfms
:jfme
))
91 write(*,'(a)')'calling ndt_f_assembly'
93 ifds
, ifde
, kfds
, kfde
, jfds
, jfde
, & ! fire domain bounds
94 ifms
, ifme
, kfms
, kfme
, jfms
, jfme
, & ! fire memory bounds
95 ifps
, ifpe
, kfps
, kfpe
, jfps
, jfpe
, & ! fire patch bounds
96 ifts
, ifte
, kfts
, kfte
, jfts
,jfte
, & ! fire tile bounds
97 A
, Xmat
, Ymat
, Zmat
, Xu0mat
, Yu0mat
, Zu0mat
, &
100 ! write output as is in 3D but with tight dimensions
101 call write_array(F(ifts
:ifte
+1,kfts
:kfte
+1,jfts
:jfte
+1),'F')
103 end program f_assembly_test