OpenRadioss
2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_sptool.F
Go to the documentation of this file.
1
Copyright> OpenRadioss
2
Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3
Copyright>
4
Copyright> This program is free software: you can redistribute it and/or modify
5
Copyright> it under the terms of the GNU Affero General Public License as published by
6
Copyright> the Free Software Foundation, either version 3 of the License, or
7
Copyright> (at your option) any later version.
8
Copyright>
9
Copyright> This program is distributed in the hope that it will be useful,
10
Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11
Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
Copyright> GNU Affero General Public License for more details.
13
Copyright>
14
Copyright> You should have received a copy of the GNU Affero General Public License
15
Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16
Copyright>
17
Copyright>
18
Copyright> Commercial Alternative: Altair Radioss Software
19
Copyright>
20
Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21
Copyright> software under a commercial license. Contact Altair to discuss further if the
22
Copyright> 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)
37
C-----------------------------------------------
38
C M o d u l e s
39
C-----------------------------------------------
40
USE
sphbox
41
USE
message_mod
42
C-----------------------------------------------
43
C I m p l i c i t T y p e s
44
C-----------------------------------------------
45
#include "implicit_f.inc"
46
C-----------------------------------------------
47
C C o m m o n B l o c k s
48
C-----------------------------------------------
49
#include "com01_c.inc"
50
#include "sphcom.inc"
51
#include "spmd_c.inc"
52
C-----------------------------------------------
53
C D u m m y A r g u m e n t s
54
C-----------------------------------------------
55
INTEGER
IFLG
56
C-----------------------------------------------
57
C L o c a l V a r i a b l e s
58
C-----------------------------------------------
59
INTEGER
P, IERROR, IERROR1
60
C-----------------------------------------------
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
103
C
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
116
C
117
RETURN
118
END
119
C
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)
131
C-----------------------------------------------
132
C M o d u l e s
133
C-----------------------------------------------
134
USE
sphbox
135
C-----------------------------------------------
136
C I m p l i c i t T y p e s
137
C-----------------------------------------------
138
#include "implicit_f.inc"
139
C-----------------------------------------------
140
C C o m m o n B l o c k s
141
C-----------------------------------------------
142
#include "com01_c.inc"
143
#include "sphcom.inc"
144
C-----------------------------------------------
145
C D u m m y A r g u m e n t s
146
C-----------------------------------------------
147
INTEGER
IFLG
148
C-----------------------------------------------
149
C L o c a l V a r i a b l e s
150
C-----------------------------------------------
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
164
C
165
RETURN
166
END
167
C
message_mod
Definition
message_mod.F:1249
sphbox
Definition
sphbox.F:77
sphbox::isphs
integer, dimension(:), allocatable isphs
Definition
sphbox.F:87
sphbox::lsphs
integer, dimension(:), allocatable lsphs
Definition
sphbox.F:91
sphbox::isphr
integer, dimension(:), allocatable isphr
Definition
sphbox.F:87
sphbox::psphr
integer, dimension(:), allocatable psphr
Definition
sphbox.F:89
sphbox::sizspc
integer, parameter sizspc
Definition
sphbox.F:85
sphbox::psphs
integer, dimension(:), allocatable psphs
Definition
sphbox.F:89
sphbox::sizspw
integer, parameter sizspw
Definition
sphbox.F:85
sphbox::ispsymr
integer, dimension(:,:), allocatable ispsymr
Definition
sphbox.F:93
sphbox::nsphr
integer nsphr
Definition
sphbox.F:83
sphbox::nsphs
integer nsphs
Definition
sphbox.F:83
read_db
subroutine read_db(a, n)
Definition
read_db.F:88
spmd_savesph
subroutine spmd_savesph(iflg)
Definition
spmd_sptool.F:131
spmd_inisph
subroutine spmd_inisph(iflg)
Definition
spmd_sptool.F:37
ancmsg
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
arret
subroutine arret(nn)
Definition
arret.F:87
write_db
subroutine write_db(a, n)
Definition
write_db.F:140
write_i_c
void write_i_c(int *w, int *len)
Definition
write_routtines.c:645
read_i_c
void read_i_c(int *w, int *len)
Definition
write_routtines.c:805
engine
source
mpi
sph
spmd_sptool.F
Generated by
1.15.0