0

I'm trying to solve a 2 dimensional (f(x,y)) numerical integral in FORTRAN. I learned that there is a standard form for function and boundary levels determination. My function has other variables like below:

Function=f(a1,a2,a3,c0,X,Y)
real(kind=8) :: a1,a2,a3,X,Y,c0(6,6),f(3,3,3,3)

I wonder how can I declare the a1,a2,a3,c0 and f (the function output) globally to use the standard form for numerical integration (f(x,y))?

Ian Turton
  • 10,018
  • 1
  • 28
  • 47
Farid
  • 1
  • 1
  • Well in a module, which is the more modern common block. Take a crack at it and post an attempt, for us to start with. – Holmz Feb 03 '17 at 11:55
  • 1
    This is a common problem and is being asked repeatedly. See also http://stackoverflow.com/questions/38324934/function-with-more-arguments-and-integration http://stackoverflow.com/questions/26297170/fortran-minimization-of-a-function-with-additional-arguments http://stackoverflow.com/questions/37714406/implementing-anonymous-functions-in-fortran?noredirect=1&lq=1 http://stackoverflow.com/questions/24391991/in-fortran-90-how-do-i-program-the-equivalent-of-a-handle-in-matlab?noredirect=1&lq=1 – Vladimir F Героям слава Feb 03 '17 at 12:01

0 Answers0