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