-
Notifications
You must be signed in to change notification settings - Fork 7
Add fuse element infrastructure #127
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
base: main
Are you sure you want to change the base?
Conversation
Renaming + adding to install
FIAT/polynomial_set.py
Outdated
| # is extended to match the larger | ||
|
|
||
| sd = ref_el.get_spatial_dimension() | ||
| if A.get_embedded_degree() != B.get_embedded_degree(): |
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 need to check also for the continuity of the expansion sets. We throw a ValueError if they are different. This logic would only work for discontinuous expansion sets, and break if the expansion set continuity is "C1".
| if A.get_embedded_degree() != B.get_embedded_degree(): | |
| if A.get_embedded_degree() != B.get_embedded_degree() and continuity is None: |
| embedded_coeffs.append(numpy.append(coeff, [0 for i in range(diff)])) | ||
| embedded_coeffs = numpy.array(embedded_coeffs) | ||
| new_coeffs = numpy.array(list(embedded_coeffs) + list(higher.coeffs)) | ||
| else: |
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.
this case works if A and B have the same continuity and degree.
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 guess then this function still needs to handle the case where A and B are not discontinuous but don't have the same degree. I haven't encountered this yet but will add it as a note in the function.
|
There's a stale PR where we tried to add the Hypercube class: #68. |
At the moment this is very much just a mechanism to make the fuse ones work. I haven’t changed the existing ones to inherit from it or anything, but if this ends up being the way forward that works I’ll consider doing the refactor properly and using the stale pr as a start point. |
| return (self.get_vertices()[self.get_topology()[dim][entity_id][0]],) | ||
| # return (self.get_vertices()[entity_id], ) |
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.
| return (self.get_vertices()[self.get_topology()[dim][entity_id][0]],) | |
| # return (self.get_vertices()[entity_id], ) | |
| vid, = self.topology[dim][entity_id] | |
| return (self.get_vertices()[vid], ) |
… with tensorproduct cell
Co-authored-by: Pablo Brubeck <brubeck@protonmail.com> Co-authored-by: Connor Ward <c.ward20@imperial.ac.uk>
* move as_cell to finat
Add the code required to use a fuse element as the base for a FIAT element