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

Uncaught Exception from the no-flux steady-state diffusion example #952

Closed
guyer opened this issue Sep 18, 2023 Discussed in #951 · 2 comments
Closed

Uncaught Exception from the no-flux steady-state diffusion example #952

guyer opened this issue Sep 18, 2023 Discussed in #951 · 2 comments

Comments

@guyer
Copy link
Member

guyer commented Sep 18, 2023

Discussed in #951

Originally posted by CalebDmArcher September 18, 2023
I am trying the last example from examples/diffusion/mesh1D.py which is the "Fully implicit solutions are not without their pitfalls, particularly in steady state..." section.

The code of the steady-state part got the error "RuntimeError: Factor is exactly singular" which comes from the code DiffusionTerm(coeff=D).solve(var=phi). Is it because the latest version of the library can catch and raise exceptions for the cases where there can be more than one solution for the PDE?

@guyer
Copy link
Member Author

guyer commented Sep 18, 2023

Some solvers, e.g., PETSc, are willing to return one of the infinite possible solutions.
Others, e.g., SciPy, raise an exception.

The example should be more robust.

@guyer
Copy link
Member Author

guyer commented Feb 22, 2024

Fixed by #1015

@guyer guyer closed this as completed Feb 22, 2024
@guyer guyer changed the title Question about Uncaught Exception from the example mesh1D.py Uncaught Exception from the no-flux steady-state diffusion example Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant