I am trying to solve some eigenvalue problems. I am using gfortran. I have written a module that contains the bisection_method subroutine. In my program, I defined the secular(m,x) function that takes a 2D array m and a float x and outputs the characteristic polynomial of m at x; i.e. det (m - x Id). One of the arguments of the bisection_method subroutine is a function f, which was intended as a function of one real input and real output. I would want to input, however, the 'partially applied' function secular(m,_) to this subroutine. Is there a way to do this, without explicitly defining this function in a module?
I can't define this functions explicitly, for I am to do this procedure for several matrices m. ALso, I cannot modify the body of the bisection_method because I use it for function of one real argument as well. Is there a way around this in Fortran?