51
54
55
56
57#include "implicit_f.inc"
58
59
60
61#include "com04_c.inc"
62#include "sphcom.inc"
63#include "buckr_c.inc"
64
65
66
67
68
69
70 INTEGER KXSP(NISP,*), IXSP(KVOISPH,*), NOD2SP(*),
71 . (2,0:NPART) ,LONFSPH(*)
72 INTEGER ,INTENT(IN) :: IPARTSP(NUMSPH),PRE_SEARCH,SZ_INTP_DIST
74 . spbuf(nspbuf,*), x(3,*)
75 my_real ,
INTENT(INOUT) :: max_intp_dist_part(sz_intp_dist)
76
77
78
79 INTEGER N,J,K, IREDUCE, NVOIS, IERROR,JVOIS(NUMSPH), JSTOR(NUMSPH), JPERM(NUMSPH)
80 INTEGER NS, WASPACT(NUMSPH), IPRT
81 my_real dvois(numsph), bminma(6), myspatrue,xmax,
ymax, zmax
82
83 nvois = 0
84
85 ALLOCATE(
wreduce(numsph),stat=ierror)
86 IF(ierror/=0) THEN
87 CALL ancmsg(msgid=19,msgtype=msgerror,anmode=aninfo,
88 . c1='(SPH)')
90 END IF
91 ireduce=0
93
94 IF(nsphio==0)THEN
95 nsphact=0
96 DO n=1,numsph
97 IF(kxsp(2,n)/=0)THEN
98 nsphact=nsphact+1
99 waspact(nsphact)=n
100 ENDIF
101 ENDDO
102 ELSE
103 nsphact=0
104 DO iprt=1,npart
105 DO k=lprtsph(2,iprt-1)+1,lprtsph(1,iprt)
106 nsphact=nsphact+1
107 waspact(nsphact)=lonfsph(k)
108 ENDDO
109 ENDDO
110 END IF
111
112 DO ns=1,nsphact
113 n=waspact(ns)
114 kxsp(5,n)=0
115 END DO
116
117 bminma(1) = -ep30
118 bminma(2) = -ep30
119 bminma(3) = -ep30
120 bminma(4) = ep30
121 bminma(5) = ep30
122 bminma(6) = ep30
123
124 xmin=ep30
125 xmax=-ep30
126 ymin=ep30
128 zmin=ep30
129 zmax=-ep30
130
131
132
133 dbuc=zero
134 DO ns=1,nsphact
135 n=waspact(ns)
136 dbuc=
max(dbuc,spbuf(1,n))
137
138 j=kxsp(3,n)
139 xmin=
min(xmin,x(1,j))
140 ymin=
min(ymin,x(2,j))
141 zmin=
min(zmin,x(3,j))
142 xmax=
max(xmax,x(1,j))
144 zmax=
max(zmax,x(3,j))
145 END DO
146
147 bminma(1) =
max(bminma(1),xmax)
148 bminma(2) =
max(bminma(2),
ymax)
149 bminma(3) =
max(bminma(3),zmax)
150 bminma(4) =
min(bminma(4),xmin)
151 bminma(5) =
min(bminma(5),ymin)
152 bminma(6) =
min(bminma(6),zmin)
153
154 dbuc=dbuc*sqrt(one +spatrue)*onep0001
155 bminma(1) = bminma(1)+dbuc
156 bminma(2) = bminma(2)+dbuc
157 bminma(3) = bminma(3)+dbuc
158 bminma(4) = bminma(4)-dbuc
159 bminma(5) = bminma(5)-dbuc
160 bminma(6) = bminma(6)-dbuc
161
162 CALL spbuc31(x ,kxsp ,ixsp ,nod2sp,
163 . spbuf ,waspact,jvois,jstor ,jperm ,
164 . dvois ,ireduce,
wreduce,bminma,ipartsp ,
165 . sz_intp_dist,max_intp_dist_part,pre_search)
166
167
168
169 IF (pre_search==0) THEN
170 myspatrue=spatrue
171
172
173
174 CALL spclasv(x ,spbuf ,kxsp ,ixsp ,nod2sp ,
175 1 waspact,myspatrue,ireduce,
wreduce)
176
177
178
179 IF(myspatrue<spatrue)spatrue=myspatrue
180 ELSE
182 ENDIF
183
184 RETURN
subroutine ymax(idn, fac, npc, pld, stiffmin, stiffmax, stiffini, stiffavg)
integer, dimension(:), allocatable wreduce
subroutine spbuc31(x, kxsp, ixsp, nod2sp, spbuf, ma, jvois, jstor, jperm, dvois, ireduce, kreduce, bminma, ipartsp, sz_intp_dist, max_intp_dist_part, pre_search)
subroutine spclasv(x, spbuf, kxsp, ixsp, nod2sp, waspact, myspatrue, ireduce, kreduce)
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)