Skip to content

Conversation

@indiamai
Copy link

Add the code required to use a fuse element as the base for a FIAT element

# is extended to match the larger

sd = ref_el.get_spatial_dimension()
if A.get_embedded_degree() != B.get_embedded_degree():

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".

Suggested change
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:

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.

Copy link
Author

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.

@pbrubeck
Copy link

pbrubeck commented Feb 21, 2025

There's a stale PR where we tried to add the Hypercube class: #68.
I think it'd be better to do that in a separate PR, either by rebasing the existing one or opening a new one.

@indiamai
Copy link
Author

There's a stale PR where we tried to add the Hypercube class: #68. I think it'd be better to do that in a separate PR, either by rebasing the existing one or opening a new one.

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.

@indiamai indiamai marked this pull request as draft February 21, 2025 16:45
Comment on lines +521 to +522
return (self.get_vertices()[self.get_topology()[dim][entity_id][0]],)
# return (self.get_vertices()[entity_id], )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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], )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants