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

BUG: Integration on facets fails in hexahedral meshes #3874

Open
enricofacca opened this issue Nov 20, 2024 · 2 comments · May be fixed by firedrakeproject/tsfc#331
Open

BUG: Integration on facets fails in hexahedral meshes #3874

enricofacca opened this issue Nov 20, 2024 · 2 comments · May be fixed by firedrakeproject/tsfc#331
Labels

Comments

@enricofacca
Copy link

Describe the bug
If I understood correctly, there was a recent update to the tsfc repository #firedrakeproject/tsfc@1944432 that should make possible to compate integrals on facets in hexahedral meshes. Before it was not supported.

However, the following MVE produces the error messages shown below.
The same error occurs using ds (external facets ) in place of dS.

Enrico

from firedrake import *

mesh = UnitCubeMesh(2,2,2,hexahedral=True)

W = FunctionSpace(mesh, "DQ", 0)
u = Function(W)
v = TestFunction(W)


h = CellSize(W.mesh())
h_avg = (h('+') + h('-'))/2

a_dg = - 4.0/h_avg * jump(u)* jump(v) * dS
A = assemble(a_dg)

Error message

File "/home/firedrake/firedrake/src/tsfc/tsfc/fem.py", line 115, in use_canonical_quadrature_point_ordering
    return isinstance(self.fiat_cell, UFCHexahedron) and self.integral_type in ['exterior_facet', 'interior_facet']
                                                         ^^^^^^^^^^^^^^^^^^
AttributeError: 'PointSetContext' object has no attribute 'integral_type'

Environment:

  • OS: Ubuntu
  • Python version: 3.12.3
  • Output of Firedrake Configuration:
    package_manager: False
    minimal_petsc: False
    mpicc: /home/firedrake/petsc/packages/bin/mpicc
    mpicxx: /home/firedrake/petsc/packages/bin/mpicxx
    mpif90: /home/firedrake/petsc/packages/bin/mpif90
    mpiexec: /home/firedrake/petsc/packages/bin/mpiexec
    disable_ssh: True
    honour_petsc_dir: True
    with_parmetis: False
    slepc: True
    packages: ['git+ssh://bitbucket.org/pefarrell/fascd.git@master#egg=fascd', 'git+ssh://github.com/firedrakeproject/gusto.git@main#egg=gusto', 'git+ssh://github.com/icepack/icepack.git#egg=icepack', 'git+ssh://bitbucket.org/pefarrell/fascd.git@master#egg=fascd', 'git+ssh://github.com/FEMlium/FEMlium.git@main#egg=FEMlium', 'git+ssh://github.com/g-adopt/g-adopt.git@master#egg=gadopt', 'git+ssh://github.com/icepack/icepack.git#egg=icepack', 'git+ssh://github.com/firedrakeproject/asQ.git@master#egg=asQ', 'git+ssh://github.com/firedrakeproject/gusto.git@main#egg=gusto', 'git+ssh://github.com/firedrakeproject/Irksome.git#egg=Irksome', 'git+ssh://github.com/thetisproject/thetis#egg=thetis', 'git+ssh://github.com/g-adopt/g-adopt.git@master#egg=gadopt', 'git+ssh://github.com/firedrakeproject/Irksome.git#egg=Irksome', 'git+ssh://github.com/thetisproject/thetis#egg=thetis', 'git+ssh://github.com/FEMlium/FEMlium.git@main#egg=FEMlium', 'git+ssh://bitbucket.org/pefarrell/defcon.git@master#egg=defcon', 'git+ssh://github.com/firedrakeproject/asQ.git@master#egg=asQ', 'git+ssh://bitbucket.org/pefarrell/defcon.git@master#egg=defcon']
    honour_pythonpath: False
    opencascade: False
    torch: cpu
    jax: cpu
    petsc_int_type: int32
    cache_dir: /home/firedrake/firedrake/.cache
    complex: False
    remove_build_files: False
    with_blas: None
    netgen: True
    Additions:
    None
    Environment:
    PYTHONPATH: None
    PETSC_ARCH: default
    PETSC_DIR: /home/firedrake/petsc
    Status of components:

|Package |Branch |Revision |Modified |

|FEMlium |main |7810749 |True |
|FInAT |master |d8836d5 |True |
|Irksome |master |1ecf180 |True |
|PyOP2 |master |31471a60 |False |
|asQ |master |fad5ccc |True |
|defcon |master |da0864d |True |
|fascd |master |2004948 |True |
|fiat |master |d167922 |True |
|firedrake |master |ed826a575 |False |
|g-adopt |master |ef38dba |True |
|gusto |main |cdd29825 |True |
|h5py |firedrake |db2ab02f |True |
|icepack |master |cc65af5 |True |
|libsupermesh |master |1eccc99 |True |
|loopy |main |b2c485f3 |True |
|pyadjoint |master |167619a |True |
|pytest-mpi |main |ee30587 |True |
|thetis |master |8c6f9d1e |True |
|tsfc |master |e06308d |True |
|ufl |master |0ae483bd |True |

@connorjward
Copy link
Contributor

@ksagiyam can you take a look?

@ksagiyam
Copy link
Contributor

Could you check if firedrakeproject/tsfc#331 fixes your issue?

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

Successfully merging a pull request may close this issue.

3 participants