1
$\begingroup$

I have some experience with some programming languages like C/C++, Fortran, Python, etc but recently, I am getting interested in Julia.

But, I am wondering if Julia could be used to create some large CFD software like OpenFOAM (written in C++): mesh utilities, solvers, parallel computing, ...etc.

So my question, is Julia really up to this task for such scales?

$\endgroup$
  • 1
    $\begingroup$ Any programming language can be used for these things. What are your constraints/goals? Do you want to be fast? Write small code? Be interoperable with existing libraries? $\endgroup$ – Wolfgang Bangerth May 27 at 15:58
  • $\begingroup$ @WolfgangBangerth: Exactly, availability of libraries, how mature are they, High performance computing, speedup compared to C++, scalability, how easy is the maintainability of the code compared to C++ $\endgroup$ – IamNotaMathematician May 27 at 20:05
  • $\begingroup$ @IamNotaMathematician This is very subjective as long as your question does not contain more concrete criteria. Maybe you could add what you care about, e.g., performance of common math operations, integration with common numeric libraries, or whatever you are thinking of. $\endgroup$ – allo May 28 at 11:11
  • $\begingroup$ I think the question is just too subjective to answer. In the end, there are excellent C++ libraries for nearly everything that has to do with the solution of PDEs, whereas they are largely missing in the Julia environment. Examples that come to mind are PETSc/Trilinos for linear algebra, deal.II/libmesh/FEniCS for discretizations, etc. You will have to duplicate many many many years of work if you want to do all of that in Julia. Is it possible? Yes, of course. Is it worth it -- no, not at all. $\endgroup$ – Wolfgang Bangerth May 28 at 16:02
  • $\begingroup$ @WolfgangBangerth: That's exactly the kind of answer I am exepecting, I mean, is it really worth it so as you said, that's a huge extra work. but what if Julia can Interface to C++ libraries? $\endgroup$ – IamNotaMathematician May 29 at 8:59
5
$\begingroup$

I think the question is just too subjective to answer. In the end, there are excellent C++ libraries for nearly everything that has to do with the solution of PDEs, whereas they are largely missing in the Julia environment.

Examples that come to mind are PETSc/Trilinos for linear algebra, deal.II/libmesh/FEniCS for discretizations, etc. You will have to duplicate many many many years of work if you want to do all of that in Julia. Is it possible? Yes, of course. Is it worth it -- no, not at all.

To give you an idea of the level of work necessary: My best guess is that every finishing graduate student's software project based on deal.II runs through maybe 200,000 lines of C++ code in deal.II and, if it uses any kind of interesting linear solver, another 100,000 lines of code in solver packages. But experienced, full-time programmers only write 20,000 lines of code per year -- in other words, these students' programs would have taken 15 years to write if not for existing software libraries.

| cite | improve this answer | |
$\endgroup$
  • 2
    $\begingroup$ But Julia has some bindings for PETSc: github.com/JuliaParallel/PETSc.jl $\endgroup$ – s.ouchene May 31 at 18:24
  • $\begingroup$ @Navaro Alright, so you found that one of these libraries has some Julia bindings. But are they complete? Are they kept updated? What about all of the other libraries? I have no idea whether these binds are complete and up to date, but I think you get the point. $\endgroup$ – Wolfgang Bangerth Jun 1 at 3:50
  • $\begingroup$ Just to quote from that page: "Just enough KSP functions are implimented to do a GMRES solve. Adding more functionality is the current priority." PETSc also has a million optional dependencies for preconditioners, solvers, and basically everything else. Are these all available? If not, you're basically back to what I described. $\endgroup$ – Wolfgang Bangerth Jun 1 at 3:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.