CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   i want to make a software C++ or Visual Fortran??? (http://www.cfd-online.com/Forums/main/8962-i-want-make-software-c-visual-fortran.html)

Zin April 4, 2005 08:03

i want to make a software C++ or Visual Fortran???
 
Hi everybody Actually, For my final project ,i have to make a software which uses many scientific algorithms. I have an advanced skills in fortran 77. Some friends advise me to use the C++ . Do u think that the visual fortran can be good for this work

If yes ,do u know a good paper or book that can be useful for learning Visual Fortran.

zxaar April 4, 2005 08:49

Re: i want to make a software C++ or Visual Fortra
 
i am using visual c++ to write program for cfd calculations, ( i haven't worked with visual fortran), i feel there are few good things when we use visual studio, like the project is managed nicely, its very good specially when you are working with a large project and can't keep things in one file. this advantage will still be there with visual fortran, second advantage is , GUI creation of the program is very easy (once you know the basics of it, for that tips are easily availble on various site, i look at www.codeproject.com, enough for almost all the problems),

if u have linux you can look at glade also, will give you the same advantages and its free with linux.

about docs, i will see if i have documentation of visual fortran i have on my compter , if its there i will mail you

scar April 4, 2005 09:12

Re: i want to make a software C++ or Visual Fortra
 
From advanced skills in fortran 77 to basic C++ there is a HUGE bridge. It is equivalent to change a "mechanical typewriter" to a "computer word processor". If your project is small less than 1000 lines of code you can live with fortran 77. If your project is bigger you can start to consider C++, but you will need a couple of months in order to get a grip of object paradigm and it counterpart in C++. While if performance is your main issue, as far as the application will run less than 1 day you can consider mathlab, phyton, but if your application must run for several weeks, fortran 77 can be a good option for some expensive computations, but still the main core of the system can be design on C++.


Zin April 4, 2005 09:33

Re: i want to make a software C++ or Visual Fortra
 
thanks for ur response. i know that Fluent is fortran based software,don't u think that using fortran 90 or digital visual may be very useful to make my software.??

actually, i have to put the project in action in more or less 6 mounth ,and i havn't any skills in C++ , is it possible to me to reach my target in this period?

Regards.

A.S. April 4, 2005 10:22

Re: i want to make a software C++ or Visual Fortra
 
Fluent now is fully C++ based software. I wrote a program in Fortran 90 and its GUI was written using winteracter (Available for Lahey/Absoft as per my knowledge). Personally I prefer Fortran over C++. But if you are looking for commmerical side prefer C++.

Good Luck

A.S.

A.S. April 4, 2005 10:23

Re: i want to make a software C++ or Visual Fortra
 
Why Star is mostly Fortran based. Now only commercial softwares have started moving to C++.

Zin April 4, 2005 10:33

Re: i want to make a software C++ or Visual Fortra
 
why a commercial target for a software involve a C++ based configuration??

scar April 4, 2005 10:59

Re: i want to make a software C++ or Visual Fortra
 
C++ is a rich computer language that allows you to handle complex problems (data structure, processes administration, etc) for example through the Standard Template Library. In particular, C++ is a good language to implement object-oriented designs and generic programming, although you can try to do it (at least object orientation) with FORTRAN 90, this language is still immature with respect to the object paradigm. For that reason, C++ is a good candidate to be used in the core of complex applications or in every application, as far as you can spend some time to learn it.


andy April 4, 2005 11:02

Re: i want to make a software C++ or Visual Fortra
 
I am not sure I fully understand your project brief. However, you have almost no chance of mastering C++ for scientific computing and performing a useful project. If you know Fortran 77 then stick with it and spend your time usefully developing your project. The time to learn a big language like C++ is either in a C++ class, in your spare time if you are keen on that sort of thing or as part of a long project like a PhD.

scar April 4, 2005 11:07

Re: i want to make a software C++ or Visual Fortra
 
C++ is a rich computer language that allows you to handle complex problems (data structure, processes administration, etc) for example through the Standard Template Library. In particular, C++ is a good language to implement object-oriented designs and generic programming, although you can try to do it (at least object orientation) with FORTRAN 90, this language is still immature with respect to the object paradigm. For that reason, C++ is a good candidate to be used in the core of complex applications or in every application, as far as you can spend some time to learn it.


A.S. April 5, 2005 06:01

Re: i want to make a software C++ or Visual Fortra
 
Graphical interface. My expericence says F90 is powerfull for numerics. But when it comes to graphics and other capability it is still weak.

Steve April 5, 2005 06:04

Re: i want to make a software C++ or Visual Fortra
 
Maybe the poster was talking about the graphical interface to the compiler - the IDE you get with Visual Fortran.

zxaar April 5, 2005 09:03

Re: i want to make a software C++ or Visual Fortra
 
actually when using with developer studio (with fortran) , the GUI creation is almost same as what we do with VC++, but seeing the object oriented nature of windows messaging, i personlly prefer c++ with it.

the main problem with this is, code can not be run on linux, where i feel the parallization would be easier (i think so, i may be wrong)

Márcio Ricardo April 5, 2005 10:01

Re: i want to make a software C++ or Visual Fortra
 
If you choose to work with C++, you may work with kdevelop in linux, which allows you to create graphical interfaces too, and is very user-frendly. If you prefer fortran, the default compiler is g77, but I guess you may add other compiler than that, such like intel ifc, for example.

Zin April 5, 2005 12:20

Re: i want to make a software C++ or Visual Fortra
 
thanks for ur response.

Do think that it's possible to combine the powerful aspect of F90 in numerics and the ability of graphic interface of C++ in one way , because i have to compute complex algorithms in my application.

zxaar April 5, 2005 19:13

Re: i want to make a software C++ or Visual Fortra
 
exactly, kdevelop and glade are two very good options and best they are free

andy April 6, 2005 04:03

Re: i want to make a software C++ or Visual Fortra
 
Graphics has nothing directly to do with Fortran or C++ because they are implemented in libraries.

The graphics libraries (implementations of OpenGL almost exclusively these days) are written in C with bits of assembler and lots of hardware support in graphics engines. On top of this C interface others are provided for all the common languages: C++, Fortan, ADA, Python, Ruby, etc.. So you can use OpenGL with pretty much any language you want.

Graphical User Interface (GUI) libraries which provide the pretty buttons and menus but not the CFD plots are written mainly in C++. The task being performed maps well to an object orientatated approach (unlike most scientific computing). Fortunately, it is relatively easy to isolate all this C++ code and interact with your main code via 1 or 2 call back functions. This enables you to write your main management and modelling routines in any language you want.

Because GUI code is all overhead (the value usually lies in the modelling routines) people often want to use one which runs across all common platforms without having to completely rewrite the code. Common cross platform GUIs are Qt and Fox. The former is better supported but has liscensing issues which can prevent its use for academic software (it did us) but the latter does not. There are other GUI toolkits but experience suggests they tend to have substantial problems except on their main development platform.


zxaar April 6, 2005 21:39

Re: i want to make a software C++ or Visual Fortra
 
one last thing:,

this is my personal experience, and may not be true for everybody, i feel that for me learning java first helped me a lot for understanding object oriented model of c++.

my suggestion is , if u have time spend 10-15s doing small examples on java,

the reason why i am sayign so is java is strict object oreinted language, where as c++ supports c style or fotran style coding too, so when peopel try to learn c++ they often end up writing programs as they already do, that is not using object oriented model fully, spending tiem with java will put using object oreinted programming into habit. further it gives better idea to message passign system of languages (and exceptions too), in all its worth spendign soem time with java. its always fun.


Márcio Ricardo April 7, 2005 07:57

Re: i want to make a software C++ or Visual Fortra
 
You're right. Learning java may be usefull to learn C++, but, for scientific programming, often you can't use only one paradigm. Some features of OOP, like inheritance, for example, may really slow down your code. In some parts of your code, such like pre- and post-processing, or GUI in general, OOP is really usefull, but when programming the math hard work, like linear systems solvers or matrix storage, it may slow down the code. And the reason why C++ usage has increased in scientific computing is that it has other features than OOP.

Jörn Beilke April 7, 2005 09:04

Re: i want to make a software C++ or Visual Fortra
 
Is there any reason that you want to start from scratch? Did you have a look at OpenFOAM?


All times are GMT -4. The time now is 01:16.