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

L2ProjectionInverseDiscretizationConnection should allow modal output #206

Open
inducer opened this issue Jun 2, 2021 · 0 comments
Open

Comments

@inducer
Copy link
Owner

inducer commented Jun 2, 2021

This could avoid the forced (and possibly un-needed) modal-to-nodal conversion at the end of the connection:

return DOFArray(
actx,
data=tuple(
actx.einsum("ij,ej->ei",
vandermonde_matrix(grp),
c_i,
arg_names=("vdm", "coeffs"),
tagged=(FirstAxisIsElementsTag(),))
for grp, c_i in zip(self.to_discr.groups, coefficients)
)
)

I think this is easy to do since it receives a connection as input. It just needs to check whether the output side of the connection is modal, and if so, skip the extra conversion to nodal.

I noticed this while reviewing #192.

cc @alexfikl @thomasgibson

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

No branches or pull requests

1 participant