Hi,
I want to apply Dirichlet BCs along a line (x[0] = 0
and x[1] = 0
) on a 3D geometry. So I tried :
mesh = Mesh("My_3D_mesh.xml")
V = VectorFunctionSpace(mesh, "Lagrange", 1)
class MyLine(SubDomain):
def inside(self, x, on_boundary):
return near(x[0], 0., TOL) and near(x[1], 0., TOL) and on_boundary
myLine = MyLine()
bc = DirichletBC(V.sub(0), Constant((0.)),myLine,method="pointwise")
And I get the following error :
*** Error: Unable to create Dirichlet boundary condition.
*** Reason: Illegal value dimension (2), expecting (3).
*** Where: This error was encountered inside DirichletBC.cpp.
What is wrong with my implementation ? Is there a way to apply such a boundary condition in 3D ?
Many thanks in advance !
Claire