Mar 5 – 7, 2024
Julius-Maximilians-Universität Würzburg
Europe/Berlin timezone

Refactoring a research code for multi-physics simulations: the 4C experience

Mar 7, 2024, 9:20 AM
20m
HS3

HS3

Talk (15min + 5min) Legacy Software Lessons learned and applied

Speaker

Georg Hammerl (Helmholtz-Zentrum Hereon)

Description

Research software often starts with small codes that expand over the years and by the work of various people into large codes. This evolution is shaped by the specific research projects for which codes are used and the pressure to achieve within these research projects milestones and publications. This pressure is often counteracting the aim to develop a rigorous and clear structure for the underlying research codes. In addition, research codes are typically not developed by professional software engineers but rather by PhD students and postdocs without special training in software engineering. All this inevitably leads to large legacy codes that become increasingly difficult to handle.

As an example of such problems, we discuss the multi-physics simulation code 4C which consists of more than 1 million lines of code and has been developed over 20 years by dozens of researchers in collaboration of several institutions. 4C is a parallelized multi-physics research code for analyzing and solving a plethora of physical problems with focus on computational mechanics. It offers simulation capabilities for various physical models, including single fields such as solids and structures, fluids, scalar transport, or porous media, as well as multi-physics coupling and interactions within multi-field problems.

To overcome the initially summarized difficulties, we applied two strategies. On the one hand, we started new code projects based on the advanced library deal.II and on the Julia project Trixi.jl and sought to port the functionalities of 4C into these new codes. On the other hand, we pursued incremental refactoring of the existing legacy code. In this talk, we compare the pros and cons as well as the results of both approaches in the case of 4C.

Primary author

Georg Hammerl (Helmholtz-Zentrum Hereon)

Co-authors

Dr Sven Berger (Helmholtz-Zentrum Hereon) Sebastian D. Proell (Technical University of Munich) Dr Matthias Mayr (University of the Bundeswehr Munich) Niklas Neher (University Stuttgart) Erik Faulhaber (University of Cologne) Dr Ingo Scheider (Helmholtz-Zentrum Hereon) Dr Hoang-Giang Bui (Helmholtz-Zentrum Hereon) Prof. Martin Kronbichler (University of Augsburg) Prof. Alexander Popp (University of the Bundeswehr Munich) Prof. Wolfgang A. Wall (Technical University of Munich) Dr Daniel Hoeche (Helmholtz-Zentrum Hereon) Prof. Christian J. Cyron (Helmholtz-Zentrum Hereon)

Presentation materials