integrals do not work for simplices when overintegrating
- Dominant language
- Python
- Stars
- 14
- Forks
- 18
- Avg merge
- 26m
- Merged PRs (30d)
- 1
Description
Using `elementwise_integral` or `integral` currently fails for simplices when *vec* arg lives on the quadrature domain. The observed error is:
```
> approx_surface_area = actx.to_numpy(op.integral(dcoll, dd, ones_volm))
test_grudge.py:212:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../grudge/reductions.py:304: in integral
dcoll, dd, vec * _apply_mass_operator(dcoll, dd, dd, ones)
../grudge/op.py:711: in _apply_mass_operator
data=tuple(
../grudge/op.py:713: in
reference_mass_matrix(
../grudge/op.py:691: in reference_mass_matrix
return get_ref_mass_mat(out_element_group, in_element_group)
../../miniforge3/envs/pristine2/lib/python3.11/site-packages/pytools/__init__.py:1008: in new_inner
result = inner(*args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
out_grp =
in_grp =
@keyed_memoize_in(
actx, reference_mass_matrix,
lambda out_grp, in_grp: (out_grp.discretization_key(),
in_grp.discretization_key()))
def get_ref_mass_mat(out_grp, in_grp):
if out_grp == in_grp:
return actx.freeze(
actx.from_numpy(
> mp.mass_matrix(out_grp.basis_obj(), out_grp.unit_nodes)
)
)
E AttributeError: 'QuadratureSimplexElementGroup' object has no attribute 'basis_obj'
../grudge/op.py:673: AttributeError
```
The issue can be reproduced by using #364 :
`pytest -k surface_area test_grudge.py`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.