OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
shell_surface_buffer.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!|| shell_surface_buffer ../starter/source/model/sets/shell_surface_buffer.F
25!||--- called by ------------------------------------------------------
26!|| surface_buffer ../starter/source/model/sets/surface_buffer.F
27!||--- uses -----------------------------------------------------
28!||====================================================================
30 . IX ,NIX ,NIX1 ,NIX2 ,IELTYP,
31 . NSEG ,IAD_SURF ,OPT_O ,BUFTMPSURF,CLAUSE)
32C-----------------------------------------------
33C M o d u l e s
34C-----------------------------------------------
35 USE setdef_mod
36C-----------------------------------------------
37C I m p l i c i t T y p e s
38C-----------------------------------------------
39#include "implicit_f.inc"
40C-----------------------------------------------
41C D u m m y A r g u m e n t s
42C-----------------------------------------------
43 INTEGER NIX,NIX1,NIX2,IELTYP,NSEG,IAD_SURF,OPT_O
44 INTEGER IX(NIX,*),BUFTMPSURF(*)
45!
46 TYPE (SET_) :: CLAUSE
47C-----------------------------------------------
48C L o c a l V a r i a b l e s
49C-----------------------------------------------
50 INTEGER J,JJ,K,INV4(4),INV3(3),NODE(4),NELEM
51 DATA INV4/4,3,2,1/
52 DATA inv3/3,2,1/
53C=======================================================================
54! ! SURF segments
55 nelem = 0
56 IF (ieltyp == 3) nelem = clause%NB_SH4N
57 IF (ieltyp == 7) nelem = clause%NB_SH3N
58!
59 DO j=1,nelem
60 jj = -huge(jj)
61 IF(ieltyp==3) jj = clause%SH4N(j)
62 IF(ieltyp==7) jj = clause%SH3N(j)
63!
64 nseg=nseg+1
65!
66 IF ( opt_o == 0 ) THEN ! no normal reversed
67 DO k=nix1,nix2
68 node(k-1) = ix(k,jj)
69 ENDDO
70 ELSE ! reversed normal
71 IF (nix2-nix1 == 2) THEN ! SH3N (NOD4 == NOD3)
72 DO k=nix2,nix1,-1
73 node(inv4(k-1)-1) = ix(k,jj)
74 ENDDO
75 ELSE
76 DO k=nix2,nix1,-1
77 node(inv4(k-1)) = ix(k,jj)
78 ENDDO
79 ENDIF
80 ENDIF ! IF ( OPT_O == 0 )
81!
82 DO k=nix1,nix2
83 buftmpsurf(iad_surf) = node(k-1)
84 iad_surf=iad_surf+1
85 ENDDO
86!
87 IF (nix2-nix1 == 2) THEN ! SH3N (NOD4 == NOD3)
88 buftmpsurf(iad_surf) = buftmpsurf(iad_surf-1)
89 iad_surf=iad_surf+1
90 ENDIF
91!
92 buftmpsurf(iad_surf) = ieltyp
93 iad_surf=iad_surf+1
94 buftmpsurf(iad_surf) = jj
95 iad_surf=iad_surf+1
96 ENDDO ! DO J=1,NELEM
97C-----------
98 RETURN
99 END
subroutine shell_surface_buffer(ix, nix, nix1, nix2, ieltyp, nseg, iad_surf, opt_o, buftmpsurf, clause)