"Y.K. ZHOU" wrote:
>
> Hi All,
>
> Just a quick question for f77:
>
> Suppose I have a subroutine
>
> -----
> subroutine system_solve( ..., solver)
>
> external solver
>
> ---
>
> Where "solver" is an external subroutine that
> corresponds to different methods.
>
> Is there a fortran function that can print out the
> name of the input solver ?
>
No, there's no function like this in Fortran. How about
adding an extra character variable to the system_solve
call. So a call would look like
call system_solve( ..., rkgn, "the RKGN version")
It puts the burden on the user, but if he's trying different
solvers to see what works well, he's probably willing to
identify his methods.
If you want to upgrade to F90 you could make the name argument
optional and only display it if it's there.
Dick Hendrickson
> What I want to do is that at the end of the
> call to system_solve, I can print out sth like:
>
> The solver : name_of_the_solver converges in n
> steps etc
>
> So that the users can easily tell which method was
> used for the output, and they can see the different
> efficiency of different methods.
>
> Thanks.
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
|