Jul 25, 2016 - 08:15 AM
Yes absolutely you can do that. The best way, with the most flexibility, is to attach a Fortran file (.f or .f90) containing your subroutine. For example, the name of the Fortran file is mycode.f90, within it there is a subroutine called myfunction(a,b). You need to add the following to the script section of your custom component:
And also, under Project Settings, attach the Fortran file mycode.f90. ... Of course this is a basic example, and your subroutine is going to be called every time step, which you may not need.
Hope this helps.