Hi Henrik, On 14/12/15 11:31, Buesing, Henrik wrote:
Dear all,
I tried to build a mixed space with periodic bc on two of the subspaces:
meshbase = RectangleMesh(Nx, Ny, Lx, Ly, quadrilateral=True)
mesh = ExtrudedMesh(meshbase, Nz, Delta_z)
horiz_elt = FiniteElement("DG", quadrilateral, 0)
DG1 = FunctionSpace(mesh, horiz_elt)
This makes a non-periodic mesh and a DG1 function space on it.
meshbase = PeriodicRectangleMesh(Nx, Ny, Lx, Ly, quadrilateral=True)
mesh = ExtrudedMesh(meshbase, Nz, Delta_z)
horiz_elt = FiniteElement("DG", quadrilateral, 0)
DG2 = FunctionSpace(mesh, horiz_elt)
DG3 = FunctionSpace(mesh, horiz_elt)
Now you make a /different/ periodic mesh and build two more function spaces on it.
W = DG1 * DG2 * DG3
This builds a mixed space for the full 3 field system. But DG1 and (DG2/DG3) are defined on different meshes, so there is no coupling between them.
but got an error message (see below).
Is there a way to set periodic bc on two of the three subspaces?
I think there's a little confusion going on as to how periodic bcs work. We implement periodic boundary conditions by make a /topologically/ connected mesh, but using a discontinuous coordinate field. So the PeriodicRectangleMesh is /topologically/ a torus but "looks like" just a normal rectangle because the coordinates are associated with the cells, not the mesh vertices. So the way we implement periodic boundary conditions is that the dof associated with the periodic mesh entities is actually the same dof (rather than somehow being mapped). Note that since all your fields are DG all of the dofs are associated with cells. What you've attempted to do above is definitely unsupported: we don't know how to build the couplings between the two unrelated meshes. Can you describe what you're attempting to achieve? Do you want two of the fields to have periodic bcs and the third one to have somehow a non-periodic source/sink bc or something similar? Cheers, Lawrence