Skip to content

Support for Petrov-Galerkin formulations #3989

@mfeuerle

Description

@mfeuerle

Describe new/missing feature

Fenicsx does not seem to support Petrov-Galerkin type discretizations, i.e. using different Trial and Test spaces, at the moment, see
https://fenicsproject.discourse.group/t/petrov-gelerkin-formulations-and-fenicsx/18369?u=mfeuerle
This seems to me like a major flaw, as these formulations are quite important e.g. for space-time variational formulations.

So this request is aimed at the support of different Trial and Test spaces, i.e. that variational formulations based on something like

U = fem.functionspace(msh, ("Lagrange", 1))
V = fem.functionspace(msh, ("Lagrange", 1))
u = ufl.TrialFunction(U)
v = ufl.TestFunction(V)

bcs = [fem.dirichletbc(uD,  dirichlet_dofs_U, U),
       fem.dirichletbc(0.0, dirichlet_dofs_V, V)]

are supported byFenicsx.

As far as i understand it, the assembly of the system matrix does not seem to be a problem (as Fenicsx is already capable of doing that, even if the spaces are not equal). The only step that is missing for the support of Petrov-Galerking formulations is a different approach on handling Dirichlet boundary conditions (using a homogenization approach, where the boundary condition is moved to the right-hand side and the according rows / columns are completely deleted from the system matrix, instead of setting the rows / columns in the system matrix to zero and placing a 1.0 on the diagonal, see also the link above).
Although this homogenization approach for boundary conditions is in theory not difficult, it might result in some structural changes, as the boundary conditions no longer effect only the system matrix but also the right hand side, e.g. dolfinx.fem.assemble_vector would need an addition argument bcs just like dolfinx.fem.assemble_matrix.

Further note: In a Petrov-Gelrkin formulation, the Trial and Test space are not required to have the same amount of dofs, in fact, the Test space might have more, resulting in a least-squares problem (as the matrix is no longer quadratic). This, of course, is mostly a question of choosing the right solver, e.g. QR decomposition instead of LU, and thus up to the user, but it might still be relevant to have in mind here.

Suggested user interface

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions