Mixed spaces over different meshes is currently supported in an experimental branch (logg/topic-multimesh). I expect to merge this in soon after the release of 1.4.
-- Anders On Mon, May 26, 2014 at 11:03:23AM +0200, Martin Sandve Alnæs wrote: > There is no support for mixed spaces over different space (yet). It may or may > not appear in some later version, but don't hold your breath. > > Martin > > > On 24 May 2014 08:23, André Timótheo <[email protected]> wrote: > > Hi, > > I need some help. > > I can not understand the relationship of global functions in mixed > functions spaces of two different meshes on the assembled system matrix. > > The code below illustrates my point. > > from dolfin import * > > mesh1 = UnitIntervalMesh(4) > mesh2 = UnitIntervalMesh(2) > > V1 = FunctionSpace(mesh1, "CG", 2) # 9 Lagrange global functions of > degree 2 > V2 = FunctionSpace(mesh2, "CG", 1) # 3 Lagrange global functions of > degree 1 > > V = V1 * V2 > > (u1, u2) = TrialFunctions(V) > v1 = TestFunction(V1) > > a = (inner(grad(u1), grad(v1)) * dx) + (inner(grad(u2), grad(v1)) * > dx) > > A = assemble(a) > > V1_dofs = V.sub(0).collapse(mesh1)[1].values() > V2_dofs = V.sub(1).collapse(mesh2)[1].values() > > print 'V1 dofs = ', V1_dofs > print 'V2 dofs = ', V2_dofs > > print 'A = ', A.array() > > I would expect to find three V2 dofs associated with the functions of > space V2. Mesh2 has only 3 nodes. But there are five V2 dofs = [4, 2, 6, > 9, > 13]. There is no problem with V1 dofs = [0, 1, 3, 5, 7, 8, 10, 11, 12]. > There are 5 mesh nodes and the midpoints of its elements. The assembled > system matrix do not have 12 columns. > > I can t understand it. Any help will be appreciated. Thanks for > availability. > > Andre Machado > > > p.s.: I disturb the FEniCS q&a first... > > http://fenicsproject.org/qa/3561/ > dof-map-of-mixed-space-over-different-meshes > > This is from line 483 of site-packages/functions/functionspace.py: > > #if not all(V.mesh() == spaces[0].mesh() for V in spaces): > # cpp.dolfin_error("functionspace.py", "Nonmatching meshes for > mixed function space: " \ > # + str([V.mesh() for V in spaces])) > > > > _______________________________________________ > fenics mailing list > [email protected] > http://fenicsproject.org/mailman/listinfo/fenics > > > > _______________________________________________ > fenics mailing list > [email protected] > http://fenicsproject.org/mailman/listinfo/fenics _______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
