21INTEGER (KIND=c_int) FUNCTION g_of_r_fft (NDR, DTR, MMX) bind (c,name='g_of_r_fft_')
27INTEGER (KIND=c_int),
INTENT(IN) :: ndr
28real(kind=c_double),
INTENT(IN) :: dtr, mmx
30 INTEGER FUNCTION recup_data (i, j)
31 INTEGER,
INTENT(IN) ::
i,
j
33 LOGICAL FUNCTION grbt(GrToBT, NDTR)
35 INTEGER,
INTENT(IN) :: ndtr
36 DOUBLE PRECISION,
DIMENSION(NDTR,NSP,NSP),
INTENT(IN) :: grtobt
43if (
allocated(gfft))
deallocate(gfft)
44allocate(gfft(ndr), stat=err)
46 call show_error (
"Impossible to allocate memory"//char(0), &
47 "Function: g_of_r_fft"//char(0),
"Table: GFFT"//char(0))
51if (
allocated(dfft))
deallocate(dfft)
52allocate(dfft(ndr), stat=err)
54 call show_error (
"Impossible to allocate memory"//char(0), &
55 "Function: g_of_r_fft"//char(0),
"Table: DFFT"//char(0))
59if (
allocated(tdfft))
deallocate(tdfft)
60allocate(tdfft(ndr), stat=err)
62 call show_error (
"Impossible to allocate memory"//char(0), &
63 "Function: g_of_r_fft"//char(0),
"Table: TDFFT"//char(0))
68if (
allocated(r_pfft))
deallocate(r_pfft)
69allocate(r_pfft(ndr), stat=err)
71 call show_error (
"Impossible to allocate memory"//char(0), &
72 "Function: g_of_r_fft"//char(0),
"Table: R_PFFT"//char(0))
79 r_pfft(i)= 1.0 / (2.0*pi*pi*na/meanvol*(i-0.5)*dtr)
84if (recup_data(j, idsk) .ne. 1)
then
90if (recup_data(j, idsk) .ne. 1)
then
96 if (
allocated(gqbt))
deallocate(gqbt)
97 allocate(gqbt(ndr,nsp,nsp), stat=err)
99 call show_error (
"Impossible to allocate memory"//char(0), &
100 "Function: g_of_r_fft"//char(0),
"Table: GQBT"//char(0))
110 if (recup_data(j, idsk) .ne. 1)
then
118 if (
grbt(gqbt, ndr))
then
122 call save_curve (ndr, gfft, l, idgrfft)
127 call save_curve (ndr, gfft, l, idgrfft)
132 call save_curve (ndr, gfft, l, idgrfft)
134 if (
allocated(btij))
deallocate(btij)
141if (
allocated(gfft))
deallocate(gfft)
142if (
allocated(dfft))
deallocate(dfft)
143if (
allocated(tdfft))
deallocate(tdfft)
144if (
allocated(r_pfft))
deallocate(r_pfft)
145if (
allocated(gqbt))
deallocate(gqbt)
149INTEGER FUNCTION send_sq (IC, VAL, DTR, KDATA, SDATA)
155INTEGER,
INTENT(IN) :: ic, val
156DOUBLE PRECISION,
INTENT(IN) :: dtr
157DOUBLE PRECISION,
DIMENSION(VAL),
INTENT(IN) :: kdata, sdata
158DOUBLE PRECISION :: suml
231INTEGER,
INTENT(IN) :: LTAB
232DOUBLE PRECISION,
DIMENSION(LTAB),
INTENT(IN) :: KTAB, TAB
233DOUBLE PRECISION,
DIMENSION(NUMBER_OF_I),
INTENT(INOUT) :: RTAB
238 phi = ktab(
k)*(
i-0.5)*dtr
239 rtab(
i) = rtab(
i) + ktab(
k)*(tab(
k) - 1.0)*sin(
phi)*(ktab(
k+1) - ktab(
k))
logical function grbt(grtobt, ndtr)
subroutine fft_to_gr(ltab, ktab, tab, rtab)
integer function send_sq(ic, val, dtr, kdata, sdata)
integer(kind=c_int) function g_of_r_fft(ndr, dtr, mmx)
void show_error(char *error, int val, GtkWidget *win)
show error message
double precision, dimension(:), allocatable nscattl
double precision, dimension(:), allocatable r_pfft
double precision, dimension(:), allocatable xi
integer, dimension(:), allocatable nbspbs
double precision, dimension(:), allocatable tdfft
double precision, dimension(:), allocatable xscattl
double precision, dimension(:), allocatable dfft
double precision, dimension(:), allocatable gfft
double precision, dimension(:,:,:), allocatable gqbt
double precision, parameter pi