[Nek5000-users] Link Fortran90 code via Fortran Interface

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Thu Feb 11 16:22:52 CST 2016


Hi Philipp,

If you only want to link a patch you can do so by modifying your makenek and makefile_usr.inc as in the stability toolbox for example
https://nek5000.mcs.anl.gov/toolboxes/


Oana




________________________________________
From: nek5000-users-bounces at lists.mcs.anl.gov [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
Sent: Thursday, February 11, 2016 4:06 PM
To: nek5000-users at lists.mcs.anl.gov
Subject: Re: [Nek5000-users] Link Fortran90 code via Fortran Interface

I guess you could just use common blocks also in the Fortran90 code.

Philipp

On 2016-02-11 18:00, nek5000-users at lists.mcs.anl.gov wrote:
> Hi Philipp,
>
> You should be able to define subprograms in a separate F90 file and call
> them from the usr file.  Then, just compile your new file and add it to
> the link line using the "USR_LFLAGS" option in makenek. However, it
> could be a bit tricky to access global data stored Nek5000's common
> blocks, so I'd strongly suggest making those routines self-contained
> with all data passing via arguments.  This approach can be used to link
> in C or C++ code as well, as they are all object compatible.
>
> The usr file itself needs to be F77, if for no other reason than the
> include files ('SIZE', for example) are in F77 format.
>
> Depending on your problem, you may be able to use NekBox, which is
> written in F90 and uses F90 for the usr file.  NekBox is more of a
> prototyping code than a production code, so its functionality is
> limited.  See:
> https://github.com/Nek5000/NekBox
>
> Max
>
> On Thu, Feb 11, 2016 at 8:35 AM <nek5000-users at lists.mcs.anl.gov
> <mailto:nek5000-users at lists.mcs.anl.gov>> wrote:
>
>     Hi Neks,
>
>     Is it possible to link Fortran90 code via the Fortran Interface
>     (b3d.usr).
>
>     Best regards, Philipp Weiss
>     _______________________________________________
>     Nek5000-users mailing list
>     Nek5000-users at lists.mcs.anl.gov <mailto:Nek5000-users at lists.mcs.anl.gov>
>     https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
>
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users


More information about the Nek5000-users mailing list