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

Fix boundary conditions #98

Merged
merged 16 commits into from
Oct 21, 2024
Merged

Fix boundary conditions #98

merged 16 commits into from
Oct 21, 2024

Conversation

Homingdung
Copy link
Collaborator

To allow DirichletBC(V, 0, ...) , the special case requires no computation for stage boundary condition, everything should be zero

@Homingdung Homingdung requested a review from rckirby October 14, 2024 16:38
Copy link
Collaborator

@rckirby rckirby 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 tackling this, it's long been a major annoyance. However, I tried out your change elsewhere (in test_stokes.py) and find that that is somehow broken. I expected stage value formulation to fail in that test since we haven't done similar updates to how that handles BC, but the classic stage-derivative form you attempted to fix is failing here. Please take a look.

irksome/stage.py Outdated Show resolved Hide resolved
irksome/getForm.py Outdated Show resolved Hide resolved
irksome/getForm.py Outdated Show resolved Hide resolved
irksome/getForm.py Outdated Show resolved Hide resolved
@pbrubeck pbrubeck force-pushed the mingdonghe/fix/zero-bc branch from f40e1a9 to 3f618be Compare October 18, 2024 15:17
@pbrubeck pbrubeck force-pushed the mingdonghe/fix/zero-bc branch from 3f618be to 52d56ef Compare October 18, 2024 15:31
@pbrubeck pbrubeck changed the title Fix shapeless zero bc Fix boundary conditions Oct 18, 2024
Copy link
Collaborator

@rckirby rckirby left a comment

Choose a reason for hiding this comment

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

I think this is very very clean. Except we have a technical corner case about no longer being able to do bounds-constrained projections for discrete boundary conditions.

irksome/stage.py Show resolved Hide resolved
gdats_cur[i] = gblah_cur[i][0]
Vbigi = stage2spaces4bc(bc, V, Vbig, i)
gcur = replace(bcarg, {t: t+C[i]*dt})
gcur = gcur - Vander_col[i] * bcarg
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here.

irksome/stage.py Show resolved Hide resolved
Copy link
Collaborator

@ScottMacLachlan ScottMacLachlan left a comment

Choose a reason for hiding this comment

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

Modulo answers to @rckirby 's questions about the bounds-constrained case, this all makes sense to me. Seems much cleaner than what we were doing, and resolves a few things as well! Many thanks!

@rckirby
Copy link
Collaborator

rckirby commented Oct 21, 2024 via email

@rckirby rckirby merged commit dc9f91c into master Oct 21, 2024
2 checks passed
@rckirby rckirby deleted the mingdonghe/fix/zero-bc branch October 21, 2024 14:00
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.

4 participants