Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Fortran: Type/Rank mismatch error

Options
  • 25-11-2010 4:01pm
    #1
    Registered Users Posts: 3,457 ✭✭✭


    I can't seem to find any useful documentation for this.

    I am trying to pass a function through an integration function as an argument.

    integrate(my_func,parameters)

    But when I try this, I get a Type/rank mismatch error.

    The integrator has the following structure in at the top

    RECURSIVE function integrate(func,parameters) RESULT(inth)
    implicit none
    REAL(dbp) inth, func, parameters

    interface
    function func(xp,yp,zp) RESULT(vfun2d)

    My function has the following structure:

    function my_func(x,y,z) result(out)
    real(dbp) :: out
    real, intent(in) :: x,y,z

    Not sure what the problem is.

    Any help would be appreciated. Thanks


Advertisement