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

C++ or Fortran

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 4, 2004, 00:36
Default C++ or Fortran
  #1
CFD Dude
Guest
 
Posts: n/a
Which is better for CFD codes...C++ or Fortran?

  Reply With Quote

Old   June 4, 2004, 01:43
Default Re: C++ or Fortran
  #2
matej
Guest
 
Posts: n/a
not an issue nowadays. Most big CFD packages rewrote already its new releases to c++ but keeping fortran user interface for costumers over the age of 25 - happy with fortran, writting notes on old punch cards.

it's only about the convinience and what is easier for you to use.

matej
  Reply With Quote

Old   June 4, 2004, 09:01
Default Re: C++ or Fortran
  #3
ZZ
Guest
 
Posts: n/a
For FORmula TRANslation use Fortran, for interface C++.
  Reply With Quote

Old   June 4, 2004, 09:42
Default Re: C++ or Fortran
  #4
Jim_Park
Guest
 
Posts: n/a
Search the archieves for cfd-online. This is debated every few months. Perhaps matej's answer captures a lot of the truth?

But a LOT of high-quality math routines are written in Fortran, documented, and widely tested. To reveal my age, let me say I don't know anything about C++ libraries.

  Reply With Quote

Old   June 4, 2004, 09:54
Default Re: C++ or Fortran
  #5
another cfd dude
Guest
 
Posts: n/a
I think Matej's answer captures all of the truth. Pick whatever language you're most proficient in.

I can recall one discussion in this forum where people said they were writing codes in java and visual basic. Hey, whatever floats your boat, there's no "right" answer...
  Reply With Quote

Old   June 4, 2004, 14:10
Default Re: C++ or Fortran
  #6
Jarmo Monttinen
Guest
 
Posts: n/a
I also agree with Matej. You will have enough "fun" writing and debugging the code, no point of creating more "fun" by trying to learn a new language while doing that. If at some point you want to make you code look fancy (graphics interface etc), then use C++ for that part like ZZ suggested.

-- Jarmo
  Reply With Quote

Old   June 4, 2004, 23:09
Default Re: C++ or Fortran
  #7
cjtune
Guest
 
Posts: n/a
I've also been 'shopping' for a coding language I can put all of my attention to rather than be confused/frustrated by the gamut of choices available.

Even between the FORTRANs, there's the issue of using F77 for performance, and F90 for data and code structure abstraction. F90 compilers also don't seem to optimise code as well as those for F77 (yet).

I think there has been comparisons between the performance of FORTRAN and C++ and it can be shown, IF properly implemented (avoiding the 'side-effects' of object-oriented abstraction like the unintended creation of temporary storage objects), C++ can equal or beat F77, but otherwise, F77 could be several times faster.

See:

http://www.osl.iu.edu/~tveldhui/pape.../drdobbs2.html

"Numerical methods and software tools in industrial mathematics", (Eds.) Morten Dæhlen, Aslak Tveito. Birkhäuser, 1997.

I think the main selling point of C++ 'for engineering and scientific applications' proponents is that it makes long-term code maintenance and reuse much easier, not that it has the potential of taking the crown from FORTRAN in terms of performance. But then again, C++ is not the easiest of languages to learn and master. We all love MS Windows, right?.

  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
Intrinsic Procedure 'ISNAN' in GNU FORTRAN 77 hawk Main CFD Forum 1 April 12, 2005 22:13
visual fortran Monica Main CFD Forum 1 August 28, 2004 20:45
Fortran77 or Fortran 90 Swapnil CFX 2 November 26, 2002 16:16
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 17:32.