Hi Hanie,
An ExtrudedMesh inherits boundary ids from the 'base mesh', plus the extra
identifiers "bottom" and "top". So, the sides x==0 through y==1 are id
1-4, because this is what the base mesh has. Then z==0 is "bottom" and
z==1 is "top".
However, your code is failing because (I believe) you're trying to set one
component of a VectorFunctionSpace to 0. Firedrake allows you to do this
on normal meshes, but doesn't yet support this on extruded meshes, hence
the error message. (You could set all components of the vector to 0 by
using just wSpace.sub(0), but presumably this isn't what you want).
There are various workarounds you could use for now, such as setting the
boundary condition weakly, but they're not completely satisfying.
Andrew
On 1 August 2016 at 21:15, Hanie Joodat <hanie.joodat88(a)gmail.com> wrote:
> Dear all,
>
> I want to enforce DirichletBCs on an extruded mesh. For a normal unit cube
> tetrahedron mesh I could use the following face ID's:
>
> 1: x ==0
> 2: x==1
> 3: y==0
> 4: y==1
> 5: z==0
> 6: z==1
>
> However, when I do the following:
>
> meshbase = RectangleMesh(Nx, Ny, Lx, Ly, quadrilateral=True)
> mesh = ExtrudedMesh(meshbase, Nz, Dz)
>
> I get this error:
>
> Traceback (most recent call last):
> File "VMS_patch_test_3D_Double_firedrake.py", line 51, in <module>
> FrontBackBC1 = DirichletBC(wSpace.sub(0).sub(1),Constant(0.0),(3,4))
> File "/data/Software/firedrake/src/firedrake/firedrake/bcs.py", line 68,
> in __init__
> raise NotImplementedError("Indexed VFS bcs not implemented on extruded
> meshes")
> NotImplementedError: Indexed VFS bcs not implemented on extruded meshes
>
> What should I do to properly identify my boundary faces?
>
> Regards,
>
> Hanie
>