Entries by Jean Bélanger

Programming Physical Algorithm That Simulates Dam-Break Wave

Introduction  DamBreak++ wave simulator is a programming environment designed to accelerate the prototyping phase in the validation of numerical algorithms on the so-called Dam Break problem. The software architecture is based on an Object-Oriented framework with a layer of abstract types by which it is possible to extend user applications. A particularly attractive feature is the […]

Scientific MetaProgramming In Modern C++

Metaprogramming Template metaprogramming (TMP) is a metaprogramming technique in which templates are used by a compiler to generate temporary source code. (Wikipedia) Scientific Programming Meta programming is becoming more popular with the new features added to C++14/17 (trait library). Many physics libraries use this technique where efficiency is especially important or crucial. A good reference to learn the basics […]

Scientific Modern C++ Features for Scientific Programmer

Scientific Modern C++ Scientific Modern C++ is the application of Modern C++ new programming techniques in developing scientific software applications. Scientific Modern C++ added new features (language upgrade) and many of these newly introduced features can be applied in the development of scientific applications. Scientific application demands efficiency and flexibility, and the new features of […]

“Modern C++ Scientific Data Type Use case “

Scientific Data Type(scalar field) Our scientific programming environment supports many scientific data types such as scalar field, vector field, tensor and so on, usual mathematical types used in scientific programming. Recently I started to refactor scalar field using Modern C++20 features (particularly ‘Range’ library). I thought it would be a good example to show how […]

DamBreak++ Physics Simulator Upgraded to Modern C++

DamBreak++ Physics Simulator Just completed the first version of the DamBreak++ physics simulator now supporting C++17/20. Many bugs are fixed and validation test completed successfully. A re-factoring has been done and is still ongoing. This required a big effort to make it done. Lot of prototypes were developed over the years, and I had to […]

Scientific Programming Using Modern C++ Features

Scientific Programming Modern C++ Scientific programming using Modern C++ requires a new way of thinking about programming, at first sight it may often be more abstract and more difficult to understand than conventional codes. Adopting these new features means not only learning a whole programming style but learning new unfamiliar features as well. I’m currently […]

Some Thoughts About Modern C++ in Scientific Programming

Perfect forwarding (Modern C++) In the refactoring project I’m currently working, I prototype many implementations and lately I’ve been testing the use of perfect forwarding (Modern C++ feature) in our scientific programming environment. The reason is that some of the legacy code I started from used functions with different signatures. As the name perfect forwarding […]

Lessons Learned from a Scientific Code Refactoring

Scientific code refactoring using Object-Oriented Numeric   I have been working on the refactoring of one of our numerical libraries using Object-Oriented Numeric methodology. I learned a lot about developing architecture to support a flexible programming environment. I will discuss some of the lessons I learned over the years working on this project.  “Object-Oriented Programming” and […]