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

Use precomputed composition of to-interior-faces and opposite-faces #166

Open
inducer opened this issue Sep 8, 2021 · 2 comments
Open

Comments

@inducer
Copy link
Owner

inducer commented Sep 8, 2021

cc @kaushikcfd

Need to check that this makes four (for tets), not 16 interpolation batches

@nchristensen
Copy link

If this can help with the resample_by_picking bottleneck I could look into this. What is the idea here compared with what we're currently doing?

@inducer
Copy link
Owner Author

inducer commented Feb 15, 2022

Right now, flux computations first compute a boundary restriction and then use this "opposite face swap" connection to obtain the value on the opposite face. That means that the results of the "opposite face swap" go through two rounds of resample_by_picking:

grudge/grudge/trace_pair.py

Lines 249 to 255 in 2c14ece

i = project(dcoll, "vol", "int_faces", vec)
def get_opposite_face(el):
if isinstance(el, Number):
return el
else:
return dcoll.opposite_face_connection()(el)

when one should suffice (namely, the composition of boundary restriction and opposite face swap). There also already is machinery to compute compositions of arbitrary connections:

https://documen.tician.de/meshmode/connection.html#meshmode.discretization.connection.flatten_chained_connection

What would be involved in fixing this is

  • verifying that flatten_chained_connection does a reasonable job on that composition, specifically: the connection it generates remains "pickable" (doesn't use interpolation) and has one interpolation batch per face. That should become a test.
  • reworkomg interior_face_pairs to compute, cache, and use that composition.

Help is definitely welcome here.

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

No branches or pull requests

2 participants