Astrophysics - Which Programming Language

AI Thread Summary
The discussion revolves around the choice of programming languages for specific applications, particularly in fields like astrophysics and simulations. C++ is highlighted as a strong option, especially for building simulations and is becoming a standard for advanced systems like the Multiphysics Object Oriented Simulation Environment (MOOSE). FORTRAN is noted as a legacy standard for larger computational tasks, while Python is suggested for its versatility. The conversation emphasizes that the best language depends on individual goals and the specific requirements of projects, with considerations for the type of solutions needed (implicit vs. explicit) and the complexities involved in simulations. Ultimately, the choice of programming language should align with the user's objectives and the nature of the problems they aim to solve.
Seb222
Messages
1
Reaction score
0
I've done a very small amount of C++, but I don't want to spend the time I have to prepare on learning a language when it would have been more preferable to learn another (even though it seems you may use several language, and learning one helps to learn another.)

But are there any language you would say I require? Of course, everyone seems to swear by one language, whereas someone else will tell you to avoid it at all costs, so it's all a little confusing. Any input would be really valuable to me, thanks!
 
Technology news on Phys.org
Depends on what you want to do and which style suits you best.
There are a myriad of options.

One would be a high level interpreted language of one of the math software - Matlab, Mathematica, Maple(there's a whole section https://www.physicsforums.com/forumdisplay.php?f=189" covering just those types of packages).
If you are interested in building simulations C++ is a good bet. On the other hand Java works for multiple platforms.
Then there's a whole another area of GPU computing(if you need more computing power), which as I understand it is quite similar to C++ in style(CUDA anyway, don't know about OpenCL).

Besides, a program is just a tool for helping you to some result. And if you are talking astrophysics the choice of language will be the least of your problems I'd wager.
 
Last edited by a moderator:
Seb222 said:
I've done a very small amount of C++, but I don't want to spend the time I have to prepare on learning a language when it would have been more preferable to learn another (even though it seems you may use several language, and learning one helps to learn another.)

But are there any language you would say I require? Of course, everyone seems to swear by one language, whereas someone else will tell you to avoid it at all costs, so it's all a little confusing. Any input would be really valuable to me, thanks!
Either FORTRAN or C++, with some Python perhaps.

C++ seems to be becoming the new standard particularly for Multiphysics Object Oriented Simulation Environment (MOOSE) with parallel and massively parallel systems.
For example, http://www.inl.gov/technicalpublications/Documents/4336141.pdf

FORTRAN is the legacy standard for larger computational/simulation systems.

There is the matter of implicit vs explicit solutions, with the possibility for hybrid techniques. A lot depends on the time scale and non-linearities.
 
Last edited by a moderator:
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top