OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
r2r_input_init.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!|| r2r_input_init ../engine/source/coupling/rad2rad/r2r_input_init.F
25!||--- called by ------------------------------------------------------
26!|| radioss2 ../engine/source/engine/radioss2.F
27!||--- calls -----------------------------------------------------
28!|| get_sock_ibuf_c ../engine/source/coupling/rad2rad/rad2rad_c.c
29!|| get_sock_rbuf_c ../engine/source/coupling/rad2rad/rad2rad_c.c
30!|| send_sock_ibuf_c ../engine/source/coupling/rad2rad/rad2rad_c.c
31!|| send_sock_rbuf_c ../engine/source/coupling/rad2rad/rad2rad_c.c
32!|| spmd_ibcast ../engine/source/mpi/generic/spmd_ibcast.F
33!|| spmd_rbcast ../engine/source/mpi/generic/spmd_rbcast.F
34!||--- uses -----------------------------------------------------
35!|| output_mod ../common_source/modules/output/output_mod.F90
36!|| rad2r_mod ../engine/share/modules/rad2r.F
37!||====================================================================
38 SUBROUTINE r2r_input_init(IRUNN,OUTPUT)
39C-----------------------------------------------
40C M o d u l e s
41C-----------------------------------------------
42 USE rad2r_mod
43 USE output_mod
44C-----------------------------------------------
45C I m p l i c i t T y p e s
46C-----------------------------------------------
47#include "implicit_f.inc"
48C-----------------------------------------------
49C C o m m o n B l o c k s
50C-----------------------------------------------
51#include "com01_c.inc"
52#include "com04_c.inc"
53#include "com06_c.inc"
54#include "com10_c.inc"
55#include "rad2r_c.inc"
56#include "scr05_c.inc"
57#include "task_c.inc"
58C-----------------------------------------------
59C D u m m y A r g u m e n t s
60C-----------------------------------------------
61 INTEGER IRUNN
62 TYPE(output_), INTENT(INOUT) :: OUTPUT !< output structure
63C-----------------------------------------------
64C L o c a l V a r i a b l e s
65C-----------------------------------------------
66 INTEGER I
67 my_real dt_loc(9)
68 my_real :: dthis_local
69 my_real, DIMENSION(9) :: dthis1_local
70C-----------------------------------------------
71
72 IF (ispmd==0) THEN
73 CALL send_sock_ibuf_c(sock0,iddom,1)
74 CALL send_sock_ibuf_c(sock0,th_vers,1)
75 CALL send_sock_ibuf_c(sock0,itform,1)
76 CALL send_sock_ibuf_c(sock0,npart,1)
77 CALL send_sock_ibuf_c(sock0,nummat0-1,1)
78 CALL send_sock_ibuf_c(sock0,numgeo0,1)
79 dthis_local = output%TH%DTHIS
80 CALL send_sock_rbuf_c(sock0,dthis_local,1)
81 output%TH%DTHIS = dthis_local
82 DO i=1,9
83 dt_loc(i)= ep30
84 IF (nthgrp01(i)>0) dt_loc(i)=output%TH%DTHIS1(i)
85 END DO
86 CALL send_sock_rbuf_c(sock0,dt_loc,9)
87 CALL send_sock_ibuf_c(sock0,aform,9)
88 CALL send_sock_ibuf_c(sock0,irunn,1)
89
90 CALL get_sock_ibuf_c(sock0,th_vers,1)
91 dthis_local = output%TH%DTHIS
92 CALL get_sock_rbuf_c(sock0,dthis_local,1)
93 output%TH%DTHIS = dthis_local
94 dthis1_local(1:9) = output%TH%DTHIS1(1:9)
95 CALL get_sock_rbuf_c(sock0,dthis1_local,9)
96 output%TH%DTHIS1(1:9) = dthis1_local(1:9)
97 ENDIF
98
99 IF (nspmd>1) THEN
100 CALL spmd_ibcast(th_vers,th_vers,1,1,0,2)
101 dthis_local = output%TH%DTHIS
102 CALL spmd_rbcast(dthis_local,dthis_local,1,1,0,2)
103 output%TH%DTHIS = dthis_local
104 dthis1_local(1:9) = output%TH%DTHIS1(1:9)
105 CALL spmd_rbcast(dthis1_local,dthis1_local,9,1,0,2)
106 output%TH%DTHIS1(1:9) = dthis1_local(1:9)
107 ENDIF
108
109C-----Multidomains -> TH must be written with format 4 in order to be read by rad2rad ---
110 itform = 3
111 DO i=1,9
112 aform(i)=3
113 END DO
114
115C
116C******************************************************************************C
117
118
119C-----------------------------------------------------------------
120 RETURN
121 END SUBROUTINE r2r_input_init
122C
#define my_real
Definition cppsort.cpp:32
subroutine r2r_input_init(irunn, output)
void get_sock_rbuf_c(int *sd, my_real_c *rbuf, int *len)
Definition rad2rad_c.c:2491
void get_sock_ibuf_c(int *sd, int *ibuf, int *len)
Definition rad2rad_c.c:2412
void send_sock_ibuf_c(int *sd, int *ibuf, int *len)
Definition rad2rad_c.c:2439
void send_sock_rbuf_c(int *sd, my_real_c *rbuf, int *len)
Definition rad2rad_c.c:2464
subroutine spmd_ibcast(tabi, tabr, n1, n2, from, add)
Definition spmd_ibcast.F:57
subroutine spmd_rbcast(tabi, tabr, n1, n2, from, add)
Definition spmd_rbcast.F:62