Skip to content

Conversation

@danielwolff1
Copy link
Contributor

In this PR, I implemented a method to export the mesh in exo format while dumping the .yaml input file.

When using the new method dump_with_exo_mesh(), cubitpy will automatically attach the XYZ GEOMETRY section to the yaml input file as well as omit the lengthy topology information, which will instead be inferred from the nodesets within 4C when reading in the exo mesh.

To fully enable this feature, I need to know which problems people at the institute are working with, in order to enable the output of the respective "GEOMETRY" section. Currently supported PROBLEMTYPEs are

  • Fluid
  • Structure

but more can be added if needed, by extending the problem_to_geometry_dict inside the add_problem_geometry_section() function.

@danielwolff1 danielwolff1 self-assigned this Jul 24, 2025
@danielwolff1 danielwolff1 added the enhancement New feature or request label Jul 24, 2025
@danielwolff1 danielwolff1 had a problem deploying to cubit_secrets_untrusted July 24, 2025 12:03 — with GitHub Actions Failure
@danielwolff1
Copy link
Contributor Author

@m-frey this might be interesting for you since we talked about it yesterday :)

Copy link
Collaborator

@isteinbrecher isteinbrecher left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the contribution @danielwolff1, this is surely a very useful feature!

Co-authored-by: Ivo Steinbrecher <[email protected]>
@danielwolff1 danielwolff1 had a problem deploying to cubit_secrets_untrusted July 28, 2025 09:30 — with GitHub Actions Failure
Copy link
Contributor Author

@danielwolff1 danielwolff1 left a comment

Choose a reason for hiding this comment

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

Thanks for the swift review! I'm going to address all your points and then we can have a chat to clarify the remaining open points.

@danielwolff1 danielwolff1 had a problem deploying to cubit_secrets_untrusted July 28, 2025 12:21 — with GitHub Actions Failure
@danielwolff1 danielwolff1 had a problem deploying to cubit_secrets_untrusted July 28, 2025 14:47 — with GitHub Actions Failure
@danielwolff1 danielwolff1 temporarily deployed to cubit_secrets_untrusted July 28, 2025 15:08 — with GitHub Actions Inactive
isteinbrecher
isteinbrecher previously approved these changes Jul 29, 2025
Copy link
Collaborator

@isteinbrecher isteinbrecher left a comment

Choose a reason for hiding this comment

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

Thanks for the additional effort @danielwolff1, this looks good to me! If we want we can add the functionality for multi field input files (e.g., FSI) in a follow up PR.

@danielwolff1 danielwolff1 temporarily deployed to cubit_secrets_untrusted August 9, 2025 16:58 — with GitHub Actions Inactive
@danielwolff1
Copy link
Contributor Author

Thanks for the additional effort @danielwolff1, this looks good to me! If we want we can add the functionality for multi field input files (e.g., FSI) in a follow up PR.

I now adapted the implementation and implemented a small test case to support the export of multiple fields. However, in the unit test, I decided not to replicate the correct definition of the boundary conditions from the 3D FSI tutorial, as the additional statements for creating the BCs would just blow up the test method and not really add anything, since the creation of the geometry section is independent of the creation of the boundary sections of the input files. Moreover, the latter are already tested in other functions.

If you are fine with my proposal, this can be merged, otherwise I can also still adapt the test accordingly.

Copy link
Collaborator

@isteinbrecher isteinbrecher left a comment

Choose a reason for hiding this comment

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

Thanks @danielwolff1 for these changes, very nice that we can now use the new 4C input features with directly reading exo files.

@danielwolff1
Copy link
Contributor Author

Thanks for the great review process and for approving, I'm going to merge now! 🚀

@danielwolff1 danielwolff1 merged commit 2e41a1a into imcs-compsim:main Aug 11, 2025
2 checks passed
@danielwolff1 danielwolff1 deleted the add-yaml-w-exo-export branch August 11, 2025 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants