OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
user_windows.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!|| user_windows_routine ../engine/source/user_interface/user_windows.f
25!||--- called by ------------------------------------------------------
26!|| resol ../engine/source/engine/resol.f
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../engine/source/output/message/message.F
29!|| arret ../engine/source/system/arret.F
30!|| spmd_exch_userwi ../engine/source/mpi/user_interface/spmd_exch_userwi.F
31!||--- uses -----------------------------------------------------
32!|| message_mod ../engine/share/message_module/message_mod.F
33!|| user_windows_mod ../common_source/modules/user_windows_mod.F
34!||====================================================================
35 SUBROUTINE user_windows_routine( ISPMD ,NSPMD ,USERL_AVAIL ,
36 1 USER_WINDOWS ,RAD_INPUTNAME ,LEN_RAD_INPUTNAME,
37 2 NUMNOD ,NCYCLE ,ITAB ,
38 3 TT ,DT1 ,WFEXT ,
39 4 D ,X ,V ,
40 5 VR ,MS ,IN ,
41 6 STIFN ,STIFR ,A ,
42 7 AR ,DT2 )
43C-----------------------------------------------
44C M o d u l e s
45C-----------------------------------------------
47 USE message_mod
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 INTEGER, INTENT(IN) :: ISPMD,NSPMD
56 INTEGER, INTENT(IN) :: USERL_AVAIL
57 TYPE(USER_WINDOWS_),INTENT(INOUT) :: USER_WINDOWS
58 INTEGER, INTENT(IN) :: LEN_RAD_INPUTNAME
59 CHARACTER(LEN=LEN_RAD_INPUTNAME),INTENT(IN) :: RAD_INPUTNAME
60 INTEGER, INTENT(IN) :: NUMNOD,NCYCLE
61 INTEGER, DIMENSION(NUMNOD),INTENT(IN) :: ITAB
62 my_real, INTENT(IN) :: tt,dt1
63 my_real, INTENT(INOUT) :: wfext
64 my_real, DIMENSION(3*NUMNOD), INTENT(IN) :: d,x,v,vr
65 my_real, DIMENSION(NUMNOD), INTENT(IN) :: ms,in,stifn,stifr
66 my_real, DIMENSION(3*NUMNOD), INTENT(INOUT) :: a,ar
67 my_real, INTENT(INOUT) :: dt2
68C-----------------------------------------------
69C Local Variables
70C-----------------------------------------------
71 INTEGER I,ND,SIZE_OPT,NUVARI
72 CHARACTER(LEN=256) :: OPTION
73 INTEGER, DIMENSION(:) ,ALLOCATABLE :: USER_ITAB
74 my_real, DIMENSION(:) ,ALLOCATABLE :: user_d,user_x,user_v,user_vr
75 my_real, DIMENSION(:) ,ALLOCATABLE :: user_ms,user_in,user_stifn,user_stifr
76 my_real, DIMENSION(:) ,ALLOCATABLE :: user_a,user_ar
77 my_real dtu
78C-----------------------------------------------
79 IF(ispmd == 0) THEN
80 IF (userl_avail == 1) THEN
81 dtu = ep30
82 nuvari = user_windows%NUVARI - 100
83
84 ALLOCATE(user_itab(user_windows%N_USERNODS))
85 ALLOCATE(user_d( 3*user_windows%N_USERNODS))
86 ALLOCATE(user_x( 3*user_windows%N_USERNODS))
87 ALLOCATE(user_v( 3*user_windows%N_USERNODS))
88 ALLOCATE(user_vr(3*user_windows%N_USERNODS))
89 ALLOCATE(user_ms(user_windows%N_USERNODS))
90 ALLOCATE(user_in(user_windows%N_USERNODS))
91 ALLOCATE(user_stifn(user_windows%N_USERNODS))
92 ALLOCATE(user_stifr(user_windows%N_USERNODS))
93 ALLOCATE(user_a(3*user_windows%N_USERNODS))
94 ALLOCATE(user_ar(3*user_windows%N_USERNODS))
95
96 ! -----------------------------------------------------
97 ! User Windows will only receive the nodes it defined
98 ! -----------------------------------------------------
99 DO i=1,user_windows%N_USERNODS
100 nd = user_windows%USERNODS(i)
101 ! recopy ITAB
102 user_itab(i) = itab(nd)
103 ! recopy D
104 user_d(3*(i-1)+1) = d(3*(nd-1)+1)
105 user_d(3*(i-1)+2) = d(3*(nd-1)+2)
106 user_d(3*(i-1)+3) = d(3*(nd-1)+3)
107 ! recopy X
108 user_x(3*(i-1)+1) = x(3*(nd-1)+1)
109 user_x(3*(i-1)+2) = x(3*(nd-1)+2)
110 user_x(3*(i-1)+3) = x(3*(nd-1)+3)
111 ! recopy V
112 user_v(3*(i-1)+1) = v(3*(nd-1)+1)
113 user_v(3*(i-1)+2) = v(3*(nd-1)+2)
114 user_v(3*(i-1)+3) = v(3*(nd-1)+3)
115 ! Recopy VR
116 user_vr(3*(i-1)+1) = vr(3*(nd-1)+1)
117 user_vr(3*(i-1)+2) = vr(3*(nd-1)+2)
118 user_vr(3*(i-1)+3) = vr(3*(nd-1)+3)
119 ! Recopy MS,IN,STIFN,STIFR
120 user_ms(i) = ms(nd)
121 user_in(i) = in(nd)
122 user_stifn(i) = stifn(nd)
123 user_stifr(i) = stifr(nd)
124 ! Recopy A, just in case
125 user_a(3*(i-1)+1) = a(3*(nd-1)+1)
126 user_a(3*(i-1)+2) = a(3*(nd-1)+2)
127 user_a(3*(i-1)+3) = a(3*(nd-1)+3)
128 ! Recopy AR, just in case
129 user_ar(3*(i-1)+1) = ar(3*(nd-1)+1)
130 user_ar(3*(i-1)+2) = ar(3*(nd-1)+2)
131 user_ar(3*(i-1)+3) = ar(3*(nd-1)+3)
132 ENDDO
133
134 CALL eng_userlib_userwi(
135 1 rad_inputname ,len_rad_inputname ,
136 2 user_windows%NUVAR ,nuvari ,user_windows%N_USERNODS ,
137 3 ncycle ,user_windows%S_WA ,user_windows%IUSER ,user_itab ,tt ,
138 4 dt1 ,dtu ,user_windows%USREINT ,wfext ,user_windows%USER,
139 5 user_d ,user_x ,user_v ,user_vr ,user_ms ,
140 6 user_in ,user_stifn ,user_stifr ,user_a ,user_ar ,
141 7 user_windows%WA )
142
143 DO i=1,user_windows%N_USERNODS
144 nd = user_windows%USERNODS(i)
145 ! Recopy back A
146 a(3*(nd-1)+1) = user_a(3*(i-1)+1)
147 a(3*(nd-1)+2) = user_a(3*(i-1)+2)
148 a(3*(nd-1)+3) = user_a(3*(i-1)+3)
149 ! Recopy back AR
150 ar(3*(nd-1)+1) = user_ar(3*(i-1)+1)
151 ar(3*(nd-1)+2) = user_ar(3*(i-1)+2)
152 ar(3*(nd-1)+3) = user_ar(3*(i-1)+3)
153 ENDDO
154
155 DEALLOCATE(user_itab)
156 DEALLOCATE(user_d)
157 DEALLOCATE(user_x)
158 DEALLOCATE(user_v)
159 DEALLOCATE(user_vr)
160 DEALLOCATE(user_ms)
161 DEALLOCATE(user_in)
162 DEALLOCATE(user_stifn)
163 DEALLOCATE(user_stifr)
164 DEALLOCATE(user_a)
165 DEALLOCATE(user_ar)
166
167
168 dt2 = min(dt2,dtu)
169 ELSE
170 ! ----------------
171 ! ERROR to be printed & exit
172 option='USER WINDOWS'
173 size_opt=len_trim(option)
174 CALL ancmsg(msgid=257,c1=option(1:size_opt),anmode=aninfo)
175 CALL arret(2)
176 ! ----------------
177 ENDIF
178 ENDIF
179
180 IF(nspmd> 1)THEN
181 CALL spmd_exch_userwi(a,ar,user_windows)
182 ENDIF
183C-----------------------------------------------
184 END
185C-----------------------------------------------
186
#define my_real
Definition cppsort.cpp:32
#define min(a, b)
Definition macros.h:20
subroutine resol(timers, element, nodes, coupling, af, iaf, iskwn, neth, ipart, nom_opt, kxx, ixx, ixtg, ixs, ixq, ixt, ixp, ixr, ifill, mat_elem, ims, npc, ibcl, ibfv, idum, las, laccelm, nnlink, lnlink, iparg, dd_iad, igrv, iexlnk, kinet, ipari, nprw, iconx, npby, lpby, lrivet, nstrf, ljoint, nodpor, monvol, ilink, llink, linale, neflsw, nnflsw, icut, cluster, itask, inoise, thke, damp, pm, skews, geo, eani, bufmat, bufgeo, bufsf, w, veul, fill, dfill, alph, wb, dsave, asave, msnf, tf, forc, vel, fsav, fzero, xlas, accelm, agrv, fr_wave, failwave, parts0, elbuf, rwbuf, sensors, rwsav, rby, rivet, secbuf, volmon, lambda, wa, fv, partsav, uwa, val2, phi, segvar, r, crflsw, flsw, fani, xcut, anin, tani, secfcum, bufnois, idata, rdata, iframe, kxsp, ixsp, nod2sp, ispsym, ispcond, xframe, spbuf, xspsym, vspsym, pv, fsavd, ibvel, lbvel, wasph, w16, isphio, lprtsph, lonfsph, vsphio, fbvel, lagbuf, ibcslag, iactiv, dampr, gjbufi, gjbufr, rbmpc, ibmpc, sphveln, nbrcvois, nbsdvois, lnrcvois, lnsdvois, nercvois, nesdvois, lercvois, lesdvois, npsegcom, lsegcom, nporgeo, ixtg1, npbyl, lpbyl, rbyl, igeo, ipm, madprt, madsh4, madsh3, madsol, madnod, madfail, iad_rby, fr_rby, fr_wall, iad_rby2, fr_rby2, iad_i2m, fr_i2m, addcni2, procni2, iadi2, fr_mv, iadmv2, fr_ll, fr_rl, iadcj, fr_cj, fr_sec, iad_sec, iad_cut, fr_cut, rg_cut, newfront, fr_mad, fxbipm, fxbrpm, fxbnod, fxbmod, fxbglm, fxbcpm, fxbcps, fxblm, fxbfls, fxbdls, fxbdep, fxbvit, fxbacc, fxbelm, fxbsig, fxbgrvi, fxbgrvr, eigipm, eigibuf, eigrpm, lnodpor, fr_i18, graphe, iflow, rflow, lgrav, dd_r2r, fasolfr, fr_lagf, llagf, lprw, icontact, rcontact, sh4tree, sh3tree, ipadmesh, padmesh, msc, mstg, inc, intg, ptg, iskwp, nskwp, isensp, nsensp, iaccp, naccp, ipart_state, acontact, pcontact, factiv, sh4trim, sh3trim, mscnd, incnd, ibfflux, fbfflux, rbym, irbym, lnrbym, icodrbym, ibcv, fconv, ibftemp, fbftemp, iad_rbym, fr_rbym, weight_rm, ms_ply, zi_ply, inod_pxfem, iel_pxfem, iadc_pxfem, adsky_pxfem, icode_ply, icodt_ply, iskew_ply, admsms, madclnod, nom_sect, mcpc, mcptg, dmelc, dmeltg, mssa, dmels, mstr, dmeltr, msp, dmelp, msrt, dmelrt, ibcr, fradia, res_sms, table, irbe2, lrbe2, iad_rbe2, fr_rbe2, phie, msf, procne_pxfem, iadsdp_pxfem, iadrcp_pxfem, icfield, lcfield, cfield, msz2, diag_sms, iloadp, lloadp, loadp, inod_crk, iel_crk, iadc_crk, adsky_crk, cne_crk, procne_crk, iadsdp_crk, iadrcp_crk, ibufssg_io, ibc_ply, dmint2, ibordnode, elbuf_tab, por, nodedge, iad_edge, fr_edge, fr_nbedge, crknodiad, lgauge, gauge, igaup, ngaup, nodlevxf, dd_r2r_elem, nodglobxfe, sph2sol, sol2sph, irst, dmsph, wagap, xfem_tab, elcutc, nodenr, kxfenod2elc, enrtag, rthbu f, kxig3d, ixig3d, knot, wige, wsmcomp, stack, cputime_mp_glob, cputime_mp, tab_ump, poin_ump, sol2sph_typ, irunn_bis, addcsrect, iad_frnor, fr_nor, procnor, iad_fredg, fr_edg, drape_sh4n, drape_sh3n, tab_mat, nativ0_sms, multi_fvm, segquadfr, ms_2d, h3d_data, subsets, igrnod, igrbric, igrquad, igrsh4n, igrsh3n, igrtruss, igrbeam, igrspring, igrpart, igrsurf, forneqs, nloc_dmg, iskwp_l, knotlocpc, knotlocel, pinch_data, tag_skins6, ale_connectivity, xcell, xface, ne_nercvois, ne_nesdvois, ne_lercvois, ne_lesdvois, ibcscyc, lbcscyc, t_monvol, id_global_vois, face_vois, dynain_data, fcont_max, ebcs_tab, diffusion, kloadpinter, loadpinter, dgaploadint, drapeg, user_windows, output, interfaces, dt, loads, python, dpl0cld, vel0cld, ndamp_vrel, id_damp_vrel, fr_damp_vrel, ndamp_vrel_rbyg, names_and_titles, unitab, liflow, lrflow, glob_therm, pblast, rbe3)
Definition resol.F:633
subroutine spmd_exch_userwi(a, ar, user_windows)
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 user_windows_routine(ispmd, nspmd, userl_avail, user_windows, rad_inputname, len_rad_inputname, numnod, ncycle, itab, tt, dt1, wfext, d, x, v, vr, ms, in, stifn, stifr, a, ar, dt2)