V3FIT
Main Page
Related Pages
Modules
Modules List
Module Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions/Subroutines
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
y
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Data Types List
Data Types List
Data Types
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
~
Functions/Subroutines
a
b
c
d
e
f
g
i
l
m
n
p
r
s
t
u
v
x
y
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Files
File List
File Members
All
b
c
g
i
l
m
n
p
t
v
w
Functions/Subroutines
b
c
g
i
m
p
t
v
w
Variables
Enumerations
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Macros
Pages
LIBSTELL
Sources
Miscel
legendre_to_power.f
1
SUBROUTINE
legendre_to_power(n, a_inv, b_inv, tc, ac)
2
USE
stel_kinds
3
IMPLICIT NONE
4
!-----------------------------------------------
5
! D u m m y A r g u m e n t s
6
!-----------------------------------------------
7
INTEGER
,
INTENT(IN)
:: n
8
REAL
(rprec),
DIMENSION(0:n)
,
INTENT(IN)
:: tc
9
REAL
(rprec),
DIMENSION(0:n)
,
INTENT(OUT)
:: ac
10
REAL
(rprec),
DIMENSION(0:n,0:n)
,
INTENT(IN)
:: a_inv, b_inv
11
!---------------------------------------------------------------------
12
INTEGER
:: i, j, k
13
!---------------------------------------------------------------------
14
! Given the following notation:
15
!
16
! AC == (ac(1), ...ac(n))==> vector of coefficients for
17
! power series in [0,1]
18
! TC == (tc(1), ...tc(n))==> vector of coefficients for
19
! Legendre series in [-1,1]
20
! THEN:
21
! AC = TC* A_INV * B_INV
22
!----------------------------------------------------------------------
23
DO
i = 0, n
24
ac(i) = 0
25
DO
j= 0, n
26
DO
k = 0, n
27
ac(i) = ac(i) + tc(j) * a_inv(j,k) * b_inv(k,i)
28
ENDDO
29
ENDDO
30
ENDDO
31
32
END SUBROUTINE
legendre_to_power
Generated on Thu Mar 5 2020 15:49:23 for V3FIT by
1.8.17