i-RIC / iriclib

1 stars 3 forks source link

Add FORTRAN 90 module so that solver developers can develop iRIC models easier #62

Closed kskinoue0612 closed 3 years ago

kskinoue0612 commented 5 years ago

Currently, iRIClib library is implemented in C language, and it is called directly from FORTRAN.

But this makes it difficult for solver developers to use iriclib functions easily, because compiler do not output error message, even if the number of arguments of the subroutines are invalid, or the value types of arguments are invalid.

If compiler returns error when the arguments are invalid, it will be helpful for solver developers.

To make it real, develop FORTRAN binding module, like below:

module iriclib_mod
contains
    subroutine cg_iric_init_f(fin, ierr)
        integer, intent(in):: fin
        integer, intent(out):: ierr

        call cg_iric_init_f2c(fin, ierr)
  end subroutine

...

end module

FORTRAN 90 solvers will use the module by use iriclib_mod.

kskinoue0612 commented 3 years ago

Closed with e58eb4ffb523632bcc4311280ebebd1d21e07c08 .