On 24 Jul 2015, at 12:13, Justin Chang <jychang48@gmail.com> wrote:
Hi Lawrence,
Thanks for the responses (and same to you Fabio). I am attempting to experiment with slip condition dirichlet boundary conditions for velocity with these lines:
bcs1 = DirichletBC(W.sub(0).sub(0), Expression(("2*pi*cos(2*pi*x[0])*sin(2*pi*x[1])*sin(2*pi*x[2])")), (1,2)) bcs2 = DirichletBC(W.sub(0).sub(1), Expression(("2*pi*sin(2*pi*x[0])*cos(2*pi*x[1])*sin(2*pi*x[2])")), (3,4)) bcs3 = DirichletBC(W.sub(0).sub(2), Expression(("2*pi*sin(2*pi*x[0])*sin(2*pi*x[1])*cos(2*pi*x[2])")), (5,6))
but I am getting these errors:
Traceback (most recent call last): File "Compare_P2P0.py", line 66, in <module> solver.solve() File "<string>", line 2, in solve File "/home/justin/Software/firedrake-deps/PyOP2/pyop2/profiling.py", line 203, in wrapper return f(*args, **kwargs) File "/home/justin/Software/firedrake-deps/firedrake/firedrake/variational_solver.py", line 165, in solve bc.apply(self._problem.u) File "<string>", line 2, in apply File "/home/justin/Software/firedrake-deps/PyOP2/pyop2/profiling.py", line 203, in wrapper return f(*args, **kwargs) File "/home/justin/Software/firedrake-deps/firedrake/firedrake/bcs.py", line 199, in apply raise RuntimeError("%r defined on incompatible FunctionSpace!" % r) RuntimeError: Coefficient(MixedElement(*[VectorElement('Lagrange', Domain(Coefficient(VectorElement('Lagrange', Domain(Cell('tetrahedron', 3), label=None, data='<data with id 140068500682768>'), 1, dim=3, quad_scheme=None), 1)), 2, dim=3, quad_scheme=None), FiniteElement('Discontinuous Lagrange', Domain(Coefficient(VectorElement('Lagrange', Domain(Cell('tetrahedron', 3), label=None, data='<data with id 140068500682768>'), 1, dim=3, quad_scheme=None), 1)), 0, quad_scheme=None)], **{'value_shape': (4,) }), 7) defined on incompatible FunctionSpace!
Oh, I think I failed to correctly implement this case. I'll try and put something together. Lawrence