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

Go to the source code of this file.

Functions/Subroutines

subroutine unify_abscissa_2d (nfunc, len, lmax, npt, xi, xf)

Function/Subroutine Documentation

◆ unify_abscissa_2d()

subroutine unify_abscissa_2d ( integer, intent(in) nfunc,
integer, dimension(nfunc), intent(in) len,
integer, intent(in) lmax,
integer, intent(inout) npt,
intent(in) xi,
intent(out) xf )

Definition at line 30 of file unify_abscissas_2d.F.

31C-----------------------------------------------
32C D e s c r i p t i o n
33C-----------------------------------------------
34 ! create abscissa vector common to all input functions, in ascending order
35 ! and calculate new interpolated values of all functions
36c-------------------------------------------------------------
37 ! XI : INPUT - initial X coordinates of all functions
38 ! XF : OUTPUT - common abscissa coordinates
39 ! NPT : Input => Sum of all function point numbers
40 ! Output => Final length of common abscissa vector
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45C-----------------------------------------------
46C D u m m y A r g u m e n t s
47C-----------------------------------------------
48 INTEGER ,INTENT(IN) :: NFUNC ! number of input functions
49 INTEGER ,INTENT(IN) :: LMAX ! max X length in input
50 INTEGER ,INTENT(INOUT) :: NPT ! length of X vector
51 INTEGER ,DIMENSION(NFUNC) ,INTENT(IN) :: LEN ! NPTS by function
52 my_real ,DIMENSION(LMAX,NFUNC) ,INTENT(IN) :: xi ! initial abscissa coordinates
53 my_real ,DIMENSION(NPT) ,INTENT(OUT) :: xf ! output abscissa vector
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57 INTEGER :: I,LTOT,LL,IDX,IERROR
58 my_real :: x1,x2,xc,y1,y2,dx,dx1,deri
59 my_real ,DIMENSION(:) ,ALLOCATABLE :: xtmp
60 INTEGER, DIMENSION(:), ALLOCATABLE :: PERM
61c=======================================================================
62 ltot = npt
63 ALLOCATE (perm(ltot))
64 ALLOCATE (xtmp(ltot))
65 xf(:) = zero
66 xtmp(:) = zero
67 idx = 0
68 DO i = 1,nfunc
69 ll = len(i)
70 xtmp(idx+1:idx+ll) = xi(1:ll,i)
71 idx = idx + ll
72 END DO
73c
74 CALL myqsort(ltot,xtmp,perm,ierror)
75c
76c create common abscissa vector XF
77c
78 npt = 1
79 xf(1) = xtmp(1)
80 DO i = 2,ltot
81 IF (xtmp(i) > xf(npt)) THEN
82 npt = npt + 1
83 xf(npt) = xtmp(i)
84 END IF
85 END DO
86c
87 DEALLOCATE (xtmp)
88 DEALLOCATE (perm)
89c-----------
90 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine myqsort(n, a, perm, error)
Definition myqsort.F:51