For Programmers: Free Programming Magazines  


Home > Archive > Fortran > July 2004 > Help for calculating double integral









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Help for calculating double integral
Simon Lee

2004-07-15, 8:57 am

Dear all,

I use fortran to calculate double integral by using function DT2ODQ ,

CALL DT2ODQ (F, A, B, G, H, ERRABS, ERRREL, IRULE,
+ S, ERREST, MAXSUB, NEVAL, NSUBIN,
+ ALIST, BLIST, RLIST, ELIST, IORD, WK,
+ IWK)

ERRABS = 0.00001
ERRREL = 0.00001
MAXSUB =500
IRULE=6

However, there are errors attached below, please give me possible solution,
thanks

Regards,
Simon

========================================
===
Compiling Fortran...
D:\ring\program\RINGimpBfieldoff1.for
D:\ring\program\RINGimpBfieldoff1.for(97): error FOR2760: scalar supplied
for array argument ALIST (number 14) of procedure DT2ODQ
D:\ring\program\RINGimpBfieldoff1.for(97): error FOR2760: scalar supplied
for array argument BLIST (number 15) of procedure DT2ODQ
D:\ring\program\RINGimpBfieldoff1.for(97): error FOR2760: scalar supplied
for array argument RLIST (number 16) of procedure DT2ODQ
D:\ring\program\RINGimpBfieldoff1.for(97): error FOR2760: scalar supplied
for array argument ELIST (number 17) of procedure DT2ODQ
D:\ring\program\RINGimpBfieldoff1.for(97): warning FOR4793: incorrect data
type for argument IORD (no. 18) of DT2ODQ
D:\ring\program\RINGimpBfieldoff1.for(97): error FOR2760: scalar supplied
for array argument IORD (number 18) of procedure DT2ODQ
D:\ring\program\RINGimpBfieldoff1.for(97): error FOR2760: scalar supplied
for array argument WK (number 19) of procedure DT2ODQ
D:\ring\program\RINGimpBfieldoff1.for(97): warning FOR4793: incorrect data
type for argument IWK (no. 20) of DT2ODQ
D:\ring\program\RINGimpBfieldoff1.for(97): error FOR2760: scalar supplied
for array argument IWK (number 20) of procedure DT2ODQ
Error executing fl32.exe.
RINGimpBfieldoff1.exe - 7 error(s), 2 warning(s)



Ian Bush

2004-07-15, 8:57 am


Hi Simon,

Simon Lee wrote:

SNIP code.


> ========================================
===
> Compiling Fortran...
> D:\ring\program\RINGimpBfieldoff1.for
> D:\ring\program\RINGimpBfieldoff1.for(97): error FOR2760: scalar supplied
> for array argument ALIST (number 14) of procedure DT2ODQ
> D:\ring\program\RINGimpBfieldoff1.for(97): error FOR2760: scalar supplied
> for array argument BLIST (number 15) of procedure DT2ODQ
> D:\ring\program\RINGimpBfieldoff1.for(97): error FOR2760: scalar supplied
> for array argument RLIST (number 16) of procedure DT2ODQ
> D:\ring\program\RINGimpBfieldoff1.for(97): error FOR2760: scalar supplied
> for array argument ELIST (number 17) of procedure DT2ODQ
> D:\ring\program\RINGimpBfieldoff1.for(97): warning FOR4793: incorrect data
> type for argument IORD (no. 18) of DT2ODQ
> D:\ring\program\RINGimpBfieldoff1.for(97): error FOR2760: scalar supplied
> for array argument IORD (number 18) of procedure DT2ODQ
> D:\ring\program\RINGimpBfieldoff1.for(97): error FOR2760: scalar supplied
> for array argument WK (number 19) of procedure DT2ODQ
> D:\ring\program\RINGimpBfieldoff1.for(97): warning FOR4793: incorrect data
> type for argument IWK (no. 20) of DT2ODQ
> D:\ring\program\RINGimpBfieldoff1.for(97): error FOR2760: scalar supplied
> for array argument IWK (number 20) of procedure DT2ODQ
> Error executing fl32.exe.
> RINGimpBfieldoff1.exe - 7 error(s), 2 warning(s)


Well it's what the error messages say. For these arguments you are trying
to pass a scalar when an array is required, and/or you are passing the wrong
data type, e.g. a real when an integer is required.

The page

http://www.lanl.gov/orgs/cic/cic8/p...ues/dtwodq.html

describes the routine ( it's near the bottom ). It's not great in that it doesn't
explicitly state what the data type of each argument whould be, but I would guess
that any variable starting with i is supposed to be an integer and the rest double
precision. It does say, however, what should and should not be arrays and how big they
should be so you should be able to work it out from there,

Ian


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com