Skip to content
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

Significantly simplified boundary condition application in the stepper #69

Merged

Conversation

mehdiataei
Copy link
Contributor

Use wp.static to avoid branching in the kernels for BCs that don't exist:

  1. No need to BC_Struct or DummyBC
  2. Much simpler application of BCs
  3. No 38% performance drop reported earlier
  4. The stepper function is 25% shorter now.
  5. Periodic BCs now work.

@hsalehipour hsalehipour self-requested a review October 7, 2024 20:16
Copy link
Collaborator

@hsalehipour hsalehipour left a comment

Choose a reason for hiding this comment

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

Thanks. Looks much cleaner now. There are some issues with the BC handling for ZouHe and Regularized that I have suggested proper changes.

xlb/operator/boundary_condition/bc_regularized.py Outdated Show resolved Hide resolved
xlb/operator/stepper/nse_stepper.py Outdated Show resolved Hide resolved
xlb/operator/stepper/nse_stepper.py Outdated Show resolved Hide resolved
xlb/operator/stepper/nse_stepper.py Outdated Show resolved Hide resolved
xlb/operator/stepper/nse_stepper.py Outdated Show resolved Hide resolved
xlb/operator/stepper/nse_stepper.py Outdated Show resolved Hide resolved
xlb/operator/stepper/nse_stepper.py Show resolved Hide resolved
@mehdiataei
Copy link
Contributor Author

Please review again. I completely rewrote the PR and managed to significantly improve the BC implementation.

@mehdiataei
Copy link
Contributor Author

This also fixes an issue that now we can have multiple boundary conditions of the same kind in a simulation.

@hsalehipour
Copy link
Collaborator

Very nice Work!

@hsalehipour hsalehipour merged commit 3843188 into Autodesk:major-refactoring Oct 8, 2024
11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants