Nonlinear solver fails on a simple problem with fields defined over subdomains
- Dominant language
- Julia
- Stars
- 879
- Forks
- 119
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 4
Description
Hello,
I'm setting up a coupled non-linear PDE system, where some of the fields are only defined over a subdomain. When removing all non-linearities in the system, I can solve the system with no problem using the AffineFEOperator to set up the system. However, when I try to solve the system (both with and without the non-linear terms) using the **NLSolver** an **AssertionError** is triggered by the **solve** function.
To reproduce the error I made an MWE, where two linear poisson equations are defined over two different subsets of the domain. The expected result is a constant solution of each field over its respective subdomain. While solving the problem with the AffineFEOperator works with no issues, the NLSolver yields the above mentioned AssertionError in the solve step.
Is this behaviour expected? If yes, how do I need to change the implementation to avoid triggering the assert?
I'm using Julia 1.8.1 with Gridap 0.17.14.
[mwe_assertion_error.zip](https://github.com/gridap/Gridap.jl/files/9585790/mwe_assertion_error.zip)
Contributor guide
Research direction
Start by running the attached MWE and compare the AffineFEOperator path with the NLSolver path on the two Poisson equations over separate subdomains. Read the NLSolver solve entry point where the AssertionError is triggered, then determine whether the behavior is expected and what implementation change avoids it. Done means the MWE solves without triggering the assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100