Mixed elements with two different meshes
I am interested in a finite element formulation using two variables, which are sought in finite element spaces with different meshes.
Here is code for a contrived example:
# coarse mesh space
mesh = UnitSquare(1,1)
V = FunctionSpace(mesh, 'CG', 1)
# fine mesh space
mesh.refine()
W = FunctionSpace(mesh, 'CG', 1)
# product space
X = V + W
I would have thought that this resulted in a coarse mesh space (dimension 4) for the V variable and a finer mesh space
(dimension 9) for the W variable, so that the space X would have dimension 13. However this is not what happens, as
can be seen by printing the results:
-------> print(V)
<Function space of dimension 4 (<CG1 on a <triangle of degree 1>>)>
-------> print(W)
<Function space of dimension 9 (<CG1 on a <triangle of degree 1>>)>
-------> print(X)
<Function space of dimension 18 (<Mixed element: (<CG1 on a <triangle of degree 1>>, <CG1 on a <triangle of degree 1>>)>)>
Is it possible to accomplish what I am trying to do: have mixed elements with different meshes for the different components?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Doug Arnold for more information if necessary.