Skip to content

Fix the first derivative operator for DirichletBC - #5

Merged
mrhardman merged 1 commit into
mainfrom
fix-first-derivative-for-DirichletBC
May 13, 2026
Merged

Fix the first derivative operator for DirichletBC#5
mrhardman merged 1 commit into
mainfrom
fix-first-derivative-for-DirichletBC

Conversation

@mrhardman

Copy link
Copy Markdown
Collaborator

This PR fixes a bug introduced in #3 where the first_derivative!() operator using the FirstDerivativeData() used an incorrect DirichletBC() when assembling the MM1D (mass) and PP1D (differentiation, no integration by parts) matrices. Before #3, there was no support for DirichletBC() in 1D.

This change makes sure that the MM1D and PP1D matrices are only assembled with either a NaturalBC or a PeriodicBC. This is done through a function interface first_derivative_boundary_condition() that returns a NaturalBC if a DirichletBC is stored in the FiniteElementCoordinate struct.

…nate struct can only see either a NaturalBC or a PeriodicBC. Create a function interface that returns a NaturalBC if a DirichletBC is stored in the FiniteElementCoordinate struct.
@mrhardman
mrhardman merged commit 70c9ee4 into main May 13, 2026
1 check passed
@mrhardman
mrhardman deleted the fix-first-derivative-for-DirichletBC branch May 13, 2026 08:36
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.

1 participant