OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
mreploc.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!|| mreploc ../engine/source/materials/mat_share/mreploc.F
25!||--- called by ------------------------------------------------------
26!|| m25law ../engine/source/materials/mat/mat025/m25law.F
27!|| mmain ../engine/source/materials/mat_share/mmain.F90
28!|| mulaw ../engine/source/materials/mat_share/mulaw.F90
29!|| mulaw8 ../engine/source/materials/mat_share/mulaw8.F90
30!|| usermat_solid ../engine/source/materials/mat_share/usermat_solid.F
31!||====================================================================
32 SUBROUTINE mreploc(
33 1 ANG, R11, R12, R13,
34 2 R21, R22, R23, R31,
35 3 R32, R33, RX, RY,
36 4 RZ, SX, SY, SZ,
37 5 TX, TY, TZ, NEL,
38 6 JSPH)
39C-----------------------------------------------
40C I m p l i c i t T y p e s
41C-----------------------------------------------
42#include "implicit_f.inc"
43C-----------------------------------------------
44C G l o b a l P a r a m e t e r s
45C-----------------------------------------------
46#include "mvsiz_p.inc"
47C-----------------------------------------------
48C C o m m o n B l o c k s
49C-----------------------------------------------
50#include "com01_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER, INTENT(IN) :: NEL
55 INTEGER, INTENT(IN) :: JSPH
56 my_real ANG(MVSIZ,6),
57 .R11(MVSIZ),R12(MVSIZ),R13(MVSIZ),R21(MVSIZ),R22(MVSIZ),R23(MVSIZ),
58 .R31(MVSIZ),R32(MVSIZ),R33(MVSIZ),
59 . RX(MVSIZ) ,RY(MVSIZ) ,RZ(MVSIZ) ,
60 . sx(mvsiz) ,sy(mvsiz) ,sz(mvsiz) ,
61 . tx(mvsiz) ,ty(mvsiz) ,tz(mvsiz)
62C-----------------------------------------------
63C L o c a l V a r i a b l e s
64C-----------------------------------------------
65 INTEGER I,J
66 my_real
67 . S11, S12, S13, S21,
68 . S22, S23, S31,
69 . S32, S33, RR, RRD
70C
71
72 IF(jsph==0)THEN
73 IF(n2d==0)THEN
74 DO 100 i=1,nel
75 rr=max(sqrt(rx(i)**2+ry(i)**2+rz(i)**2),em20)
76 rx(i)=rx(i)/rr
77 ry(i)=ry(i)/rr
78 rz(i)=rz(i)/rr
79 100 CONTINUE
80C
81 DO 105 i=1,nel
82 tx(i)=ry(i)*sz(i)-rz(i)*sy(i)
83 ty(i)=rz(i)*sx(i)-rx(i)*sz(i)
84 tz(i)=rx(i)*sy(i)-ry(i)*sx(i)
85 rr=max(sqrt(tx(i)**2+ty(i)**2+tz(i)**2),em20)
86 tx(i)=tx(i)/rr
87 ty(i)=ty(i)/rr
88 tz(i)=tz(i)/rr
89 105 CONTINUE
90C
91 DO 110 i=1,nel
92 sx(i)=ty(i)*rz(i)-tz(i)*ry(i)
93 sy(i)=tz(i)*rx(i)-tx(i)*rz(i)
94 sz(i)=tx(i)*ry(i)-ty(i)*rx(i)
95 rr=max(sqrt(sx(i)**2+sy(i)**2+sz(i)**2),em20)
96 sx(i)=sx(i)/rr
97 sy(i)=sy(i)/rr
98 sz(i)=sz(i)/rr
99 110 CONTINUE
100 ELSE
101C---------------------------------------------
102C EN 2D LES CONTRAINTES SONT :
103C 1=YY 2=ZZ 3=TT 4=YZ 5=0 6=0
104C EN CONTRADICTION AVEC X=T
105C ATTENTION DANGER!
106C---------------------------------------------
107 DO 120 i=1,nel
108 rr= max(sqrt(sy(i)**2+sz(i)**2),em20)
109 rx(i)= sy(i)/rr
110 ry(i)= sz(i)/rr
111 rz(i)= zero
112 sx(i)=-ry(i)
113 sy(i)= rx(i)
114 sz(i)= zero
115 tx(i)= zero
116 ty(i)= zero
117 tz(i)= one
118 120 CONTINUE
119 ENDIF
120C
121 DO i=1,nel
122 s11=ang(i,1)
123 s21=ang(i,2)
124 s31=ang(i,3)
125 s12=ang(i,4)
126 s22=ang(i,5)
127 s32=ang(i,6)
128 s13=s21*s32-s31*s22
129 s23=s31*s12-s11*s32
130 s33=s11*s22-s21*s12
131C
132 r11(i) = s11*rx(i)+s21*sx(i)+s31*tx(i)
133 r21(i) = s11*ry(i)+s21*sy(i)+s31*ty(i)
134 r31(i) = s11*rz(i)+s21*sz(i)+s31*tz(i)
135C
136 r12(i) = s12*rx(i)+s22*sx(i)+s32*tx(i)
137 r22(i) = s12*ry(i)+s22*sy(i)+s32*ty(i)
138 r32(i) = s12*rz(i)+s22*sz(i)+s32*tz(i)
139C
140 r13(i) = s13*rx(i)+s23*sx(i)+s33*tx(i)
141 r23(i) = s13*ry(i)+s23*sy(i)+s33*ty(i)
142 r33(i) = s13*rz(i)+s23*sz(i)+s33*tz(i)
143 ENDDO
144C
145 ELSE
146C
147 DO i=1,nel
148 r11(i)=ang(i,1)
149 r21(i)=ang(i,2)
150 r31(i)=ang(i,3)
151 r12(i)=ang(i,4)
152 r22(i)=ang(i,5)
153 r32(i)=ang(i,6)
154 r13(i)=r21(i)*r32(i)-r31(i)*r22(i)
155 r23(i)=r31(i)*r12(i)-r11(i)*r32(i)
156 r33(i)=r11(i)*r22(i)-r21(i)*r12(i)
157 END DO
158C
159 END IF
160C
161 RETURN
162 END
#define max(a, b)
Definition macros.h:21
subroutine mreploc(ang, r11, r12, r13, r21, r22, r23, r31, r32, r33, rx, ry, rz, sx, sy, sz, tx, ty, tz, nel, jsph)
Definition mreploc.F:39