Skip to content

Refactor boundary condition #326

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

Merged

Conversation

isteinbrecher
Copy link
Collaborator

Follows #325 #324 (this PR already includes the changes made in those PRs).

This PR refactors the boundary condition framework. Previously, we had both a general boundary condition base class and a separate boundary condition in the 4C folder. However, the 4C implementation included general-purpose functionality that wasn’t truly specific to 4C.

This PR proposes using the general boundary condition class for 4C meshes as well, which seems reasonable since all necessary data can be stored in the BaseMeshItem.data attribute.

Once this is merged, this should serve as a starting point for refactoring the Coupling.

Other points:

  • I decided to rename the argument bc_dict to data, this should not break any interfaces, but internally is more consistent and general in my opinion.
  • The "create a BoundaryCondtion from an existing yaml file functionality was moved to input_file.py which makes much more sense in my opinion.
  • With the new structure, a few places where we had to do imports inside a function to avoid cyclic dependencies was resolved.

@isteinbrecher isteinbrecher force-pushed the refactor-boundary-condition branch from aeef9cb to a71d69d Compare April 16, 2025 13:48
Copy link
Collaborator

@davidrudlstorfer davidrudlstorfer left a comment

Choose a reason for hiding this comment

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

Nice cleanup!

@isteinbrecher isteinbrecher merged commit 0609cfb into imcs-compsim:main Apr 17, 2025
10 checks passed
@isteinbrecher isteinbrecher deleted the refactor-boundary-condition branch April 17, 2025 12:15
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.

2 participants