OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
onebasisfun.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!|| onebasisfun ../starter/source/elements/ige3d/onebasisfun.F
25!||--- called by ------------------------------------------------------
26!|| ig3donebasis ../starter/source/elements/ige3d/ig3donebasis.F
27!||====================================================================
28 SUBROUTINE onebasisfun(IDXII, IDXI, PXI, XI, KXI, DERS1)
29C--------------------------------------------------------------------------------------------------------
30C
31C This subroutine calculates B-spline function
32C Assembling B spline functions for NURBS is outside this subroutine
33C
34C--------------------------------------------------------------------------------------------------------
35C VAR | SIZE | TYP | RW | DEFINITION
36C--------------------------------------------------------------------------------------------------------
37C IDXI | 1 | I | R | ELEMENT INDEX IN KNOT VECTOR IN XI DIRECTION
38C PXI | 1 | I | R | POLYNOMIAL INTERPOLATION DEGREE IN XI DIRECTION
39C XI | 1 | F | R | COUNTER PARAMETER VALUE (WHERE THE FUNCTION AND DERIVATIVE ARE CALCULATED)
40C--------------------------------------------------------------------------------------------------------
41C KXI | NKXI | F | R | (FULL) KNOT VECTOR IN XI DIRECTION FOR THE CURRENT PATCH (GROUP)
42C--------------------------------------------------------------------------------------------------------
43C DERS1 | PXI+1 | F | W | INTERPOLATION FUNCTION
44C DERS2 | PXI+1 | F | W | DERIVATIVE OF INTERPOLATION FUNCTION
45C--------------------------------------------------------------------------------------------------------
46C Implicite Types
47C--------------------------------------------------------------------------------------------------------
48#include "implicit_f.inc"
49C--------------------------------------------------------------------------------------------------------
50C Dummy Arguments
51C--------------------------------------------------------------------------------------------------------
52 INTEGER :: PXI, IDXI, IDXII
53 my_real, INTENT(IN) :: xi
54 my_real, DIMENSION(*), INTENT(IN) :: kxi
55 my_real :: ders1
56C--------------------------------------------------------------------------------------------------------
57C Local variables
58C--------------------------------------------------------------------------------------------------------
59 INTEGER :: J, K
60 my_real :: saved, temp, aleft, right
61 my_real, DIMENSION(PXI+1,PXI+1) :: andu
62
63 andu(:,:)=zero
64 andu(idxii,1)=one
65
66c DO J=0,PXI
67c IF ((XI>=KXI(IDXI+J)).AND.(XI<KXI(IDXI+J+1))) THEN
68c ANDU(J+1,1) = ONE
69c ELSE
70c ANDU(J+1,1) = ZERO
71c ENDIF
72c ENDDO
73
74 DO k=1,pxi
75 IF (andu(1,k) == 0) THEN
76 saved = zero
77 ELSE
78 saved = ((xi-kxi(idxi))*andu(1,k))/(kxi(idxi+k)-kxi(idxi))
79 ENDIF
80 DO j=0,pxi-k
81 aleft = kxi(idxi+j+1)
82 right = kxi(idxi+j+k+1)
83 IF (andu(j+2,k) == 0) THEN
84 andu(j+1,k+1) = saved
85 saved = zero
86 ELSE
87 temp = andu(j+2,k)/(right-aleft)
88 andu(j+1,k+1) = saved+(right-xi)*temp
89 saved = (xi-aleft)*temp
90 ENDIF
91 ENDDO
92 ENDDO
93
94 ders1 = andu(1,pxi+1)
95
96 RETURN
97 END
#define my_real
Definition cppsort.cpp:32
subroutine onebasisfun(idxii, idxi, pxi, xi, kxi, ders1)
Definition onebasisfun.F:29