46 SUBROUTINE init_th(IPARG,ITHBUF,ELBUF_TAB,IGEO,IXR,
47 . ITHGRP,NTHGRP2,ID,WEIGHT,SITHBUF)
59#include "implicit_f.inc"
67#include "tabsiz_c.inc"
71 INTEGER,
INTENT(IN) :: SITHBUF
72 INTEGER MBUFFER, NPARTL,NTHGRP2
73 INTEGER IPARG(NPARG,*),IGEO(NPROPGI,*),
74 . ithgrp(nithgr,*),ithbuf(sithbuf),ixr(nixr,*),weight(numnod)
75 INTEGER,
INTENT(in) :: ID
77 TYPE (ELBUF_STRUCT_),
DIMENSION(NGROUP) :: ELBUF_TAB
81 INTEGER I,J,K,L,M,N,II,JJ,IP,NP,NN,NG,ITY,NEL,NFT,N1,N2,NPT,NRWA,
82 . jale,fsavmax,proc,
nvar,iad,ityp,iadv,first,krbhol,iskn,nnod,eltype
83 INTEGER :: MY_SIZE,,IJK
84 INTEGER,
DIMENSION(NTHGRP2+1) :: LOCAL_WA
85 INTEGER,
DIMENSION(:),
ALLOCATABLE :: INDEX_WA_ELTYPE_P0,INDEX_WA_SIZE_P0
86 INTEGER,
DIMENSION(:),
ALLOCATABLE :: WA_INDEX_DIPLS
87 TYPE(),
DIMENSION(:),
POINTER :: WA_COMM
88 INTEGER,
DIMENSION(:),
POINTER :: WA_SIZE,TOTAL_WA_SIZE
90 TYPE(
th_wa_real),
DIMENSION(:),
POINTER :: WA_P0,WA
153 ALLOCATE( index_wa_size_p0(nspmd) )
154 ALLOCATE( wa_index_dipls(nspmd) )
173 ELSEIF(eltype==2)
THEN
180 ELSEIF(eltype==3)
THEN
187 ELSEIF(eltype==4)
THEN
194 ELSEIF(eltype==5)
THEN
201 ELSEIF(eltype==6)
THEN
208 ELSEIF(eltype==7)
THEN
215 ELSEIF(eltype==8)
THEN
222 ELSEIF(eltype==9)
THEN
231 ALLOCATE( wa_comm(id)%TH_SIZE(nspmd) )
232 ALLOCATE( wa_comm(id)%TH_DIPLS(nspmd) )
234 wa_comm(id)%TH_SIZE(1:nspmd) = 0
236 index_wa_size_p0(1:nspmd) = 0
237 wa_index_dipls(1:nspmd) = 0
243 ELSEIF(eltype==2)
THEN
246 ELSEIF(eltype==3)
THEN
248 . iparg,ithbuf,sithbuf )
249 ELSEIF(eltype==4)
THEN
251 . iparg,ithbuf,sithbuf )
252 ELSEIF(eltype==5)
THEN
254 . iparg,ithbuf,sithbuf )
255 ELSEIF(eltype==6)
THEN
257 . iparg ,ithbuf,sithbuf)
258 ELSEIF(eltype==7)
THEN
260 . iparg , ithbuf,sithbuf )
261 ELSEIF(eltype==8)
THEN
263 . iparg, ithbuf ,sithbuf)
264 ELSEIF(eltype==9)
THEN
266 . iparg,ithbuf,sithbuf)
274 index_wa_size_p0 = my_size
278 wa_comm(id)%TH_DIPLS(1:nspmd) = 0
279 total_wa_size(id) = 0
280 total_index_wa_size = 0
282 wa_index_dipls(1) = 0
285 total_index_wa_size = total_index_wa_size + index_wa_size_p0(i)
287 total_index_wa_size = total_index_wa_size + index_wa_size_p0(nspmd)
290 ALLOCATE( index_wa_eltype_p0(total_index_wa_size) )
295 . index_wa_size_p0,wa_index_dipls)
301 wa_comm(id)%TH_SIZE(1) = wa_size(id)
306 wa_comm(id)%TH_DIPLS(1) = 0
308 wa_comm(id)%TH_DIPLS(i+1) = wa_comm(id)%TH_DIPLS(i) + wa_comm(id)%TH_SIZE(i)
309 total_wa_size(id) = total_wa_size(id) + wa_comm(id)%TH_SIZE(i)
311 total_wa_size(id) = total_wa_size(id) + wa_comm(id)%TH_SIZE(nspmd)
316 ALLOCATE( eltype_struct(id)%TH_PROC(nspmd) )
318 local_wa(1:nthgrp2+1) = 0
319 j = wa_index_dipls(i)
320 local_wa(1) = wa_comm(id)%TH_DIPLS(i)
322 DO ijk=1,index_wa_size_p0(i)/2
323 n = index_wa_eltype_p0(2*ijk+j)
324 local_wa(n+1) = wa_comm(id)%TH_DIPLS(i) + index_wa_eltype_p0(2*ijk-1+j)
328 IF(local_wa(n)==0)
THEN
329 local_wa(n)=local_wa(n-1)
334 IF(index_wa_size_p0(i)/2>0)
THEN
338 IF(local_wa(n)-local_wa(n-1)>0)
THEN
344 eltype_struct(id)%TH_PROC(i)%TH_ELM_SIZE = ijk
345 ijk = eltype_struct(id)%TH_PROC(i)%TH_ELM_SIZE
346 ALLOCATE( eltype_struct(id)%TH_PROC(i)%TH_ELM(ijk,2) )
350 IF(local_wa(n)-local_wa(n-1)>0)
THEN
352 eltype_struct(id)%TH_PROC(i)%TH_ELM(ijk,1) = local_wa(n-1)
353 eltype_struct(id)%TH_PROC(i)%TH_ELM(ijk,2) = n-1
357 eltype_struct(id)%TH_PROC(i)%TH_ELM(ijk,1) = local_wa(nthgrp2+1)
358 eltype_struct(id)%TH_PROC(i)%TH_ELM(ijk,2) = nthgrp2+1
361 eltype_struct(id)%TH_PROC(i)%TH_ELM_SIZE = 0
362 ALLOCATE( eltype_struct(id)%TH_PROC(i)%TH_ELM(0,0) )
368 ALLOCATE( wa(id)%WA_REAL(wa_size(id)) )
369 ALLOCATE( wa_p0(id)%WA_REAL(total_wa_size(id)) )
371 DEALLOCATE( index_wa_eltype_p0 )
375 DEALLOCATE( index_wa_size_p0 )
376 DEALLOCATE( wa_index_dipls )
subroutine init_th(iparg, ithbuf, elbuf_tab, igeo, ixr, ithgrp, nthgrp2, id, weight, sithbuf)
type(th_wa_real), dimension(10), target wa_sol
type(th_wa_real), dimension(10), target wa_trus
type(th_wa_real), dimension(10), target wa_coq_p0
integer, dimension(10), target total_wa_sol_size
integer, dimension(10), target total_wa_nst_size
type(th_proc_type), dimension(10), target coq_struct
type(th_wa_real), dimension(10), target wa_nod
type(th_wa_real), dimension(10), target wa_sph
type(th_wa_real), dimension(10), target wa_coq
type(th_proc_type), dimension(10), target nst_struct
type(th_comm), dimension(10), target wa_sol_comm
type(th_wa_real), dimension(10), target wa_sol_p0
type(th_comm), dimension(10), target wa_sph_comm
type(th_wa_real), dimension(10), target wa_nod_p0
integer, dimension(10), target wa_spring_size
integer, dimension(10), target total_wa_nod_size
type(th_comm), dimension(10), target wa_spring_comm
integer, dimension(10), target total_wa_quad_size
type(th_proc_type), dimension(10), target sph_struct
type(th_wa_real), dimension(10), target wa_spring
type(th_wa_real), dimension(10), target wa_pout_p0
integer, dimension(10), target wa_quad_size
type(th_wa_real), dimension(10), target wa_nst
integer, dimension(10), target total_wa_trus_size
type(th_comm), dimension(10), target wa_nod_comm
integer, dimension(10), target total_wa_sph_size
type(th_proc_type), dimension(10), target quad_struct
integer, dimension(10), target wa_nst_size
type(th_proc_type), dimension(10), target spring_struct
integer, dimension(10), target wa_trus_size
integer, dimension(:), allocatable index_wa_eltype
type(th_comm), dimension(10), target wa_coq_comm
type(th_wa_real), dimension(10), target wa_spring_p0
type(th_comm), dimension(10), target wa_pout_comm
integer, dimension(10), target total_wa_pout_size
type(th_wa_real), dimension(10), target wa_pout
type(th_wa_real), dimension(10), target wa_nst_p0
integer, dimension(10), target wa_sph_size
integer, dimension(10), target total_wa_spring_size
integer, dimension(10), target total_wa_coq_size
type(th_proc_type), dimension(10), target sol_struct
type(th_wa_real), dimension(10), target wa_trus_p0
type(th_proc_type), dimension(10), target nod_struct
type(th_comm), dimension(10), target wa_nst_comm
type(th_comm), dimension(10), target wa_trus_comm
type(th_wa_real), dimension(10), target wa_quad_p0
integer, dimension(10), target wa_pout_size
integer, dimension(10), target wa_sol_size
type(th_comm), dimension(10), target wa_quad_comm
integer, dimension(10), target wa_nod_size
type(th_proc_type), dimension(10), target trus_struct
integer, dimension(10), target wa_coq_size
type(th_wa_real), dimension(10), target wa_quad
type(th_proc_type), dimension(10), target pout_struct
type(th_wa_real), dimension(10), target wa_sph_p0
integer function nvar(text)
subroutine spmd_gather_int(sendbuf, recvbuf, proc, send_size, rcv_size)
subroutine spmd_gatherv_int(sendbuf, recvbuf, proc, send_size, total_rcv_size, rcv_size, dipls)
subroutine thcoq_count(nthgrp2, ithgrp, wa_size, index_wa_coq, iparg, ithbuf, sithbuf)
subroutine thnod_count(ithgrp, nthgrp2, wa_size, index_wa_nod, ithbuf, weight, sithbuf)
subroutine thnst_count(nthgrp2, ithgrp, wa_size, index_wa_nst, iparg, ithbuf, sithbuf)
subroutine thpout_count(nthgrp2, ithgrp, wa_size, index_wa_pout, iparg, ithbuf, sithbuf)
subroutine thquad_count(nthgrp2, ithgrp, wa_size, index_wa_quad, iparg, ithbuf, sithbuf)
subroutine thres_count(iparg, ithbuf, elbuf_tab, igeo, ixr, ithgrp, nthgrp2, wa_size, index_wa_spring, sithbuf)
subroutine thsol_count(nthgrp2, ithgrp, wa_size, index_wa_sol, iparg, ithbuf, sithbuf)
subroutine thsph_count(nthgrp2, ithgrp, wa_size, index_wa_sph, iparg, ithbuf, sithbuf)
subroutine thtrus_count(nthgrp2, ithgrp, wa_size, index_wa_trus, iparg, ithbuf, sithbuf)