OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
func2d_deintersect.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!|| func2d_deintersect ../starter/source/materials/tools/func2d_deintersect.F
25!||--- called by ------------------------------------------------------
26!|| law70_table ../starter/source/materials/mat/mat070/law70_table.F
27!||====================================================================
28 SUBROUTINE func2d_deintersect(NPT, NFUNC ,YY )
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
76 END
#define my_real
Definition cppsort.cpp:32
subroutine func2d_deintersect(npt, nfunc, yy)