Skip to content

22 integrate the kratos computation into the same snakefile for example linear elastic plate with hole #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

joergfunger
Copy link
Member

@joergfunger joergfunger commented Aug 22, 2025

I have added kratos here to the "new" Snakefile and now both tools have the same structure. This is integrated into a hierarchical Snakefile structure with a documentation in the README of the linear elastic benchmark, please have a look at that. The fenics subworkflow is purely the simulation, in kratos there are multiple steps for generating input files, converting meshes and collecting outputs as separate steps. The analytical solution is also moved to the general directory and integrated into a new class. In order to avoid mistakes (implementing the solution twice, once in text and once in an evaluable expression), I have also converted the text output of the function into a sympy representation, such that we define the exact solution only once, and then the string output is generated automatically. There might be some performance slow downs for the evaluate, though I have used lambda functions to evaluate the sympy expression and at least for our case it seems as fast as the original implementation.
There is still a fenics_nextflow directory under the linear_elastic.benchmark, this has to be removed in the future and just another nextflow workflow to be added in parallel to the Snakefile (and potentially in a similar way into a hierarchical structure with a nextflow subworkflow in each subdirectory related to the tools). We might also clean up the directory structure (e.g. placing parameter files , or the environments, or the python files in separate directories, but that could also be done later. It would also be nice to somehow think about test cases, at least on an integration test level, e.g. be running the workflow for each tool, collecting the metrics files and testing those (even though this is not fully correct, since e.g. when the version of a tool is changed that workflow might still work, just the output of the tool has changed - which is not what we want to test). But maybe that is also a subsequent issue, but important as soon as the others are integrating their own stuff.

Copy link
Member

@srosenbu srosenbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I corrected the patterns for the output data. Apart from that I like the changes and this is a good structure to build upon later

@joergfunger joergfunger merged commit 8abcd65 into main Aug 22, 2025
2 of 3 checks passed
@joergfunger joergfunger deleted the 22-integrate-the-kratos-computation-into-the-same-snakefile-for-example-linear-elastic-plate-with-hole branch August 22, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate the kratos computation into the same snakefile for example linear elastic plate with hole
2 participants