FEniCS / dolfinx

Next generation FEniCS problem solving environment
https://fenicsproject.org
GNU Lesser General Public License v3.0
696 stars 172 forks source link

Mixed dimension assembly in C++ and form independence for subdomains #3262

Open jorgensd opened 3 weeks ago

jorgensd commented 3 weeks ago

This PR exposes the mixed (dimensional) assembly functions to C++ and adds a demo.

Some concerns popped up when doing this:

  1. For entity maps we compare shared pointers. This means that the user has to use the shared_ptr from the dolfinx::fem::FunctionSpace to get this to work. It would be nicer to have a mesh comparison operator, but that would be expensive.

Would resolve #3113.

This PR also simplifies the newly created mesh independent form creation (#3263) such that the user can send in integration entities.

Added additional test that exposes this feature in the context of sub-meshes for a rank-1 tensor.