OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i17crit.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/.
23Cas| I17MAIN_PENA /int17/i17main_pena.F
24!||====================================================================
25!|| i17crit ../engine/source/interfaces/int17/i17crit.F
26!||--- called by ------------------------------------------------------
27!|| i17main ../engine/source/interfaces/int17/i17main.F
28!|| i17main_crit_tri ../engine/source/interfaces/int17/i17main_pena.F
29!||--- calls -----------------------------------------------------
30!|| i16box ../engine/source/interfaces/int16/i16crit.F
31!|| i20box ../engine/source/interfaces/int16/i16crit.F
32!||--- uses -----------------------------------------------------
33!|| element_mod ../common_source/modules/elements/element_mod.F90
34!||====================================================================
35 SUBROUTINE i17crit(
36 1 X ,V ,A ,NELEM ,EMINX ,
37 2 NME ,ITASK ,XSAV ,IXS ,IXS16 ,
38 3 IXS20 ,XMSR_G ,SIZE_T_G)
39 use element_mod , only : nixs
40C-----------------------------------------------
41C I m p l i c i t T y p e s
42C-----------------------------------------------
43#include "implicit_f.inc"
44#include "comlock.inc"
45C-----------------------------------------------
46C G l o b a l P a r a m e t e r s
47C-----------------------------------------------
48#include "mvsiz_p.inc"
49C-----------------------------------------------
50C C o m m o n B l o c k s
51C-----------------------------------------------
52#include "com04_c.inc"
53#include "task_c.inc"
54C-----------------------------------------------
55C D u m m y A r g u m e n t s
56C-----------------------------------------------
57 INTEGER ITASK,NME,
58 . NELEM(*),IXS(NIXS,*),IXS16(8,*),IXS20(12,*)
59 my_real
60 . x(3,*),v(3,*),a(3,*),xsav(3,*),eminx(6,*),
61 . xmsr_g(6),size_t_g
62C-----------------------------------------------
63C L o c a l V a r i a b l e s
64C-----------------------------------------------
65 INTEGER NMEF,NMEL,I,I16,I20,LFT16,LLT16,
66 . LFT20,LLT20,INDEX16(MVSIZ),INDEX20(MVSIZ)
67 my_real
68 . xmsr(6), size_t
69C-----------------------------------------------
70C S o u r c e L i n e s
71C-----------------------------------------------
72 nmef = 1 + itask*nme / nthread
73 nmel = (itask+1)*nme / nthread
74C--------------------------------------------------------------
75C 0- criterion calculation to know if sorting is needed
76C--------------------------------------------------------------
77 xmsr(1) = -ep30
78 xmsr(2) = -ep30
79 xmsr(3) = -ep30
80 xmsr(4) = ep30
81 xmsr(5) = ep30
82 xmsr(6) = ep30
83 size_t = zero
84C------------------------------------
85C calculation of element bounds
86C------------------------------------
87 DO i=nmef,nmel
88 eminx(1,i) = ep30
89 eminx(2,i) = ep30
90 eminx(3,i) = ep30
91 eminx(4,i) = -ep30
92 eminx(5,i) = -ep30
93 eminx(6,i) = -ep30
94 ENDDO
95C
96 lft16=1
97 llt16=0
98 lft20=1
99 llt20=0
100 DO i=nmef,nmel
101 i20=nelem(i)-numels8-numels10
102 i16=i20-numels20
103 IF(i16>=1.AND.i16<=numels16)THEN
104 llt16=llt16+1
105 index16(llt16)=i
106 IF(llt16==mvsiz-1)THEN
107 CALL i16box(
108 1 lft16,llt16 ,nelem,eminx,nmef ,nmel ,
109 2 x ,v ,a ,ixs ,ixs16,size_t,
110 3 xmsr ,index16,xsav )
111 llt16=0
112 ENDIF
113 ELSEIF(i20>=1.AND.i20<=numels20)THEN
114 llt20=llt20+1
115 index20(llt20)=i
116 IF(llt20==mvsiz-1)THEN
117 CALL i20box(
118 1 lft20,llt20 ,nelem,eminx,nmef ,nmel ,
119 2 x ,v ,a ,ixs ,ixs20,size_t,
120 3 xmsr ,index20,xsav )
121 llt20=0
122 ENDIF
123 ENDIF
124 END DO
125 IF(llt16>0)CALL i16box(
126 1 lft16,llt16 ,nelem,eminx,nmef ,nmel ,
127 2 x ,v ,a ,ixs ,ixs16,size_t,
128 3 xmsr ,index16,xsav )
129 IF(llt20>0)CALL i20box(
130 1 lft20,llt20 ,nelem,eminx,nmef ,nmel ,
131 2 x ,v ,a ,ixs ,ixs20,size_t,
132 3 xmsr ,index20,xsav )
133C
134#include "lockon.inc"
135 xmsr_g(1)=max(xmsr_g(1),xmsr(1))
136 xmsr_g(2)=max(xmsr_g(2),xmsr(2))
137 xmsr_g(3)=max(xmsr_g(3),xmsr(3))
138 xmsr_g(4)=min(xmsr_g(4),xmsr(4))
139 xmsr_g(5)=min(xmsr_g(5),xmsr(5))
140 xmsr_g(6)=min(xmsr_g(6),xmsr(6))
141 size_t_g = size_t_g + size_t
142#include "lockoff.inc"
143C
144 RETURN
145 END
subroutine i16box(lft, llt, nelem, eminx, nmef, nmel, x, v, a, ixs, ixs16, size, xmsr, index, xsav)
Definition i16crit.F:230
subroutine i20box(lft, llt, nelem, eminx, nmef, nmel, x, v, a, ixs, ixs20, size, xmsr, index, xsav)
Definition i16crit.F:538
subroutine i17crit(x, v, a, nelem, eminx, nme, itask, xsav, ixs, ixs16, ixs20, xmsr_g, size_t_g)
Definition i17crit.F:39
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21