|
[Sponsors] |
May 15, 2013, 21:51 |
Fortran vs. C++
|
#1 |
Senior Member
Mehdi Baba Mehdi
Join Date: Jan 2011
Posts: 158
Rep Power: 15 |
which one is more effective c++ or fortran 2008? particularly in CFD.
|
|
May 16, 2013, 01:56 |
|
#2 |
Senior Member
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 13 |
I saw this thread on stackoverflow with lots of arguments for and against fortran/C and I guess it all comes down to legacy code in Fortran. I notice you mentioned Fortran 2008 which should be backwards compatible with any other Fortran code which is one advantage. I'm guessing that OOP programming doesn't make things any faster so using C++ is again pointless. If you have more experience with Fortran over C++ you might as well use Fortran. A lot of CFD code seems to be written in Fortran and converting things over does require some experience in C/C++. Many Fortran programmers mention that Fortran has built in methods which are just as easily found within C/C++ libraries. C++ 11 is now capable of complex numbers or was that something included way back when.
It might all come down to who you are working with and whether team production is faster using Fortran. I personally don't like Fortrans syntax and have converted Fortran code I liked to C++. |
|
May 16, 2013, 02:59 |
|
#3 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Some more recommended reading:
C vs Fortran for HPC What makes Fortran fast How much better are Fortran compilers really
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fortran Compiler-CFX12.1 | Araz | CFX | 13 | March 27, 2017 05:37 |
Memory protection in OpenFOAM / combinig with FORTRAN | botp | OpenFOAM Programming & Development | 2 | February 15, 2016 12:25 |
Using Fortran with CFX: How to connect Fortran to CFX? | l.te | CFX | 0 | October 21, 2012 11:42 |
visual fortran | Monica | Main CFD Forum | 1 | August 28, 2004 20:45 |
Why Favoring Fortran over C/C++? | Zi-Wei Chiou | Main CFD Forum | 35 | September 26, 2001 09:34 |