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

Fortran vs. C++

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By akidess

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 15, 2013, 21:51
Default Fortran vs. C++
  #1
Senior Member
 
Mehdi Baba Mehdi
Join Date: Jan 2011
Posts: 158
Rep Power: 15
mb.pejvak is on a distinguished road
which one is more effective c++ or fortran 2008? particularly in CFD.
mb.pejvak is offline   Reply With Quote

Old   May 16, 2013, 01:56
Default
  #2
Senior Member
 
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 12
massive_turbulence is on a distinguished road
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++.
massive_turbulence is offline   Reply With Quote

Old   May 16, 2013, 02:59
Default
  #3
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Some more recommended reading:
C vs Fortran for HPC
What makes Fortran fast
How much better are Fortran compilers really
mb.pejvak likes this.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
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


All times are GMT -4. The time now is 21:26.