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

Clarification re. duplicate additions of the boundaries #246

Open
jcgraciosa opened this issue Sep 23, 2024 · 1 comment
Open

Clarification re. duplicate additions of the boundaries #246

jcgraciosa opened this issue Sep 23, 2024 · 1 comment
Assignees

Comments

@jcgraciosa
Copy link
Contributor

Both essential and natural BCs are added (using PetscDSAddBoundary_UW) in the setup_discretisation method defined in petsc_generic_snes_solvers.pyx. In turn, the setup_discretisation method is called in build (or rebuild_after_mesh_update) function. This build function is then called in the solve functions defined in the generic solvers. However, setup_discretisation is also called in the solve of the child classes (e.g. SNES_AdvectionDiffusion). This results to duplicate addition of the essential and natural BCs.

Is this okay?

@lmoresi
Copy link
Member

lmoresi commented Oct 1, 2024

We got a bit tied in knots with how the solver classes inherit functionality. They should not both be adding boundary conditions in this way though. I'm assigning @julesghub to clarify if there is a deliberate choice in here or a misunderstanding

lmoresi added a commit that referenced this issue Oct 17, 2024
There was a problem with the default naming of solvers which meant they were not respecting each other's namespace. Falling back to always numbering the solvers in a generic way (less error checking, fewer chances for user error).
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

No branches or pull requests

3 participants