OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_exch_nodarea.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23
24!||====================================================================
25!|| spmd_exch_nodarea ../engine/source/mpi/anim/spmd_exch_nodarea.F
26!||--- called by ------------------------------------------------------
27!|| admthke ../engine/source/model/remesh/admthke.F
28!|| ani_pcont ../engine/source/output/anim/generate/ani_pcont.F
29!|| ani_pcont21 ../engine/source/output/anim/generate/ani_pcont.F
30!|| err_thk ../engine/source/elements/shell/err_thk.f
31!|| genani ../engine/source/output/anim/generate/genani.F
32!|| inter_nodal_areas ../engine/source/output/inter_nodal_areas.F
33!|| inter_sh_offset_ini ../engine/source/interfaces/shell_offset/inter_offset_ini.F90
34!|| spmd_exch_output_noda_pext ../engine/source/mpi/output/spmd_exch_output_noda_pext.F
35!||--- calls -----------------------------------------------------
36!||--- uses -----------------------------------------------------
37!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
38!||====================================================================
40 . NODAREA,IAD_ELEM,FR_ELEM,LENR,WEIGHT)
41C realise la sommation des aires aux noeuds frontieres
42C-----------------------------------------------
43C I m p l i c i t T y p e s
44C-----------------------------------------------
45 USE spmd_comm_world_mod, ONLY : spmd_comm_world
46#include "implicit_f.inc"
47C-----------------------------------------------------------------
48C M e s s a g e P a s s i n g
49C-----------------------------------------------
50#include "spmd.inc"
51C-----------------------------------------------
52C C o m m o n B l o c k s
53C-----------------------------------------------
54#include "com01_c.inc"
55#include "task_c.inc"
56C-----------------------------------------------
57C D u m m y A r g u m e n t s
58C-----------------------------------------------
59 INTEGER IAD_ELEM(2,*),FR_ELEM(*), SIZE, LENR,WEIGHT(*)
60 my_real
61 . nodarea(*)
62C-----------------------------------------------
63C L o c a l V a r i a b l e s
64C-----------------------------------------------
65#ifdef MPI
66 INTEGER MSGTYP,I,NOD,LOC_PROC,IERROR,
67 . siz,j,k,l,nb_nod,
68 . status(mpi_status_size),
69 . iad_send(nspmd+1),iad_recv(nspmd+1),
70 . req_r(nspmd),req_s(nspmd),msgoff
71
72 my_real,
73 . DIMENSION(:),ALLOCATABLE :: sbuf,rbuf
74 DATA msgoff/7035/
75C-----------------------------------------------
76C S o u r c e L i n e s
77C-----------------------------------------------
78 ALLOCATE(sbuf(lenr))
79 ALLOCATE(rbuf(lenr))
80C-----------------------------------------------
81
82 loc_proc = ispmd+1
83 l = 1
84 iad_recv(1)=1
85
86C Mise en place des buffers de reception
87 DO i=1,nspmd
88 siz = iad_elem(1,i+1)-iad_elem(1,i)
89 IF(siz/=0) THEN
90 msgtyp = msgoff
91 CALL mpi_irecv(
92 s rbuf(l),siz,real,it_spmd(i),msgtyp,
93 g spmd_comm_world,req_r(i),ierror)
94 l = l+siz
95 END IF
96 iad_recv(i+1) = l
97 END DO
98
99C Remplissage des buffers d'envoi et envoi des donnees
100C
101 l=1
102 iad_send(1)=1
103 DO i=1,nspmd
104 DO j=iad_elem(1,i),iad_elem(1,i+1)-1
105 nod = fr_elem(j)
106 sbuf(l) = nodarea(nod)
107 l = l+1
108 END DO
109 iad_send(i+1) = l
110 END DO
111
112 DO i=1,nspmd
113
114 IF(iad_elem(1,i+1)-iad_elem(1,i)>0)THEN
115
116
117 msgtyp = msgoff
118 siz = iad_send(i+1)-iad_send(i)
119 l = iad_send(i)
120
121 CALL mpi_isend(
122 s sbuf(l),siz,real,it_spmd(i),msgtyp,
123 g spmd_comm_world,req_s(i),ierror)
124 ENDIF
125 END DO
126C Reception et traitement
127 DO i = 1, nspmd
128C
129 nb_nod = iad_elem(1,i+1)-iad_elem(1,i)
130 IF(nb_nod>0)THEN
131 CALL mpi_wait(req_r(i),status,ierror)
132 l = iad_recv(i)
133
134 DO j=iad_elem(1,i),iad_elem(1,i+1)-1
135
136 nod = fr_elem(j)
137 nodarea(nod) = nodarea(nod) + rbuf(l)
138 l = l+1
139 ENDDO
140 ENDIF
141 ENDDO
142
143 DO i = 1, nspmd
144 IF(iad_elem(1,i+1)-iad_elem(1,i)>0)THEN
145 CALL mpi_wait(req_s(i),status,ierror)
146 ENDIF
147 ENDDO
148C
149C Mise a 0 de adm sur noeud non main
150C
151C DO I = 1, NUMNOD
152C IF(WEIGHT(I)==0) ADM(I) = ZERO
153C ENDDO
154C
155 DEALLOCATE(sbuf)
156 DEALLOCATE(rbuf)
157
158#endif
159 RETURN
160 END
#define my_real
Definition cppsort.cpp:32
subroutine err_thk(ixc, ixtg, iparg, iad_elem, fr_elem, weight, x, elbuf_tab, ipart, ipartc, iparttg, itask, nodft, nodlt, err_thk_sh4, err_thk_sh3, sh4tree, sh3tree, area_sh4, area_sh3, area_nod, thick_sh4, thick_sh3, thick_nod)
Definition err_thk.F:44
subroutine mpi_isend(buf, cnt, datatype, dest, tag, comm, ireq, ierr)
Definition mpi.f:382
subroutine mpi_wait(ireq, status, ierr)
Definition mpi.f:525
subroutine mpi_irecv(buf, cnt, datatype, source, tag, comm, ireq, ierr)
Definition mpi.f:372
subroutine spmd_exch_nodarea(nodarea, iad_elem, fr_elem, lenr, weight)