Use overintegration in WADG - #354
Draft
MTCam wants to merge 6 commits into
Draft
Conversation
inducer
reviewed
Jul 23, 2024
Comment on lines
+852
to
+855
| inv_area_elements = 1/project( | ||
| dcoll, dd_base, dd_quad, area_element( | ||
| actx, dcoll, dd=dd_base, | ||
| _use_geoderiv_connection=actx.supports_nonscalar_broadcasting)) |
Owner
There was a problem hiding this comment.
The area element is already nonlinear. Its computation should take place on the target discretization.
| "ij,ej->ei", | ||
| ref_inv_mass, | ||
| vec, | ||
| tagged=(FirstAxisIsElementsTag(),)) |
Owner
There was a problem hiding this comment.
Please use axis tags, not this. Also below.
Comment on lines
+865
to
+868
| # Compute 1/J * vec | ||
| def apply_jinv_to_vec(jac_inv, vec): | ||
| return actx.einsum( | ||
| "ei,ej->ei", |
Owner
There was a problem hiding this comment.
Do you mean just * here, i.e. element-wise multiplication? This einsum will sum over each element!
Comment on lines
+832
to
+837
| if dd_out != dd_in: | ||
| raise ValueError( | ||
| "Cannot compute inverse of a mass matrix mapping " | ||
| "between different element groups; inverse is not " | ||
| "guaranteed to be well-defined" | ||
| ) |
Owner
There was a problem hiding this comment.
Why have both dd_in and dd_out, if having them differ is not appropriate?
CollaboratorAuthor
There was a problem hiding this comment.
I wondered that myself :). Copied from the original _apply_inverse_mass:
Line 798 in 23fbc05
| for grp, vec_i in zip(discr_base.groups, stage3) | ||
| ] | ||
| return DOFArray(actx, data=tuple(group_data)) |
Owner
There was a problem hiding this comment.
Why build many intermediate DOFArrays as opposed to constructing the final one in one go?
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change set is intended to update WADG to use overintegration (#173).
TODO:
_apply_inverse_mass_operator