21INTEGER (KIND=c_int) FUNCTION s_of_k (NQ, XA) bind (C,NAME='s_of_k_')
33INTEGER (KIND=c_int),
INTENT(IN) :: nq, xa
34DOUBLE PRECISION :: factor, xfactor
36if(
allocated(
sij))
deallocate(
sij)
39 call show_error (
"Impossible to allocate memory"//char(0), &
40 "Function: s_of_k"//char(0),
"Table: Sij"//char(0))
46if(
allocated(
cij))
deallocate(
cij)
49 call show_error (
"Impossible to allocate memory"//char(0), &
50 "Function: s_of_k"//char(0),
"Table: cij"//char(0))
54if(
allocated(
sik))
deallocate(
sik)
57 call show_error (
"Impossible to allocate memory"//char(0), &
58 "Function: s_of_k"//char(0),
"Table: sik"//char(0))
65call fourier_trans_qvect ()
72if (
allocated(
cij))
deallocate(
cij)
73if (
allocated(
sik))
deallocate(
sik)
79if(
allocated(
s))
deallocate(
s)
80allocate(
s(nq), stat=
err)
82 call show_error (
"Impossible to allocate memory"//char(0), &
83 "Function: s_of_k"//char(0),
"Table: S"//char(0))
87if(
allocated(
xs))
deallocate(
xs)
88allocate(
xs(nq), stat=
err)
90 call show_error (
"Impossible to allocate memory"//char(0), &
91 "Function: s_of_k"//char(0),
"Table: XS"//char(0))
142if (
allocated(
cij))
deallocate(
cij)
143if (
allocated(
sik))
deallocate(
sik)
147if (
allocated(
modq))
deallocate(
modq)
154if (
allocated(
sij))
deallocate(
sij)
155if (
allocated(
s))
deallocate(
s)
156if (
allocated(
xs))
deallocate(
xs)
173 DOUBLE PRECISION :: qx, qy, qz, qtr, sini, cosi
176 INTEGER,
INTENT(IN) :: NUMTH
234SUBROUTINE fourier_trans_qvect ()
242 DOUBLE PRECISION :: qx, qy, qz, qtr, sini, cosi
244 numth = omp_get_max_threads()
295DOUBLE PRECISION FUNCTION fqx(TA, Q)
299INTEGER,
INTENT(IN) :: TA
300DOUBLE PRECISION,
INTENT(IN) :: Q
301DOUBLE PRECISION :: SINLA
302DOUBLE PRECISION,
PARAMETER :: PI=acos(-1.0)
313fqx =
a1(ta)*exp(-
b1(ta)*sinla) &
314 +
a2(ta)*exp(-
b2(ta)*sinla) &
315 +
a3(ta)*exp(-
b3(ta)*sinla) &
316 +
a4(ta)*exp(-
b4(ta)*sinla) + c(ta)
320INTEGER FUNCTION sk_save()
325DOUBLE PRECISION,
DIMENSION (:),
ALLOCATABLE :: SQTAB
328 LOGICAL FUNCTION fzbt (NDQ)
329 INTEGER,
INTENT(IN) :: NDQ
335 if (
s(
j) .ne. 0.0)
i=
i+1
341 if (
allocated(sqtab))
deallocate(sqtab)
342 allocate(sqtab(nsq), stat=
err)
344 call show_error (
"Impossible to allocate memory"//char(0), &
345 "Function: SK_SAVE"//char(0),
"Table: SQTAB"//char(0))
352 if (
k.eq.1 .or.
s(
k).ne.0.0)
then
357 call save_xsk (nsq, sqtab)
361 if (
k.eq.1 .or.
s(
k).ne.0.0)
then
366 call save_curve (nsq, sqtab, 0,
idsk)
370 if (
k.eq.1 .or.
s(
k).ne.0.0)
then
375 call save_curve (nsq, sqtab, 2,
idsk)
379 if (
k.eq.1 .or.
s(
k).ne.0.0)
then
384 call save_curve (nsq, sqtab, 4,
idsk)
388 if (
k.eq.1 .or.
s(
k).ne.0.0)
then
393 call save_curve (nsq, sqtab, 6,
idsk)
400 if (
k.eq.1 .or.
s(
k).ne.0.0)
then
405 call save_curve (nsq, sqtab,
l,
idsk)
411 if (.not.
fzbt(nq))
then
420 if (
k.eq.1 .or.
s(
k).ne.0.0)
then
425 call save_curve (nsq, sqtab,
l,
idsk)
433 if (
j.eq.1 .or.
s(
j).ne.0.0)
then
438 call save_curve (nsq, sqtab,
l,
idsk)
450if (
nsp.eq.2 .and.
allocated(
btij))
deallocate(
btij)
451if (
allocated(sqtab))
deallocate(sqtab)
457INTEGER (KIND=c_int) FUNCTION smooth_and_save (DPOINT, CTS, SFC, IDC, NQPTS, DATS) bind (C,NAME='smooth_and_save_')
463INTEGER (KIND=c_int),
INTENT(IN) :: idc, nqpts, dats
464real(kind=c_double),
DIMENSION(NQPTS),
INTENT(IN) :: dpoint, cts
465real(kind=c_double),
INTENT(IN) :: sfc
466DOUBLE PRECISION,
DIMENSION (:),
ALLOCATABLE :: sqtab
469 LOGICAL FUNCTION smooth (TABTOLISS, GTOLISS, DIMTOLISS, SIGMALISS)
470 INTEGER,
INTENT(IN) :: dimtoliss
471 DOUBLE PRECISION,
INTENT(IN) :: sigmaliss
472 DOUBLE PRECISION,
INTENT(IN),
DIMENSION(DIMTOLISS) :: gtoliss
473 DOUBLE PRECISION,
INTENT(INOUT),
DIMENSION(DIMTOLISS) :: tabtoliss
477if (
allocated(sqtab))
deallocate(sqtab)
479allocate(sqtab(nqpts), stat=
err)
481 call show_error (
"Impossible to allocate memory"//char(0), &
482 "Function: smooth_and_save"//char(0),
"Table: SQTAB"//char(0))
491if (.not.
smooth(sqtab, dpoint, nqpts, sfc))
then
496call save_curve (nqpts, sqtab, idc, dats)
502if (
allocated(sqtab))
deallocate(sqtab)
logical function fzbt(ndq)
void show_error(char *error, int val, GtkWidget *win)
show error message
double precision, dimension(98), parameter a3
double precision, dimension(98), parameter a2
double precision, dimension(98), parameter b1
double precision, dimension(98), parameter b3
double precision, dimension(98), parameter a1
double precision, dimension(98), parameter b4
double precision, dimension(98), parameter b2
double precision, dimension(98), parameter a4
double precision, dimension(:,:,:), allocatable fullpos
double precision, dimension(:), allocatable qvectx
double precision, dimension(:), allocatable nscattl
double precision, dimension(:,:,:), allocatable fzsij
double precision, dimension(:), allocatable qvecty
double precision, dimension(:), allocatable cij
double precision, dimension(:), allocatable k_point
integer, dimension(:), allocatable nbspbs
double precision, dimension(:), allocatable s
double precision, dimension(:,:), allocatable btij
integer, dimension(:), allocatable degeneracy
double precision, dimension(:), allocatable xs
double precision, dimension(:), allocatable modq
double precision, dimension(:), allocatable xscattl
double precision, dimension(:), allocatable qvectz
integer, dimension(:), allocatable lot
double precision, dimension(:,:,:), allocatable sij
double precision, dimension(:), allocatable sik
subroutine fourier_trans_steps()
integer(kind=c_int) function s_of_k(nq, xa)
integer(kind=c_int) function smooth_and_save(dpoint, cts, sfc, idc, nqpts, dats)
logical function smooth(tabtoliss, gtoliss, dimtoliss, sigmaliss)