OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
cutcnt.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!|| cutcnt ../engine/source/tools/sect/cutcnt.F
25!||--- called by ------------------------------------------------------
26!|| genani ../engine/source/output/anim/generate/genani.F
27!||--- uses -----------------------------------------------------
28!|| element_mod ../common_source/modules/elements/element_mod.F90
29!|| output_mod ../common_source/modules/output/output_mod.F90
30!||====================================================================
31 SUBROUTINE cutcnt(OUTPUT,ICUT,XCUT,IXS,XYZ0,D,LEN)
32C-----------------------------------------------
33C M o d u l e s
34C-----------------------------------------------
35 USE output_mod
36 use element_mod , only : nixs
37C------------------------------------------
38C NUMBERING CUT ELEMS
39C-----------------------------------------------
40C I m p l i c i t T y p e s
41C-----------------------------------------------
42#include "implicit_f.inc"
43C-----------------------------------------------
44C C o m m o n B l o c k s
45C-----------------------------------------------
46#include "com04_c.inc"
47#include "scrcut_c.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 type(output_), intent(inout) :: output
52 my_real xcut(7,*),xyz0(3,*),d(3,*)
53 INTEGER ICUT(44,*),IXS(NIXS,*),LEN
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57 INTEGER IC,I,J,K,ITYP
58 my_real dist,dist0,distmin,distmax,dd,dx1,dy1,dz1,dx2,dy2,dz2,vnx,vny,vnz,x,y,z
59C-----------------------------------------------
60C S o u r c e L i n e s
61C-----------------------------------------------
62 len=0
63 DO ic=1,ncuts
64 ityp=icut(1,ic)
65 IF(ityp==1)THEN
66 dd=output%DTANIM*xcut(7,ic)
67 xcut(1,ic)=xcut(1,ic)+dd*xcut(4,ic)
68 xcut(2,ic)=xcut(2,ic)+dd*xcut(5,ic)
69 xcut(3,ic)=xcut(3,ic)+dd*xcut(6,ic)
70 ELSEIF(ityp==3)THEN
71 xcut(1,ic)=xyz0(1,icut(2,ic))
72 xcut(2,ic)=xyz0(2,icut(2,ic))
73 xcut(3,ic)=xyz0(3,icut(2,ic))
74 dx1=xyz0(1,icut(3,ic))-xcut(1,ic)
75 dy1=xyz0(2,icut(3,ic))-xcut(2,ic)
76 dz1=xyz0(3,icut(3,ic))-xcut(3,ic)
77 dx2=xyz0(1,icut(4,ic))-xcut(1,ic)
78 dy2=xyz0(2,icut(4,ic))-xcut(2,ic)
79 dz2=xyz0(3,icut(4,ic))-xcut(3,ic)
80 vnx=dy1*dz2-dy2*dz1
81 vny=dz1*dx2-dz2*dx1
82 vnz=dx1*dy2-dx2*dy1
83 dd=sqrt(vnx**2+vny**2+vnz**2)
84 IF(dd>em10)THEN
85 xcut(4,ic)=vnx/dd
86 xcut(5,ic)=vny/dd
87 xcut(6,ic)=vnz/dd
88 ENDIF
89 ENDIF
90C
91 dist0=xcut(4,ic)*xcut(1,ic)+xcut(5,ic)*xcut(2,ic)+xcut(6,ic)*xcut(3,ic)
92 DO i=1,numels
93 distmin= ep30
94 distmax=-ep30
95 DO j=1,8
96 k=ixs(j+1,i)
97 x=xyz0(1,k)
98 y=xyz0(2,k)
99 z=xyz0(3,k)
100 IF(ityp==2)THEN
101 x=x-d(1,k)
102 y=y-d(2,k)
103 z=z-d(3,k)
104 ENDIF
105 dist=x*xcut(4,ic)+y*xcut(5,ic)+z*xcut(6,ic)-dist0
106 distmin=min(dist,distmin)
107 distmax=max(dist,distmax)
108 enddo!next J
109 IF(distmin*distmax<= zero)len=len+1
110 enddo!next I
111C
112 enddo!next IC
113 RETURN
114 END
#define my_real
Definition cppsort.cpp:32
subroutine cutcnt(output, icut, xcut, ixs, xyz0, d, len)
Definition cutcnt.F:32
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21