Skip to content
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

Add fuse element infrastructure #127

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Conversation

indiamai
Copy link

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

FIAT/polynomial_set.py Outdated Show resolved Hide resolved
# 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.

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.

2 participants