Formulation well defined#646
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## fenicsx #646 +/- ##
===========================================
+ Coverage 98.34% 98.80% +0.45%
===========================================
Files 20 20
Lines 909 919 +10
===========================================
+ Hits 894 908 +14
+ Misses 15 11 -4 ☔ View full report in Codecov by Sentry. |
RemDelaporteMathurin
left a comment
There was a problem hiding this comment.
Just a small update in the comment and then we're good to go!
Thanks for this! 🎉
| not_defined_in_volume = self.volume_subdomains.copy() | ||
| for vol in self.volume_subdomains: | ||
| # check reactions | ||
| for reaction in self.reactions: | ||
| if vol == reaction.volume: | ||
| not_defined_in_volume.remove(vol) |
There was a problem hiding this comment.
What happened to sources?
Do we have a test for this case:
- 2 subdomains
- 2 species (one mobile, one immobile)
- 1 reaction in subdomain 1 only (involving the two species)
- 1 source term in subdomain 2 for the immobile species only
I think this should be allowed. In the current implementation, you would apply c_2 = 0 in subdomain 2 even though you have a source term there!
There was a problem hiding this comment.
Oh thinking about this more, since this is only for steady state, I think that this case would be ill-posed anyway. Let's keep it like this!
Co-authored-by: Rémi Delaporte-Mathurin <40028739+RemDelaporteMathurin@users.noreply.github.com>
Proposed changes
In the case of a steady-state simulation, the solver will break if every species does not have a definition in every volume subdomain within the model. This fix adds a term to the formulation for each species not defined with a given volume subdomain in a steady-state case.
Types of changes
What types of changes does your code introduce to FESTIM?
Checklist
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...