CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Fortran and C (https://www.cfd-online.com/Forums/fluent/42639-fortran-c.html)

Eduardo October 21, 2006 14:09

Fortran and C
 
Does anybody know how to write a C program that will read Fortran files. I have the fortran files just needed to translate it into C in order to Fluent be able to compile them. Thanks in advance

fullmonty October 21, 2006 19:51

Re: Fortran and C
 
Depends what do you need it to do and how complex the fortrans are?

It is possible to write a C program to link fortran files (see my previous posts, and the related responses both here and in archive on UDF programming and Fortran UDF)

However, the process of translating the fortran files to C isn't too difficult, as long as your programs aren't too long or complex. There are language translaters (f2c) but otherwise just get a few FORTRAN and C programming books and do it manually.

Let me know how you go, particularly if you work out the first option.


All times are GMT -4. The time now is 00:37.