Determining whether Mixed Element or Mixed Function

Hello,

I am working on vibroacoustic simulation where elastic plate and air domain are coupled. After doing some research, I’ve noticed that there are two ways to define test functions and trial functions for each domain: one is by using mixed element, and the other one is by using mixed function.

I have tried to find some information regarding how to decide which approach to take, but I couldn’t, and I am wondering if anyone could clarify which approach is suitable or advantageous for which case.

Thank you in advance!!

The mixedelement will merge everything into a single dofmap, making the access to do efficient block preconditioning harder.

If you use the ufl.MixedFunctionSpace you can get ufl to set up a block structured problem that one can exploit the structure (see for instance:
SNES solver interface for standard, block and nest systems by jorgensd · Pull Request #3648 · FEniCS/dolfinx · GitHub) or the tests that have changed in that PR.

MixedFunctionSpace is also very useful when you have function spaces living on different meshes (a mesh and submesh of entities of the original mesh).

2 Likes

Thank you, dokken!!

It seems like I should probably use mixed functionspace since it’s easier to access each block, and also I am dealing with different meshes.

Now, my current understanding is that mixed functionspace is simpy superior to mixedelement, but is there cases where mixedelement is actually advantageous, such as, for instance, the performance for less complicated models on a single mesh?

Thank you in advance for your advice!!

The current API, pre the aforementioned pull request (and a similar one for LinearProblem) is easier for mixedelement than for mixedfunctionspace.

It will hopefully change soon and then I think for most cases I would use mixedfunctionspace.

There might be a few problems (with direct solvers on small grids) where the data locality in the mixed map might result in a speedup

Dear dokken,

Thank you for the very insightful answer to my question.
I will pay some attention in choosing which one to use for the time being, and I am looking forward to the future updates as well.

Thank you as always!!