1 program ndt_assembly_test
3 use module_ndt_assembly
10 real, pointer:: Xmat(:,:,:),Ymat(:,:,:), Zmat(:,:,:), Kmat(:,:,:,:)
11 real, pointer::a1(:), a2(:), a3(:), a4(:), X(:,:,:), Y(:,:,:), Z(:,:,:), Km(:,:,:,:)
12 integer ::n1(2),n2(3),n3(3), n4(3), m(3)
15 ifds
, ifde
, kfds
, kfde
, jfds
, jfde
, & ! fire domain bounds
16 ifms
, ifme
, kfms
, kfme
, jfms
, jfme
, & ! fire memory bounds
17 ifps
, ifpe
, kfps
, kfpe
, jfps
, jfpe
, & ! fire patch bounds
18 ifts
, ifte
, kfts
, kfte
, jfts
,jfte
, & ! fire tile bounds
19 iats
, iate
, jats
, jate
, iams
,iame
, & ! Amat bounds
23 integer :: iflags
= 1 !Flags to construct K in hexa module
24 integer:: ksize(4) ! Global Stifness Matrix Dimensions in Matlab
26 call read_array_nd(a1
,n1
,'A') !Recovering X-Matrix and dimension of X matrix
27 if (n1(1).ne
.3.or
.n1(2).ne
.3)then
28 call crash('A must be 3 by 3')
34 ! read input arrays in ikj index ordering and tight bounds
35 call read_array(X
,'X') !Recovering X-Matrix and dimension of X matrix
36 call read_array(Y
,'Y') !Recovering X-Matrix and dimension of X matrix
37 call read_array(Z
,'Z') !Recovering X-Matrix and dimension of X matrix
57 allocate(Kmat(ifms
:ifme
,kfms
:kfme
,jfms
:jfme
, 1:msize
))
59 allocate(Xmat(ifms
:ifme
,kfms
:kfme
,jfms
:jfme
))
60 allocate(Ymat(ifms
:ifme
,kfms
:kfme
,jfms
:jfme
))
61 allocate(Zmat(ifms
:ifme
,kfms
:kfme
,jfms
:jfme
))
63 ! copy the input data to tile sized bounds
67 Xmat(i
,k
,j
) = X(i
,k
,j
)
68 Ymat(i
,k
,j
) = Y(i
,k
,j
)
69 Zmat(i
,k
,j
) = Z(i
,k
,j
)
74 !write(*,'(a)')'calling ndt_assembly'
76 ifds
, ifde
, kfds
, kfde
, jfds
, jfde
, & ! fire domain bounds
77 ifms
, ifme
, kfms
, kfme
, jfms
, jfme
, & ! fire memory bounds
78 ifps
, ifpe
, kfps
, kfpe
, jfps
, jfpe
, & ! fire patch bounds
79 ifts
, ifte
, kfts
, kfte
, jfts
,jfte
, & ! fire tile bounds
80 Amat
,Xmat
,Ymat
,Zmat
, iflags
, Kmat
)
82 !write(*,'(a,3i8)')'copying the output data to array size ',n2,msize
83 allocate(Km(ifts
:ifte
+1,kfts
:kfte
+1,jfts
:jfte
+1, 1:msize
))
88 Km(i
,k
,j
,jx
)=Kmat(i
,k
,j
,jx
)
95 ksize
= (/ifte
-ifts
+2,kfte
-kfts
+2,jfte
-jfts
+2,msize
/)
96 call write_array_nd(reshape(Km
,(/product(ksize
)/)),ksize
,'K')
97 !***print *,(/product(ksize)/)
100 end program ndt_assembly_test