This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Model with different elements dimensions or type

0 votes

Hello All,

I am looking for a command or example that shows how to merge or create a model with two different elements.

I would like to create a 2D model with triangles with 1D elements connecting some edges of theses triangles in the edges.

I was trying to run the model "demo_multimesh-poisson.py" to see if the command MultiMeshFunctionSpace could solve my problem, but it is giving the following error:

    V = MultiMeshFunctionSpace(multimesh, "Lagrange", 1)

TypeError: init() takes exactly 1 argument (4 given)

Some idea how to create a model with different element dimension?

Best Regards,

asked Jan 27, 2016 by RDOLL FEniCS User (2,230 points)

I'm not sure at all whether multimesh features can satisfy your needs. Neverheless the demo works fine for me. Are you sure that you are running recent development version of FEniCS? What's output of

from dolfin import *
info(dolfin_version())
info(git_commit_hash())

Dear Jan,

Here is the output from the dolfin:

>>> from dolfin import *
>>> info(dolfin_version())
1.6.0
>>> info(git_commit_hash())
unknown
>>> 

What is the best procedure to combine different meshes inside of fenics?

>>> info(dolfin_version())
1.6

This is quite strange. Official version should be 1.6.0 rather than 1.6. Nevertheless demo_multimesh-poisson.py appeared first in 1.7.0dev and multimesh Python interface was not complete in 1.6.0. That's why the demo does not work.

What is the best procedure to combine different meshes inside of fenics?

Multimesh functionality could be what you're searching for. But this pretty much depends on a specific needs.

Another possibility is some explicit (fixed-point like) coupling implemented by user, i.e. solve the problem on first mesh, transfer coupling data to second mesh (e.g. interpolation), solve the problem there, etc.

Thank you so much for your reply.

I am not sure that it's possible, here is draft of what I am looking for:

Parameterization draft

1 Answer

0 votes

DOLFIN doesn't presently support mixed cell meshes.

answered Feb 23, 2016 by Garth N. Wells FEniCS Expert (35,930 points)
...