41
42
43
44 USE multi_fvm_mod
45
46
47
48#include "implicit_f.inc"
49
50
51
52
53#include "param_c.inc"
54
55#include "com01_c.inc"
56
57#include "task_c.inc"
58
59
60
61 INTEGER, INTENT(IN) :: ITASK, IPARG(NPARG, *), IXS(NIXS, *), IXQ(NIXQ, *), IXTG(NIXTG,
62INTENT(IN) :: xgrid(3, *), wgrid(3, *)
63 TYPE(MULTI_FVM_STRUCT), INTENT(INOUT) :: MULTI_FVM
64
65
66
67 INTEGER :: NG, MTN, NEL, ITY, ISOLNOD, NFT, JALE
68 LOGICAL :: COMPUTE_CENTROID
69
70 compute_centroid = (multi_fvm%MUSCL > 0) .OR. multi_fvm%NS_DIFF
71
72 DO ng = itask + 1, ngroup, nthread
73 mtn = iparg(1, ng)
74 IF (mtn == 151) THEN
75 nel = iparg(2, ng)
76 nft = iparg(3, ng)
77 ity = iparg(5, ng)
78 jale = iparg(7, ng)
79 isolnod = iparg(28, ng)
80 IF (ity == 1) THEN
81
82 IF (isolnod == 4) THEN
83
84 CALL snorm3t(nel, nft, jale, ixs, xgrid, wgrid,
85 . multi_fvm%FACE_DATA%NORMAL(1:3, 1:6, 1 + nft : nel + nft),
86 . multi_fvm%FACE_DATA%WFAC(1:3, 1:6, 1 + nft : nel + nft),
87 . multi_fvm%FACE_DATA%SURF(1:6, 1 + nft : nel + nft))
88 IF (compute_centroid) THEN
89 CALL centroid3t(nel, multi_fvm%NELEM, nft, ixs, xgrid,
90 . multi_fvm%ELEM_DATA%CENTROID(:, 1 + nft : nel + nft),
91 . multi_fvm%FACE_DATA%CENTROID(:, :, 1 + nft : nel + nft))
92 ENDIF
93 ELSE
94
95 CALL snorm3(nel, nft, jale, ixs, xgrid, wgrid,
96 . multi_fvm%FACE_DATA%NORMAL(1:3, 1:6, 1 + nft : nel + nft),
97 . multi_fvm%FACE_DATA%WFAC(1:3, 1:6, 1 + nft : nel + nft),
98 . multi_fvm%FACE_DATA%SURF(1:6, 1 + nft : nel + nft))
99
100 IF (compute_centroidTHEN
101 CALL centroid3(nel, multi_fvm%NELEM, nft, ixs, xgrid,
102 . multi_fvm%ELEM_DATA%CENTROID(:, 1 + nft : nel + nft),
103 . multi_fvm%FACE_DATA%CENTROID(:, :, 1 + nft : nel + nft))
104 ENDIF
105 ENDIF
106 ELSE IF (ity == 2) THEN
107
108 CALL qnorm2(nel, nft, jale, multi_fvm%SYM, ixq, xgrid, wgrid,
109 . multi_fvm%FACE_DATA%NORMAL(1:3, 1:4, 1 + nft : nel + nft),
110 . multi_fvm%FACE_DATA%WFAC(1:3, 1:4, 1 + nft : nel + nft),
111 . multi_fvm%FACE_DATA%SURF(1:4, 1 + nft : nel + nft))
112 IF (compute_centroid) THEN
113 CALL centroid2(nel, multi_fvm%NELEM, nft, ixq, xgrid,
114 . multi_fvm%ELEM_DATA%CENTROID(:, 1 + nft : nel + nft),
115 . multi_fvm%FACE_DATA%CENTROID(:, :, 1 + nft : nel + nft))
116 ENDIF
117 ELSE IF (ity == 7) THEN
118
119 CALL qnorm2t(nel, nft, jale, multi_fvm%SYM, ixtg, xgrid, wgrid,
120 . multi_fvm%FACE_DATA%NORMAL(1:3, 1:3, 1 + nft : nel + nft),
121 . multi_fvm%FACE_DATA%WFAC(1:3, 1:3, 1 + nft : nel + nft),
122 . multi_fvm%FACE_DATA%SURF(1:3, 1 + nft : nel + nft))
123 IF (compute_centroid) THEN
124 CALL centroid2t(nel, multi_fvm%NELEM, nft, ixtg, xgrid,
125 . multi_fvm%ELEM_DATA%CENTROID(:, 1 + nft : nel + nft),
126 . multi_fvm%FACE_DATA%CENTROID(:, :, 1 + nft : nel + nft))
127 ENDIF
128 ENDIF
129 ENDIF
130 ENDDO
subroutine centroid2t(nel, length, nft, ixtg, xgrid, elem_centroid, face_centroid)
subroutine centroid3t(nel, length, nft, ixs, xgrid, elem_centroid, face_centroid)
subroutine centroid3(nel, length, nft, ixs, xgrid, elem_centroid, face_centroid)
subroutine centroid2(nel, length, nft, ixq, xgrid, elem_centroid, face_centroid)
subroutine qnorm2(nel, nft, jale, sym, ixq, xgrid, wgrid, norm, wfac, surf)
subroutine qnorm2t(nel, nft, jale, sym, ixtg, xgrid, wgrid, norm, wfac, surf)
subroutine snorm3(nel, nft, jale, ixs, xgrid, wgrid, norm, wfac, surf)
subroutine snorm3t(nel, nft, jale, ixs, xgrid, wgrid, norm, wfac, surf)