Open keileg opened 3 weeks ago
Some of the functionality in po.models.geometry
may also be suited for this approach.
Some of the functionality in
po.models.geometry
may also be suited for this approach.
That's an interesting comment. Is there any chance this approach can help us with representation of tensors and their products?
Perhaps, it depends on what you mean. I suggest we discuss in person.
Background
In the Ad operator framework, the classes
SubdomainProjection
,MortarProjection
,Trace
andInvTrace
all represent mappings betweeen grid entities of various kinds. These are all implemented as projection matrices that, during parsing of an operator tree, are left multiplied with arrays and matrices. This is unsatisfactory for two reasons:Suggested change
The projection methods, say
SubdomainProjection.face_restriction()
, now returnpp.ad.SparseArrays
s. Instead, it should return a new slicer-object that roughly looks like this:Comments:
SubdomainProjection
,MortarProjection
etc.Regarding the divergence class
The class
pp.ad.Divergence
represents a differential operator rather than a mapping. This cannot readily be implemented as slicing, and although improvements should be possible there as well, it will not be part of this issue.Dependencies
This should be undertaken after #1181.