OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
cr_spline_knots.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!|| cr_spline_knots ../common_source/tools/interpolation/cr_spline_knots.F
25!||--- called by ------------------------------------------------------
26!|| cr_spline_length ../common_source/tools/interpolation/cr_spline_length.F
27!|| cr_spline_point_proj ../common_source/tools/interpolation/cr_spline_point_proj.F
28!|| detcord ../starter/source/initial_conditions/detonation/detcord.F
29!||====================================================================
30 SUBROUTINE cr_spline_knots( PTS , KNOTS, ALPHA)
31C-----------------------------------------------
32C I m p l i c i t T y p e s
33C-----------------------------------------------
34#include "implicit_f.inc"
35C-----------------------------------------------
36C D e s c r i p t i o n
37C-----------------------------------------------
38 ! computes knots for solving 4-point spline path.
39 ! CATMULL-ROM PARAMETER
40 ! ALPHA = 0.0 : uniform
41 ! ALPHA = 0.5 : centripetal
42 ! ALPHA = 1.0 : chordal
43 ! INPUT - PTS(0:3,:) are 4 control points
44 ! INPUT - ALPHA CCR SPLINE PARAMETER
45 ! OUTPU - KNOTS() : t0,t1,t2,t3
46C-----------------------------------------------
47C D u m m y A r g u m e n t s
48C-----------------------------------------------
49 my_real, INTENT(IN) :: pts(0:3,3), alpha
50 my_real, INTENT(INOUT) :: knots(0:3)
51C-----------------------------------------------
52C L o c a l V a r i a b l e s
53C-----------------------------------------------
54 my_real :: x,y,z
55C-----------------------------------------------
56C S o u r c e L i n e s
57C-----------------------------------------------
58 knots(0)=0.0
59 x=pts(1-1,1)-pts(1,1)
60 y=pts(1-1,2)-pts(1,2)
61 z=pts(1-1,3)-pts(1,3)
62 knots(1)=knots(0)+ exp(alpha*log(sqrt(x*x+y*y+z*z)))
63 x=pts(1,1)-pts(1+1,1)
64 y=pts(1,2)-pts(1+1,2)
65 z=pts(1,3)-pts(1+1,3)
66 knots(2)=knots(1)+ exp(alpha*log(sqrt(x*x+y*y+z*z)))
67 x=pts(1+1,1)-pts(1+2,1)
68 y=pts(1+1,2)-pts(1+2,2)
69 z=pts(1+1,3)-pts(1+2,3)
70 knots(3)=knots(2)+ exp(alpha*log(sqrt(x*x+y*y+z*z)))
71 END SUBROUTINE cr_spline_knots
#define my_real
Definition cppsort.cpp:32
subroutine cr_spline_knots(pts, knots, alpha)
#define alpha
Definition eval.h:35