OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_sptool.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!|| spmd_inisph ../engine/source/mpi/sph/spmd_sptool.F
25!||--- called by ------------------------------------------------------
26!|| rdresb ../engine/source/output/restart/rdresb.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../engine/source/output/message/message.f
29!|| arret ../engine/source/system/arret.F
30!|| read_db ../common_source/tools/input_output/read_db.F
31!|| read_i_c ../common_source/tools/input_output/write_routtines.c
32!||--- uses -----------------------------------------------------
33!|| message_mod ../engine/share/message_module/message_mod.F
34!|| sphbox ../engine/share/modules/sphbox.F
35!||====================================================================
36 SUBROUTINE spmd_inisph(IFLG)
37C-----------------------------------------------
38C M o d u l e s
39C-----------------------------------------------
40 USE sphbox
41 USE message_mod
42C-----------------------------------------------
43C I m p l i c i t T y p e s
44C-----------------------------------------------
45#include "implicit_f.inc"
46C-----------------------------------------------
47C C o m m o n B l o c k s
48C-----------------------------------------------
49#include "com01_c.inc"
50#include "sphcom.inc"
51#include "spmd_c.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 INTEGER IFLG
56C-----------------------------------------------
57C L o c a l V a r i a b l e s
58C-----------------------------------------------
59 INTEGER P, IERROR, IERROR1
60C-----------------------------------------------
61 IF(iflg==1)THEN
62 nsphr = 0
63 nsphs = 0
64 IF(numsphg>0.AND.nspmd>1)THEN
65 ALLOCATE(psphr(nspmd),stat=ierror)
66 ALLOCATE(psphs(nspmd),stat=ierror1)
67 ierror = ierror + ierror1
68 IF(ierror/=0) THEN
69 CALL ancmsg(msgid=20,anmode=aninfo)
70 CALL arret(2)
71 END IF
72 CALL read_i_c(psphr,nspmd)
73 CALL read_i_c(psphs,nspmd)
74 nsphr = 0
75 nsphs = 0
76 DO p = 1, nspmd
77 nsphr = nsphr + psphr(p)
78 nsphs = nsphs + psphs(p)
79 END DO
80 ierror = 0
81 ierror1 = 0
82 IF(nsphr/=0)ALLOCATE(isphr(nsphr),stat=ierror)
83 IF(nsphs/=0)THEN
84 ALLOCATE(isphs(nsphs),stat=ierror1)
85 ierror = ierror + ierror1
86 ALLOCATE(lsphs(nsphs),stat=ierror1)
87 ierror = ierror + ierror1
88 IF(ierror/=0) THEN
89 CALL ancmsg(msgid=20,anmode=aninfo)
90 CALL arret(2)
91 END IF
92 CALL read_i_c(lsphs,nsphs)
93 END IF
94 IF(nspcond>0)THEN
95 ALLOCATE(ispsymr(nspcond,nsphr),stat=ierror)
96 IF(ierror/=0) THEN
97 CALL ancmsg(msgid=20,anmode=aninfo)
98 CALL arret(2)
99 END IF
100 CALL read_i_c(ispsymr,nspcond*nsphr)
101 END IF
102 END IF
103C
104 ELSEIF(iflg==2.AND.nspmd>1)THEN
105 IF(nsphr/=0)THEN
106 ALLOCATE(xsphr(sizspc,nsphr),stat=ierror)
107 ALLOCATE(wacompr(sizspw,nsphr),stat=ierror1)
108 ierror = ierror + ierror1
109 IF(ierror/=0) THEN
110 CALL ancmsg(msgid=20,anmode=aninfo)
111 CALL arret(2)
112 END IF
113 CALL read_db(xsphr,sizspc*nsphr)
114 END IF
115 END IF
116C
117 RETURN
118 END
119C
120!||====================================================================
121!|| spmd_savesph ../engine/source/mpi/sph/spmd_sptool.F
122!||--- called by ------------------------------------------------------
123!|| wrrestp ../engine/source/output/restart/wrrestp.F
124!||--- calls -----------------------------------------------------
125!|| write_db ../common_source/tools/input_output/write_db.F
126!|| write_i_c ../common_source/tools/input_output/write_routtines.c
127!||--- uses -----------------------------------------------------
128!|| sphbox ../engine/share/modules/sphbox.F
129!||====================================================================
130 SUBROUTINE spmd_savesph(IFLG)
131C-----------------------------------------------
132C M o d u l e s
133C-----------------------------------------------
134 USE sphbox
135C-----------------------------------------------
136C I m p l i c i t T y p e s
137C-----------------------------------------------
138#include "implicit_f.inc"
139C-----------------------------------------------
140C C o m m o n B l o c k s
141C-----------------------------------------------
142#include "com01_c.inc"
143#include "sphcom.inc"
144C-----------------------------------------------
145C D u m m y A r g u m e n t s
146C-----------------------------------------------
147 INTEGER IFLG
148C-----------------------------------------------
149C L o c a l V a r i a b l e s
150C-----------------------------------------------
151 IF(numsph>0.AND.nspmd>1)THEN
152 IF(iflg==1)THEN
153 CALL write_i_c(psphr,nspmd)
154 CALL write_i_c(psphs,nspmd)
155 IF(nsphs/=0)
156 . CALL write_i_c(lsphs,nsphs)
157 IF(nspcond/=0.AND.nsphr/=0)
158 . CALL write_i_c(ispsymr,nspcond*nsphr)
159 ELSEIF(iflg==2)THEN
160 IF(nsphr/=0)
161 . CALL write_db(xsphr,nsphr*sizspc)
162 END IF
163 END IF
164C
165 RETURN
166 END
167C
integer, dimension(:), allocatable isphs
Definition sphbox.F:87
integer, dimension(:), allocatable lsphs
Definition sphbox.F:91
integer, dimension(:), allocatable isphr
Definition sphbox.F:87
integer, dimension(:), allocatable psphr
Definition sphbox.F:89
integer, parameter sizspc
Definition sphbox.F:85
integer, dimension(:), allocatable psphs
Definition sphbox.F:89
integer, parameter sizspw
Definition sphbox.F:85
integer, dimension(:,:), allocatable ispsymr
Definition sphbox.F:93
integer nsphr
Definition sphbox.F:83
integer nsphs
Definition sphbox.F:83
subroutine read_db(a, n)
Definition read_db.F:88
subroutine spmd_savesph(iflg)
subroutine spmd_inisph(iflg)
Definition spmd_sptool.F:37
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)
Definition message.F:889
subroutine arret(nn)
Definition arret.F:87
subroutine write_db(a, n)
Definition write_db.F:140
void write_i_c(int *w, int *len)
void read_i_c(int *w, int *len)