deepmodeling / deepmodeling/jax-fem

Solve poisson problem with pure Neumann B.C.

Open
#67 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
754
Forks
133
PR merge metrics
No merged PRs in 30d

Description

Hey,

I was wondering how to solve a poisson problem with pure Neumann conditions?

In Fenics you would use a variational formulation utilizing 2 finite element spaces, one being 0th order: https://bitbucket.org/fenics-project/dolfin/src/master/python/demo/documented/neumann-poisson/demo_neumann-poisson.py.rst

```
# Build function space with Lagrange multiplier
P1 = FiniteElement("Lagrange", mesh.ufl_cell(), 1)
R = FiniteElement("Real", mesh.ufl_cell(), 0)
W = FunctionSpace(mesh, P1 * R)
```

But this wouldn't work in jax-fem since there are only order 1 and 2 elements implemented, right?
https://deepmodeling.github.io/jax-fem/_modules/jax_fem/basis.html#get_elements

In firedrake, you can pass a nullspace to the PetSc solver https://www.firedrakeproject.org/solving-interface.html#solving-singular-systems

Since PetSc solver are available this should be possible but I don't really understand how to do this in jax-fem

Would be happy for any tips/recommendations

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.