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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Fortran: Type/Rank mismatch error

  • 25-11-2010 3:01pm
    #1
    Registered Users, Registered Users 2 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