-
Notifications
You must be signed in to change notification settings - Fork 247
dsl/compiler: Fix&tidy PETSc mixed solver functionality #2626
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## petsc #2626 +/- ##
==========================================
- Coverage 85.39% 84.69% -0.70%
==========================================
Files 261 265 +4
Lines 50604 51307 +703
Branches 4326 4351 +25
==========================================
+ Hits 43211 43453 +242
- Misses 6667 7126 +459
- Partials 726 728 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| # Precedence rules make it possible to reconstruct objects that depend on | ||
| # higher priority objects | ||
| keys = [Bundle, Array, DiscreteFunction, AbstractIncrDimension, BlockDimension] | ||
| keys = [Bundle, Array, Differentiable, DiscreteFunction, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add Differentiable here? Is it possible to add a test to test_iet covering this specific case (or at least for me to understand)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FabioLuporini The problem arises from my new class PetscBundle(Bundle), whose components are PETScArrays. In the abstract_objects function, the mapper must be updated for the components before the PetscBundle itself. PETScArray inherits from ArrayBasic and Differentiable. However, I can't use ArrayBasic because Bundle also inherits from it. So I chose Differentiable as the distinguishing type (to avoid using PETScArray)
EdCaunt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, mainly minor things and code style
| """The interior SubDomain of the Grid.""" | ||
| return self.subdomains['interior'] | ||
|
|
||
| @property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cache this I think? Maybe sympy's handling already does though? @FabioLuporini
compiler: Add Devito+PETSc MPI test
Add PETSc logging infrastructure
A portion of this PR involves code reorganisation and general cleanup.
Key additions:
PetscBundleinsidepetsc/types/array.pypetsc/types/types.pyto help simplify PETScSolvePetscBundleuse insidepetsc/iet/routines.pyto fix mixed solver functionality02_biharmonic.py