1 module module_boundary_conditions
5 subroutine ndt_boundary_conditions( &
6 ifds
, ifde
, kfds
,kfde
, jfds
, jfde
, & ! fire grid dimensions
7 ifms
, ifme
, kfms
,kfme
, jfms
, jfme
, &
8 ifps
, ifpe
, kfps
, kfpe
, jfps
, jfpe
, & ! fire patch bounds
9 ifts
, ifte
, kfts
, kfte
, jfts
,jfte
, &
16 integer, intent(in
):: &
17 ifds
, ifde
, kfds
, kfde
, jfds
, jfde
, & ! fire domain bounds
18 ifms
, ifme
, kfms
, kfme
, jfms
, jfme
, & ! fire memory bounds
19 ifps
, ifpe
, kfps
, kfpe
, jfps
, jfpe
, & ! fire patch bounds
20 ifts
, ifte
, kfts
, kfte
, jfts
,jfte
! fire tile bounds
22 integer, parameter:: msize
= 14
23 real, intent(inout
), dimension(ifms
:ifme
,kfms
:kfme
,jfms
:jfme
,msize
):: kmat
! global stiffness matrix
38 s
=max(s
,abs(kmat(i
,k
,j
, 1)))
46 ! not efficient but will be executed only once
47 if(i
.eq
.ifds
.or
.i
.eq
.ifde
.or
.j
.eq
.jfds
.or
.j
.eq
.jfde
.or
.k
.eq
.kfde
)then
48 ! replace the row/col (i,k,j) by scaled identity
49 kmat(i
-1,k
-1,j
-1,14)=0.
50 kmat(i
,k
-1,j
-1,13)=0.
51 kmat(i
+1,k
-1,j
-1,12)=0.
52 kmat(i
-1,k
-1,j
,11)=0.
54 kmat(i
+1,k
-1,j
, 9)=0.
55 kmat(i
-1,k
-1,j
+1, 8)=0.
56 kmat(i
,k
-1,j
+1, 7)=0.
57 kmat(i
+1,k
-1,j
+1, 6)=0.
58 kmat(i
-1,k
,j
-1, 5)=0.
60 kmat(i
+1,k
,j
-1, 3)=0.
81 end subroutine ndt_boundary_conditions
83 end module module_boundary_conditions