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