-
Notifications
You must be signed in to change notification settings - Fork 159
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
Ksagiyam/submesh core #3478
base: master
Are you sure you want to change the base?
Ksagiyam/submesh core #3478
Conversation
9b8f70c
to
1e7c035
Compare
219240f
to
d555615
Compare
9b1d48b
to
23caf2e
Compare
f5afedb
to
824f2a5
Compare
76e89ef
to
7e3c248
Compare
b6a41e7
to
9c839e0
Compare
1167181
to
fc6545c
Compare
a76cca5
to
630bfb4
Compare
2fe02f9
to
8ba65d6
Compare
e204069
to
b8cc6f6
Compare
4958817
to
7cda1d3
Compare
da2063b
to
1b654c1
Compare
# This way of caching is fragile. | ||
# Should Implement _hash_key_() for ModifiedTerminal and use the entire mt as key. | ||
return (ufl_element, mt.local_derivatives, ctx.point_set, ctx.integration_dim, entity_id, coordinate_element, mt.restriction, domain._ufl_hash_data_()) |
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.
I believe this key should not depend on the mesh. We just need to call finat once, independently of mt.terminal
(and its domain).
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.
CoordinateMapping
uses mt.terminal
:
@serial_cache(hashkey=make_basis_evaluation_key)
def basis_evaluation(self, finat_element, mt, entity_id):
return finat_element.basis_evaluation(mt.local_derivatives,
self.point_set,
(self.integration_dim, entity_id),
coordinate_mapping=CoordinateMapping(mt, self))
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.
But internally it only cares about the element
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.
We should probably make CoordinateMapping only depend on the UFL element
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.
In concept that might be true, but we probably need refactoring. CoordinateMapping
also has:
def cell_size(self):
return self.interface.cell_size(self.mt.restriction)
which implicitly depends on domain
.
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.
Either way, as long as we pass mt
to basis_evaluation
, we need to use the entire mt
in the cache key to ensure that we can safely use mt.something_new
in the relevant parts of the code.
0ff324a
to
a3a573d
Compare
8dcdac2
to
474fa5d
Compare
Enable cell submesh.
Depends on:
UFL