CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > 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 Display Modes
Old   May 15, 2013, 21:51
Default Fortran vs. C++
  #1
Senior Member
 
Mehdi
Join Date: Jan 2011
Location: Iran
Posts: 130
Rep Power: 6
mb.pejvak is on a distinguished road
which one is more effective c++ or fortran 2008? particularly in CFD.
__________________
Best Regards;
Mehdi
E-mail: mb.pejvak[at]Gmail[dot]com
mb.pejvak is offline   Reply With Quote

Old   May 16, 2013, 01:56
Default
  #2
Member
 
Andrew Somorjai
Join Date: May 2013
Posts: 75
Rep Power: 4
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: Delft, Netherlands
Posts: 919
Rep Power: 17
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.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fortran Compiler-CFX12.1 Araz CFX 12 November 2, 2014 13:46
Memory protection in OpenFOAM / combinig with FORTRAN botp OpenFOAM Programming & Development 1 February 6, 2013 05:26
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 00:05.