44
45
46
48 USE elbufdef_mod
50 USE matparam_def_mod, ONLY : matparam_struct_
51
52
53
54#include "implicit_f.inc"
55
56
57
58#include "com01_c.inc"
59#include "com04_c.inc"
60#include "vect01_c.inc"
61#include "param_c.inc"
62#include "task_c.inc"
63
64
65
66 INTEGER IPARG(NPARG,NGROUP), IXS(NIXS,NUMELS), IXQ(7,NUMELQ),
67 . NERCVOIS(*),NESDVOIS(*),LERCVOIS(*),LESDVOIS(*),
68 . LENCOM
69 my_real flux(*), val2(*), xe(*), pm(npropm,nummat)
70 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP), TARGET :: ELBUF_TAB
71 TYPE(t_ale_connectivity), INTENT(IN) :: ALE_CONNECT
72 TYPE(MATPARAM_STRUCT_),DIMENSION(NUMMAT),INTENT(IN) :: MATPARAM
73
74
75
76 INTEGER NG, I, J, MT, ITASK, NEL, MID
78 TYPE(G_BUFEL_) ,POINTER :: GBUF
79
80
81
82 DO ng=itask+1,ngroup,nthread
83
84 IF (iparg(76, ng) == 1) cycle
86 2 mtn ,llt ,nft ,iad ,ity ,
87 3 npt ,jale ,ismstr ,jeul ,jtur ,
88 4 jthe ,jlag ,jmult ,jhbe ,jivf ,
89 5 nvaux ,jpor ,jcvt ,jclose ,jplasol ,
90 6 irep ,iint ,igtyp ,israt ,isrot ,
91 7 icsen ,isorth ,isorthg ,ifailure,jsms )
92 IF(jale+jeul==0) cycle
93 IF(iparg(8,ng)==1) cycle
94 lft=1
95 gbuf => elbuf_tab(ng)%GBUF
96
97 IF(jtur==1)THEN
98 IF(n2d==0)THEN
99 DO i=lft,llt
100 j=i+nft
101 mt=ixs(1,j)
102 re=gbuf%RE(i)
103 r =gbuf%RHO(i)
104 xe(j)=re/r
105 val2(j)=val2(j)*pm(85,mt)/pm(86,mt)
106 enddo
107 ELSE
108 DO i=lft,llt
109 j=i+nft
110 mt=ixq(1,j)
111 re=gbuf%RE(i)
112 r =gbuf%RHO(i)
113 xe(j)=re/r
114 val2(j)=val2(j)*pm(85,mt)/pm(86,mt)
115 enddo
116 ENDIF
117 ELSE
118 DO i=lft,llt
119 j=i+nft
120 xe(j)=zero
121 enddo
122 ENDIF
123 IF(jpor == 2)THEN
124
125 DO i=lft,llt
126 j=i+nft
127 val2(j)=zero
128 enddo
129 ENDIF
130 ENDDO
131
133
134
135
136 IF (nspmd > 1) THEN
137
138 CALL spmd_evois(xe,val2,nercvois,nesdvois,lercvois,lesdvois,lencom)
139
140
141 END IF
142
143 DO ng=itask+1,ngroup,nthread
144
145 IF (iparg(76, ng) == 1) cycle
147 2 mtn ,llt ,nft ,iad ,ity ,
148 3 npt ,jale ,ismstr ,jeul ,jtur ,
149 4 jthe ,jlag ,jmult ,jhbe ,jivf ,
150 5 nvaux ,jpor ,jcvt ,jclose ,jplasol ,
151 6 irep ,iint ,igtyp ,israt ,isrot ,
152 7 icsen ,isorth ,isorthg ,ifailure,jsms )
153 IF(jale+jeul==0) cycle
154 IF(jtur/=1) cycle
155 IF(mtn==11) cycle
156 IF(mtn==17) cycle
157 IF(iparg(8,ng)==1) cycle
158
159 gbuf => elbuf_tab(ng)%GBUF
160 lft=1
161 nel=iparg(2,ng)
162 mid=iparg(18,ng)
163 rhocp = pm(69,mid)
164 if(rhocp == zero)then
165 rhocp = pm(89,mid)*matparam(mid)%eos%cp
166 end if
167 IF(n2d==0)THEN
168 CALL adiff3(gbuf%RE,xe,flux(6*nft+1),val2,ale_connect,gbuf%VOL,gbuf%TEMP,rhocp,nel)
169 ELSE
170 CALL adiff2(gbuf%RE,xe,flux(4*nft+1),val2,ale_connect,gbuf%VOL,gbuf%TEMP,rhocp,nel)
171 ENDIF
172 ENDDO
173
175
176 RETURN
subroutine adiff2(phin, phi, grad, alpha, ale_connect, vol, temp, rhocp, nel)
subroutine adiff3(phin, phi, grad, alpha, ale_connect, vol, temp, rhocp, nel)
subroutine initbuf(iparg, ng, mtn, llt, nft, iad, ity, npt, jale, ismstr, jeul, jtur, jthe, jlag, jmult, jhbe, jivf, mid, jpor, jcvt, jclose, jpla, irep, iint, igtyp, israt, isrot, icsen, isorth, isorthg, ifailure, jsms)
subroutine spmd_evois(t, val2, nercvois, nesdvois, lercvois, lesdvois, lencom)