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

integrals do not work for simplices when overintegrating #365

Open
MTCam opened this issue Sep 25, 2024 · 0 comments · May be fixed by #364
Open

integrals do not work for simplices when overintegrating #365

MTCam opened this issue Sep 25, 2024 · 0 comments · May be fixed by #364

Comments

@MTCam
Copy link
Collaborator

MTCam commented Sep 25, 2024

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 <genexpr>
    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 = <meshmode.discretization.poly_element.QuadratureSimplexElementGroup object at 0x1341a2450>
in_grp = <meshmode.discretization.poly_element.QuadratureSimplexElementGroup object at 0x1341a2450>

    @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

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

Successfully merging a pull request may close this issue.

1 participant