Conversation
grudge/op.py
Outdated
| inv_area_elements = 1/project( | ||
| dcoll, dd_base, dd_quad, area_element( | ||
| actx, dcoll, dd=dd_base, | ||
| _use_geoderiv_connection=actx.supports_nonscalar_broadcasting)) |
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(),)) |
There was a problem hiding this comment.
Please use axis tags, not this. Also below.
grudge/op.py
Outdated
| # Compute 1/J * vec | ||
| def apply_jinv_to_vec(jac_inv, vec): | ||
| return actx.einsum( | ||
| "ei,ej->ei", |
There was a problem hiding this comment.
Do you mean just * here, i.e. element-wise multiplication? This einsum will sum over each element!
grudge/op.py
Outdated
| 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" | ||
| ) |
There was a problem hiding this comment.
Why have both dd_in and dd_out, if having them differ is not appropriate?
There was a problem hiding this comment.
I wondered that myself :). Copied from the original _apply_inverse_mass:
Line 798 in 23fbc05
grudge/op.py
Outdated
| for grp, vec_i in zip(discr_base.groups, stage3) | ||
| ] | ||
|
|
||
| return DOFArray(actx, data=tuple(group_data)) |
There was a problem hiding this comment.
Why build many intermediate DOFArrays as opposed to constructing the final one in one go?
This change set is intended to update WADG to use overintegration (#173).
TODO:
_apply_inverse_mass_operator