OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
s4alesfem.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!|| s4alesfem ../engine/source/elements/solid/solide4_sfem/s4alesfem.F
25!||--- called by ------------------------------------------------------
26!|| alemain ../engine/source/ale/alemain.F
27!||--- calls -----------------------------------------------------
28!|| foat_to_6_float ../engine/source/system/parit.F
29!|| initbuf ../engine/share/resol/initbuf.F
30!|| s4volnod3 ../engine/source/elements/solid/solide4_sfem/s4volnod3.F
31!|| spmd_exch_vol ../engine/source/mpi/nodes/spmd_exch_vol.F
32!||--- uses -----------------------------------------------------
33!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
34!|| element_mod ../common_source/modules/elements/element_mod.F90
35!|| initbuf_mod ../engine/share/resol/initbuf.F
36!||====================================================================
37 SUBROUTINE s4alesfem(IPARG,IXS,X,ELBUF_TAB,SFEM_NODVAR, S_SFEM_NODVAR,PM,
38 . IAD_ELEM,FR_ELEM)
39C-----------------------------------------------
40C M o d u l e s
41C-----------------------------------------------
42 USE initbuf_mod
43 USE elbufdef_mod
44 use element_mod , only : nixs
45C-----------------------------------------------
46C I m p l i c i t T y p e s
47C-----------------------------------------------
48#include "implicit_f.inc"
49C-----------------------------------------------
50C G l o b a l P a r a m e t e r s
51C-----------------------------------------------
52#include "mvsiz_p.inc"
53#include "param_c.inc"
54C-----------------------------------------------
55C C o m m o n B l o c k s
56C-----------------------------------------------
57#include "com01_c.inc"
58#include "com04_c.inc"
59#include "vect01_c.inc"
60C-----------------------------------------------
61C D u m m y A r g u m e n t s
62C-----------------------------------------------
63 INTEGER,INTENT(IN) :: S_SFEM_NODVAR
64 INTEGER IXS(NIXS,*),IPARG(NPARG,*),IAD_ELEM(2,*),FR_ELEM(*)
65 my_real x(*),sfem_nodvar(s_sfem_nodvar),pm(npropm,*)
66 TYPE (ELBUF_STRUCT_), TARGET, DIMENSION(NGROUP) :: ELBUF_TAB
67C-----------------------------------------------
68C L o c a l V a r i a b l e s
69C-----------------------------------------------
70 INTEGER NG, I, J, I1, I2, I3, I4, K, LENR,NEL
71 INTEGER NC1(MVSIZ),NC2(MVSIZ),NC3(MVSIZ),NC4(MVSIZ)
72 INTEGER MAT(MVSIZ)
73 my_real mass(mvsiz)
74
75 DOUBLE PRECISION VARNOD6(6,2*NUMNOD), MASS6(6,MVSIZ)
76C
77 TYPE(g_bufel_) ,POINTER :: GBUF
78C
79 sfem_nodvar(1:2*numnod) = zero
80 varnod6(1:6,1:2*numnod) = zero
81 mass(1:mvsiz) = zero
82 mass6(1:6,1:mvsiz) = zero
83C----------------------------------------------------
84C COMPUTE NODAL VOLUME & MASS FOR ALL TETRAHEDRON
85C----------------------------------------------------
86C SMP dynamic parallel loop
87C
88 DO ng = 1,ngroup
89 IF(iparg(8, ng)==1) cycle
90 IF(iparg(28,ng)/=4) cycle
91 CALL initbuf(iparg ,ng ,
92 2 mtn ,llt ,nft ,iad ,ity ,
93 3 npt ,jale ,ismstr ,jeul ,jtur ,
94 4 jthe ,jlag ,jmult ,jhbe ,jivf ,
95 5 nvaux ,jpor ,jcvt ,jclose ,jplasol ,
96 6 irep ,iint ,igtyp ,israt ,isrot ,
97 7 icsen ,isorth ,isorthg ,ifailure,jsms )
98C
99 IF(jeul == 1) cycle
100 IF(jlag == 1) cycle
101 IF(isrot <= 2) cycle
102 lft=1
103 nel = llt
104C
105 DO i=lft,llt
106 j=i+nft
107 mat(i)=ixs(1,j)
108 nc1(i)=ixs(2,j)
109 nc2(i)=ixs(4,j)
110 nc3(i)=ixs(7,j)
111 nc4(i)=ixs(6,j)
112 ENDDO
113C
114 gbuf => elbuf_tab(ng)%GBUF
115 IF(isrot == 3) THEN
116 CALL s4volnod3(
117 1 varnod6, x, nc1, nc2,
118 2 nc3, nc4, gbuf%OFF, gbuf%SMSTR,
119 3 nel, ismstr)
120 DO i=lft,llt
121 mass(i)=gbuf%RHO(i)/pm(1,mat(i))
122 ENDDO
123 !Parith-On treatment
124 CALL foat_to_6_float(lft ,llt ,mass ,mass6 )
125 DO i=lft,llt
126 i1=nc1(i)+numnod
127 i2=nc2(i)+numnod
128 i3=nc3(i)+numnod
129 i4=nc4(i)+numnod
130 !Parith-On treatment
131 DO k=1,6
132 varnod6(k,i1) = varnod6(k,i1) + mass6(k,i)
133 varnod6(k,i2) = varnod6(k,i2) + mass6(k,i)
134 varnod6(k,i3) = varnod6(k,i3) + mass6(k,i)
135 varnod6(k,i4) = varnod6(k,i4) + mass6(k,i)
136 ENDDO
137 ENDDO
138 ENDIF !ISROT=3
139
140 ENDDO !DO=1,NG
141
142c EXCHANGE
143 IF(nspmd > 1)THEN
144 lenr = 2*(iad_elem(1,nspmd+1)-iad_elem(1,1))
145 CALL spmd_exch_vol(varnod6(1,1),varnod6(1,numnod+1),iad_elem,
146 . fr_elem, lenr )
147 ENDIF
148
149C Routine assembly PARITH/ON
150 DO i=1,numnod
151
152 j=i+numnod
153 DO k=1,6
154 !VOLNOD
155 sfem_nodvar(i) = sfem_nodvar(i) + varnod6(k,i)
156 !SFEM_NODVAR
157 sfem_nodvar(i+numnod) = sfem_nodvar(i+numnod) + varnod6(k,i+numnod)
158 ENDDO
159
160 !RHO0/RHO -> SFEM_NODVAR
161 IF(sfem_nodvar(j) /= 0)THEN
162 sfem_nodvar(i)=sfem_nodvar(i)/sfem_nodvar(j)
163 ENDIF
164 ENDDO
165C
166 RETURN
167 END
#define my_real
Definition cppsort.cpp:32
subroutine initbuf(iparg, ng, mtn, llt, nft, iad, ity, npt, jale, ismstr, jeul, jtur, jthe, jlag, jmult, jhbe, jivf, mid, jpor, jcvt, jclose, jpla, irep, iint, igtyp, israt, isrot, icsen, isorth, isorthg, ifailure, jsms)
Definition initbuf.F:261
subroutine foat_to_6_float(jft, jlt, f, f6)
Definition parit.F:226
subroutine s4alesfem(iparg, ixs, x, elbuf_tab, sfem_nodvar, s_sfem_nodvar, pm, iad_elem, fr_elem)
Definition s4alesfem.F:39
subroutine s4volnod3(volnod6, x, nc1, nc2, nc3, nc4, offg, xdp, nel, ismstr)
Definition s4volnod3.F:35
subroutine spmd_exch_vol(volnod6, varnod6, iad_elem, fr_elem, lenr)