Skip to content

C1 continuous functionspace (hermite) for interval and quad mesh in dolfinx #869

Open

Description

@bagla0
dolfinx.fem.functionspace(mesh_r, basix.ufl.element(
    "HER", 'interval', 2, shape=(3, )))
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
File /usr/lib/python3/dist-packages/basix/finite_element.py:903, in string_to_family(family, cell)
    902 try:
--> 903     return families[family]
    904 except KeyError:

KeyError: 'HER'

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
Cell In[6], line 1
----> 1 dolfinx.fem.functionspace(mesh_r, basix.ufl.element(
      2     "HER", 'interval', 2, shape=(3, )))

File /usr/lib/python3/dist-packages/basix/ufl.py:1988, in element(family, cell, degree, lagrange_variant, dpc_variant, discontinuous, shape, symmetry, dtype)
   1985     if family == "DPC":
   1986         discontinuous = True
-> 1988     family = _basix.finite_element.string_to_family(family, cell.name)
   1990 # Default variant choices
   1991 EF = _basix.ElementFamily

File /usr/lib/python3/dist-packages/basix/finite_element.py:905, in string_to_family(family, cell)
    903     return families[family]
    904 except KeyError:
--> 905     raise ValueError(f"Unknown element family: {family} with cell type {cell}")

ValueError: Unknown element family: HER with cell type interval

Similarly for quad mesh,

dolfinx.fem.functionspace(mesh, basix.ufl.element(
    "HER", 'quadrilateral', 2, shape=(3, )))
ValueError: Unknown element family: HER with cell type quadrilateral

I don't find any option to implement C1 continuity requirement for dolfinx. Can you provide a way to solve this issue which is available and tested?

Activity

  1. mscroggs commented on Oct 25, 2024

    @mscroggs
    Member

    A Hermite Basix element can be created using basix.create_element but C1 continuous elements are not yet supported in FFCx so these will not work with DOLFINx

  2. bagla0 commented on Oct 25, 2024

    @bagla0
    Author

    Thanks @mscroggs for the quick response.

    Is there any example or method available in dolfinx, where they solved this C1 requirement through an alternative way? My weak form contains second order derivative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions