OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
agaug3q.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!|| agaug3q ../engine/source/ale/agaug3q.F
25!||--- called by ------------------------------------------------------
26!|| agauge ../engine/source/ale/agauge.F
27!||--- uses -----------------------------------------------------
28!|| ale_connectivity_mod ../common_source/modules/ale/ale_connectivity_mod.F
29!||====================================================================
30 SUBROUTINE agaug3q(LGAUGE,GAUGE,PHI,IXQ ,X ,ALE_CONNECT )
32C-----------------------------------------------
33C I m p l i c i t T y p e s
34C-----------------------------------------------
35#include "implicit_f.inc"
36#include "comlock.inc"
37C-----------------------------------------------
38C C o m m o n B l o c k s
39C-----------------------------------------------
40#include "com04_c.inc"
41#include "vect01_c.inc"
42#include "param_c.inc"
43#include "tabsiz_c.inc"
44C-----------------------------------------------
45C D u m m y A r g u m e n t s
46C-----------------------------------------------
47 INTEGER, INTENT(IN) :: IXQ(NIXQ,NUMELQ)
48 INTEGER, INTENT(INOUT) :: LGAUGE(3,NBGAUGE)
49 my_real, INTENT(IN) :: phi(sphi),x(3,numnod)
50 my_real, INTENT(INOUT) :: gauge(llgauge,nbgauge)
51 TYPE(t_ale_connectivity), INTENT(IN) :: ALE_CONNECT
52C-----------------------------------------------
53C L o c a l V a r i a b l e s
54C-----------------------------------------------
55 INTEGER I,II,J,N,IG,IAD2
56 my_real alpha,xg,yg,zg,
57 . det_12_1p,det_23_2p,det_34_3p,det_41_4p,
58 . y1,z1,y2,z2,y3,z3,y4,z4
59C-----------------------------------------------
60C S o u r c e L i n e s
61C-----------------------------------------------
62c--------------------------------------------------------------
63c Searching for the new element associated to the gauge
64c--------------------------------------------------------------
65 DO i=1,llt
66 ii=i+nft
67 iad2 = ale_connect%ee_connect%iad_connect(ii)
68 DO j=1,4
69 n= ale_connect%ee_connect%connected(iad2 + j - 1)
70 IF(n<=0)cycle
71 ig=nint(phi(n))
72 IF(ig==0)cycle
73
74C
75 xg = gauge(2,ig)
76 yg = gauge(3,ig)
77 zg = gauge(4,ig)
78C
79! check if gauge is changing of element
80 y1 = x(2,ixq(2,ii))
81 z1 = x(3,ixq(2,ii))
82 y2 = x(2,ixq(3,ii))
83 z2 = x(3,ixq(3,ii))
84 y3 = x(2,ixq(4,ii))
85 z3 = x(3,ixq(4,ii))
86 y4 = x(2,ixq(5,ii))
87 z4 = x(3,ixq(5,ii))
88
89 det_12_1p = (y2-y1)*(zg-z1)-(z2-z1)*(yg-y1)
90 det_23_2p = (y3-y2)*(zg-z2)-(z3-z2)*(yg-y2)
91 det_34_3p = (y4-y3)*(zg-z3)-(z4-z3)*(yg-y3)
92 det_41_4p = (y1-y4)*(zg-z4)-(z1-z4)*(yg-y4)
93
94 alpha = zero
95 IF ((det_12_1p >=0 .AND. det_23_2p >=0 .AND.
96 . det_34_3p >=0 .AND. det_41_4p >=0) .OR.
97 . (det_12_1p <=0 .AND. det_23_2p <=0 .AND.
98 . det_34_3p <=0 .AND. det_41_4p <=0)) alpha = one
99
100#include "lockon.inc"
101 IF(alpha == one .AND. alpha >= gauge(5,ig))THEN
102c the gauge is changing of element
103c element associated to the gauge
104 lgauge(1,ig)=-ii
105 gauge(5,ig)=alpha
106 ENDIF
107#include "lockoff.inc"
108 ENDDO
109 ENDDO
110
111
112 RETURN
113 END
subroutine agaug3q(lgauge, gauge, phi, ixq, x, ale_connect)
Definition agaug3q.F:31
#define my_real
Definition cppsort.cpp:32
#define alpha
Definition eval.h:35