21INTEGER (KIND=c_int) FUNCTION s_of_q (QMAX, QMIN, NQ) bind (C,NAME='s_of_q_')
65INTEGER (KIND=c_int),
INTENT(IN) :: nq
66real(kind=c_double),
INTENT(IN) :: qmax , qmin
68DOUBLE PRECISION,
DIMENSION (:),
ALLOCATABLE :: sqtab
71 INTEGER FUNCTION recup_data (i, j)
72 INTEGER,
INTENT(IN) ::
i,
j
74 LOGICAL FUNCTION fzbt (NDQ)
75 INTEGER,
INTENT(IN) :: ndq
85 call show_error (
"Impossible to allocate memory"//char(0), &
86 "Function: s_of_q"//char(0),
"Table: Q_POINT"//char(0))
90if (
allocated(
s))
deallocate(
s)
91allocate(
s(nq), stat=
err)
93 call show_error (
"Impossible to allocate memory"//char(0), &
94 "Function: s_of_q"//char(0),
"Table: S"//char(0))
98if (
allocated(
xs))
deallocate(
xs)
99allocate(
xs(nq), stat=
err)
101 call show_error (
"Impossible to allocate memory"//char(0), &
102 "Function: s_of_q"//char(0),
"Table: XS"//char(0))
106if (
allocated(
sij))
deallocate(
sij)
109 call show_error (
"Impossible to allocate memory"//char(0), &
110 "Function: s_of_q"//char(0),
"Table: Sij"//char(0))
117dq=((qmax-qmin)/dble(nq))
129if (recup_data(
j,
idgr) .ne. 1)
then
135if (recup_data(
j,
idgr) .ne. 1)
then
143 if (recup_data(
j,
idgr) .ne. 1)
then
151if (.not.
fzbt(nq))
then
156if (
allocated(sqtab))
deallocate(sqtab)
157allocate(sqtab(nq), stat=
err)
159 call show_error (
"Impossible to allocate memory"//char(0), &
160 "Function: s_of_q"//char(0),
"Table: SQTAB"//char(0))
169call save_curve (nq, sqtab,
l,
idsq)
175call save_curve (nq, sqtab,
l,
idsq)
181call save_curve (nq, sqtab,
l,
idsq)
187call save_curve (nq, sqtab,
l,
idsq)
195 call save_curve (nq, sqtab,
l,
idsq)
204 call save_curve (nq, sqtab,
l,
idsq)
213 call save_curve (nq, sqtab,
l,
idsq)
222if (
allocated(sqtab))
deallocate(sqtab)
224if (
allocated(
sij))
deallocate(
sij)
225if (
allocated(
s))
deallocate(
s)
226if (
allocated(
xs))
deallocate(
xs)
228if (
allocated(
btij))
deallocate(
btij)
232INTEGER (KIND=c_int) FUNCTION send_gr (IC, VAL, DR, RDATA, GDATA) bind (C,NAME='send_gr_')
236INTEGER (KIND=c_int),
INTENT(IN) :: ic, val
237real(kind=c_double),
INTENT(IN) :: dr
238real(kind=c_double),
DIMENSION(VAL),
INTENT(IN) :: rdata, gdata
239DOUBLE PRECISION :: hcap1, hcap2, vcap
245 call show_error (
"Impossible to allocate memory"//char(0), &
246 "Function: send_gr"//char(0),
"Table: SHELL_VOL"//char(0))
257 hcap1=rdata(
i)+dr-
mbox
258 if (rdata(
i) .le.
mbox)
then
263 vcap=hcap1**2*(3*rdata(
i) - hcap1) - hcap2**2*(3*rdata(
i) - hcap2)
278if (rdata(1) .eq. 0.0) rinit = 2
289 else if (
j .eq. 8)
then
297 else if (
j .eq. 8)
then
logical function fzbt(ndq)
void show_error(char *error, int val, GtkWidget *win)
show error message
double precision total_density
double precision fact_rmax
double precision, dimension(:,:,:), allocatable fzsij
double precision, dimension(:), allocatable q_point
double precision, dimension(:), allocatable xi
double precision, dimension(:), allocatable s
double precision, dimension(:,:), allocatable btij
double precision, dimension(:), allocatable xs
double precision, dimension(:), allocatable shell_vol
double precision sinus_phi
double precision, dimension(:,:,:), allocatable sij
double precision, parameter pi
integer(kind=c_int) function s_of_q(qmax, qmin, nq)
integer(kind=c_int) function send_gr(ic, val, dr, rdata, gdata)