CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Fortran-C/C++ interoperability example codes

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By aerosayan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 13, 2020, 09:57
Thumbs up Fortran-C/C++ interoperability example codes
  #1
Senior Member
 
Sayan Bhattacharjee
Join Date: Mar 2020
Posts: 495
Rep Power: 8
aerosayan is on a distinguished road
Hi everyone,

Since Fortran-C/C++ interoperability can become complex at times and there aren't many good tutorials on the matter, I created a few example codes for my work.

I thought it would be helpful to others if I shared them.


Since I'm new to using Fortran, I don't know all of the use cases/features of the interoperability features.

I'm looking for ideas on what example codes can be created next to demonstrate more advanced interoperability features of Fortran.

I have plans to create a few YouTube tutorials on this subject.


GITHUB REPO : https://github.com/aerosayan/fortran-c-interop/

Example codes created for the following cases :

Code:
 - BASIC
   '
   '- interop-0-1 : extern "C"
   '
   '- interop-1-1 : Call Fortran subroutine from C.
   '- interop-1-2 : Call C void function from Fortran.
   '
   '- interop-2-1 : Send integer and double digits to Fortran subroutine from C.
   '- interop-2-2 : Send integer and double digits to C void function from Fortran.

 - INTERMEDIATE
   '
   '- interop-3-1 : Send dynamic integer array to Fortran subroutine from C.
   '
   '- interop-4-1 : Send dynamic integer matrix to Fortran subroutine from C.
Sincerely
Sayan
aero_head likes this.
aerosayan is offline   Reply With Quote

Reply

Tags
fortran 90, fortran-c/c++


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DS2V Fortran codes Marin4444 Main CFD Forum 2 December 15, 2020 14:54
fortran codes HaKu Main CFD Forum 1 July 8, 2011 15:23
fortran codes 3D HaKu Main CFD Forum 1 July 8, 2011 11:34
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 19:56
BOOK ON OPTIMIZATION OF FORTRAN CODES Alberto Main CFD Forum 3 November 10, 2008 07:07


All times are GMT -4. The time now is 16:49.