OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
func2d_deintersect.F File Reference
#include "implicit_f.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine func2d_deintersect (npt, nfunc, yy)

Function/Subroutine Documentation

◆ func2d_deintersect()

subroutine func2d_deintersect ( integer, intent(in) npt,
integer, intent(in) nfunc,
intent(inout) yy )

Definition at line 28 of file func2d_deintersect.F.

29C-----------------------------------------------
30C I m p l i c i t T y p e s
31C-----------------------------------------------
32#include "implicit_f.inc"
33C-----------------------------------------------
34 INTEGER ,INTENT(IN) :: NPT
35 INTEGER ,INTENT(IN) :: NFUNC
36 my_real ,DIMENSION(NPT,NFUNC) ,INTENT(INOUT):: yy
37C-----------------------------------------------
38C L o c a l V a r i a b l e s
39C-----------------------------------------------
40 INTEGER :: IPT,IFUNC,I1,I2,J1,J2
41 my_real :: t1,t2,y1,y2,dy1,dy2
42 my_real ,DIMENSION(NPT) :: ytmp
43 my_real ,PARAMETER :: eps = 1.0e-1
44c-----------------------------------------------
45c Check and correct segment intersections between 2 functions with same abscissas
46c with respect to the second independent variable
47C=======================================================================
48 ytmp(:) = zero
49 IF (nfunc > 1) THEN
50 DO ifunc = 2,nfunc
51 j1 = ifunc - 1
52 j2 = ifunc
53 ytmp(1) = yy(1,j2)
54 DO ipt = 2,npt
55 i1 = ipt - 1
56 i2 = ipt
57c
58 t1 = yy(i1,j1)
59 y1 = yy(i1,j2)
60 t2 = yy(i2,j1)
61 y2 = yy(i2,j2)
62 dy1 = y1 - t1
63 dy2 = y2 - t2
64 IF (dy1*dy2 < 0) THEN
65 ! segment intersection, needs correction
66 y2 = t2 *(one + eps)
67 yy(i2,j2) = y2
68 ENDIF
69 ytmp(ipt) = y2
70 END DO
71 yy(1:npt,j2) = ytmp(1:npt)
72 END DO
73 END IF
74c-----------
75 RETURN
#define my_real
Definition cppsort.cpp:32