OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
peveci.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!|| peveci ../starter/source/elements/beam/peveci.F
25!||--- called by ------------------------------------------------------
26!|| pinit3 ../starter/source/elements/beam/pinit3.F
27!||====================================================================
28 SUBROUTINE peveci(RLOC, X1,X3,Y1,Y3,Z1,Z3,X2,Y2,Z2,NC2,NC3,
29 . IVECT,VECT)
30C-----------------------------------------------
31C I m p l i c i t T y p e s
32C-----------------------------------------------
33#include "implicit_f.inc"
34C-----------------------------------------------
35C G l o b a l P a r a m e t e r s
36C-----------------------------------------------
37#include "mvsiz_p.inc"
38C-----------------------------------------------
39C D u m m y A r g u m e n t s
40C-----------------------------------------------
41 INTEGER , DIMENSION(MVSIZ), INTENT(IN) :: NC2,NC3,IVECT
42 my_real , DIMENSION(MVSIZ), INTENT(IN) :: x2,y2,z2
43 my_real , INTENT(IN) :: vect(3,mvsiz)
44
45C REAL
47 . rloc(3,*),
48 . x1(mvsiz), x3(mvsiz),
49 . y1(mvsiz), y3(mvsiz),
50 . z1(mvsiz), z3(mvsiz),
51 . e2x(mvsiz), e2y(mvsiz), e2z(mvsiz)
52C-----------------------------------------------
53C C o m m o n B l o c k s
54C-----------------------------------------------
55#include "vect01_c.inc"
56C-----------------------------------------------
57C L o c a l V a r i a b l e s
58C-----------------------------------------------
59 INTEGER I
61 . sum,e1x,e1y,e1z
62C---------------------------------------------------------------------
63 DO i=lft,llt
64 IF (ivect(i) > 0) THEN
65C Plane XY defined by input vector
66 e2x(i)=vect(1,i)
67 e2y(i)=vect(2,i)
68 e2z(i)=vect(3,i)
69 ELSEIF ((ivect(i) < 0).OR.(nc3(i)==nc2(i))) THEN
70C Input vector or N1-N3 colinear with beam axis - Y or Z global are used
71 e1x=x2(i)-x1(i)
72 e1y=y2(i)-y1(i)
73 e1z=z2(i)-z1(i)
74 sum = e1x*e1x + e1z*e1z
75 IF (sum < em20) THEN
76 e2x(i)=zero
77 e2y(i)=zero
78 e2z(i)=one
79 ELSE
80 e2x(i)=zero
81 e2y(i)=one
82 e2z(i)=zero
83 END IF
84 ELSE
85C Plane XY defined by N1-N3
86 e2x(i)=x3(i)-x1(i)
87 e2y(i)=y3(i)-y1(i)
88 e2z(i)=z3(i)-z1(i)
89C ERROR MESSAGE IN PCOORI
90 IF (sqrt(e2x(i)**2 + e2y(i)**2 + e2z(i)**2) < em20) RETURN
91 END IF
92 ENDDO
93C
94 DO i=lft,llt
95 IF (nc3(i)==nc2(i)) cycle
96 sum =sqrt(e2x(i)*e2x(i)+e2y(i)*e2y(i)+e2z(i)*e2z(i))
97 e2x(i)=e2x(i)/sum
98 e2y(i)=e2y(i)/sum
99 e2z(i)=e2z(i)/sum
100 ENDDO
101C
102 DO i=lft,llt
103 rloc(1,i)=e2x(i)
104 rloc(2,i)=e2y(i)
105 rloc(3,i)=e2z(i)
106 ENDDO
107C-----------
108 RETURN
109 END
#define my_real
Definition cppsort.cpp:32
subroutine peveci(rloc, x1, x3, y1, y3, z1, z3, x2, y2, z2, nc2, nc3, ivect, vect)
Definition peveci.F:30