dolfinx icon indicating copy to clipboard operation
dolfinx copied to clipboard

Missing Real finite element

Open michalhabera opened this issue 7 years ago • 6 comments

Snippet

import dolfin
mesh = dolfin.UnitSquareMesh(dolfin.MPI.comm_world, 2, 2)
dolfin.FunctionSpace(mesh, ("Real", 0)).dofmap().dofs(mesh, 2)

returns

array([0, 1, 2, 3, 4, 5, 6, 7], dtype=int32)

but should return (as in 2018.1.0)

array([0, 0, 0, 0, 0, 0, 0, 0], dtype=int32)

In other words, Real works now as DG0, having one scalar per each cell, instead of one scalar per whole domain.

michalhabera avatar Oct 28 '18 21:10 michalhabera

Real element is not like QuadratureElement or any BaseElement subclass because it does not have local basis. In old dolfin such element would export num_global_dofs in the generated ffc code and this was then used in dolfin to construct dofmap.

As we do not want to interfere with dofmap construction in dolfinx, these globally supported spaces must be handled separately, yet allow to be assembled into block matrices with dense rows/columns.

michalhabera avatar Aug 25 '21 08:08 michalhabera

Hi team! Is this still planned for dolfinx?

RemDelaporteMathurin avatar Dec 15 '23 10:12 RemDelaporteMathurin

Hi @michalhabera @garth-wells , I looked amongst the various repos for Real elements and found a couple of issues/PRs to add a Real space.

Is it now supported? I found mentions of real elements in FFCX https://github.com/FEniCS/ffcx/blob/06957dbc7428256760a52a2a543eaca37a80bebf/ffcx/codegeneration/ufcx.h#L69

EDIT:

Also found a reference to real elements in basix

RemDelaporteMathurin avatar Mar 28 '24 20:03 RemDelaporteMathurin