Astrophysics - Which Programming Language

Click For Summary
SUMMARY

In astrophysics, the choice of programming language significantly influences computational efficiency and simulation capabilities. C++ is increasingly recognized as the standard for Multiphysics Object Oriented Simulation Environment (MOOSE), particularly for parallel computing. FORTRAN remains the legacy choice for larger computational systems, while high-level interpreted languages like MATLAB, Mathematica, and Maple are recommended for mathematical modeling. Python is also suggested for its versatility and ease of use in various applications.

PREREQUISITES
  • Understanding of C++ for simulation development
  • Familiarity with FORTRAN for legacy computational systems
  • Knowledge of high-level languages like MATLAB or Mathematica for mathematical modeling
  • Basic concepts of GPU computing, particularly CUDA
NEXT STEPS
  • Research C++ for Multiphysics Object Oriented Simulation Environment (MOOSE)
  • Explore FORTRAN for large-scale computational simulations
  • Learn MATLAB for mathematical modeling in astrophysics
  • Investigate CUDA for GPU computing applications in simulations
USEFUL FOR

Astrophysicists, computational scientists, and software developers interested in simulation and modeling in astrophysics will benefit from this discussion.

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:

Similar threads

Replies
86
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 397 ·
14
Replies
397
Views
22K
Replies
16
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 133 ·
5
Replies
133
Views
13K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K