OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
w_th.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/.
23C
24!||====================================================================
25!|| w_th ../starter/source/restart/ddsplit/w_th.F
26!||--- called by ------------------------------------------------------
27!|| write_th_buffer ../starter/source/restart/ddsplit/write_th_buffer.F
28!||--- calls -----------------------------------------------------
29!|| nlocal ../starter/source/spmd/node/ddtools.F
30!||====================================================================
31 SUBROUTINE w_th(ITHGRP ,ITHBUF ,LENTHG,NODLOCAL,CEL ,
32 2 NTHGRP0,NTHGRP2,PROC ,
33 3 CELSPH, NUMLOCCLUSTER ,NBR_TH_MONVOL)
34C-----------------------------------------------
35C M o d u l e s
36C-----------------------------------------------
37
38C-----------------------------------------------
39C I m p l i c i t T y p e s
40C-----------------------------------------------
41#include "implicit_f.inc"
42C-----------------------------------------------
43C C o m m o n B l o c k s
44C-----------------------------------------------
45#include "com04_c.inc"
46#include "param_c.inc"
47C-----------------------------------------------
48C D u m m y A r g u m e n t s
49C-----------------------------------------------
50 INTEGER PROC, LENTHG, NTHGRP0, NTHGRP2,
51 . ITHGRP(NITHGR,*), ITHBUF(*), NODLOCAL(*),
52 . cel(*), celsph(*), numloccluster(*)
53 INTEGER :: NBR_TH_MONVOL ! number of /TH/MONV
54C-----------------------------------------------
55C E x t e r n a l F u n c t i o n s
56C-----------------------------------------------
57 INTEGER NLOCAL
58 EXTERNAL NLOCAL
59C-----------------------------------------------
60C L o c a l V a r i a b l e s
61C-----------------------------------------------
62 INTEGER NT, IH, ITYP, NNE, IAD, K, P, ESHIFT,
63 . ITHBUF_L(LENTHG)
64 eshift = 0
65C
66C Header recopie
67C
68 CALL write_i_c(ithgrp,nithgr*(nthgrp0+nbr_th_monvol))
69C
70C buffer renumerote localement
71C
72 DO nt = 1, lenthg
73 ithbuf_l(nt) = ithbuf(nt)
74 ENDDO
75C
76 DO nt = 1, nthgrp2
77 ityp=ithgrp(2,nt)
78 nne =ithgrp(4,nt)
79 iad =ithgrp(5,nt)
80 IF ((ityp>=1.AND.ityp<=7).OR.
81 . ityp==50.OR.ityp==51.OR.ityp==100) THEN
82C elements
83 DO ih = 1, nne
84 k = ithbuf_l(iad-1+ih)
85 p = ithbuf_l(iad+nne-1+ih)+1
86 IF(ityp==1) THEN
87 eshift = 0
88 ELSEIF(ityp==2) THEN
89 eshift = numels
90 ELSEIF(ityp==3) THEN
91 eshift = numels+numelq
92 ELSEIF(ityp==4) THEN
93 eshift = numels+numelq+numelc
94 ELSEIF(ityp==5) THEN
95 eshift = numels+numelq+numelc+numelt
96 ELSEIF(ityp==6) THEN
97 eshift = numels+numelq+numelc+numelt+numelp
98 ELSEIF(ityp==7) THEN
99 eshift = numels+numelq+numelc+numelt+numelp+numelr
100 ELSEIF(ityp==100) THEN
101 eshift = numels+numelq+numelc+numelt+numelp+numelr+numeltg
102 ENDIF
103 IF(p==proc) THEN
104 IF(ityp==51)THEN
105 ithbuf_l(iad-1+ih) = celsph(k)
106 ELSE
107 ithbuf_l(iad-1+ih) = cel(k+eshift)
108 ENDIF
109 ENDIF
110 ENDDO
111 ELSEIF (ityp==0) THEN
112C noeuds
113 DO ih = 1, nne
114 k = ithbuf_l(iad-1+ih)
115 IF(nlocal(k,proc)==1) THEN
116C noeud present => nodlocal
117 ithbuf_l(iad-1+ih) = nodlocal(k)
118 ELSE
119C noeud abscent => 0
120 ithbuf_l(iad-1+ih) = 0
121 ENDIF
122 ENDDO
123 ELSEIF (ityp==109) THEN
124 ELSEIF (ityp == 114) THEN
125 DO ih=iad,iad+nne-1
126c local number of cluster, or zero
127 ithbuf_l(ih) = numloccluster(ithbuf(ih))
128 ENDDO
129 ENDIF
130 ENDDO
131C
132 CALL write_i_c(ithbuf_l,lenthg)
133C
134 RETURN
135 END
subroutine w_th(ithgrp, ithbuf, lenthg, nodlocal, cel, nthgrp0, nthgrp2, proc, celsph, numloccluster, nbr_th_monvol)
Definition w_th.F:34
void write_i_c(int *w, int *len)