ElmerCSC / elmerfem

Official git repository of Elmer FEM software
http://www.elmerfem.org
Other
1.14k stars 310 forks source link

cleanup, organization, and modularization #202

Open Foadsf opened 4 years ago

Foadsf commented 4 years ago

I took a look at Elmer's codebase, and I should say, to be frank, it is not well organized at all. It seems more of a code dump written and patched over the years without proper organization. Many of the folders don't have README files and the ones which do, sometimes do not offer proper information about the content of that folder. Plain text has also been used instead of modern MarkUp languages such as MarkDown, AsciiDoc, or reStructuredText ...

I think the codebase should be split into several different repositories under the ElmerCSC GitHub organization:

Qxb9ABXnml

raback commented 4 years ago

I agree in large extent on the observations. However, all reorganization is not as easy and often falls down on resources. Also one main concern on reorganization is indeed the fact that are many branches that should be merged in the future. In ideal world branches would indeed be short-lived.

For me personally this does not always happen since some feature turns out to be take more work than anticipated and is left there there for longer times. However, there are also huge development branches related to novel developments in the size of a PhD thesis. Ideally these would also be frequently merged. However, I do have certain understanding why not to merge. These are often primarily research projects on the bleeding edge rather than software development projects. Still it would of course be good to merge at least devel to the feature branch frequently. I think that if there are conflicts many researchers rather opt not to mess with their branch and rather finish the next paper etc.

Also the cmake build system causes some inertia. If you reorganize the code tree you also need to address the cmake files ect. As an afterthought it would probably have been better to make the cmake very modular. This would also have helped in the compilation issues.

The bundled codes is also an issue. For example, Zoltan, Arpack and Lua have been edited and the code is not the same. At the time when they were included there were no readily available packages in all the platforms needed. At least there is a cmake, but there might be something else too. Lapack is only used if blas libraries are not present.

All this said, it would be easy to reorganize the stuff without dependencies. Take ElmerPost and ElmerParam out, maybe reorganize some directories etc. and rewrite the Readme's. I'm hesitant to put a lot of effort to fix things that are not really broken but just look bad from today's perspective. Of course, would there be a rapture in package management it would make sense to consider many of these choices.

ReedyBear commented 3 years ago

I'll sum up my thoughts from a twitter thread.

ReedyBear commented 3 years ago

After catching up on this discussion, here are my thoughts: