[firedrake] Concatenation of function spaces?
Lawrence Mitchell
lawrence.mitchell at imperial.ac.uk
Fri Jul 24 12:50:44 BST 2015
> On 24 Jul 2015, at 12:13, Justin Chang <jychang48 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mailman.ic.ac.uk/pipermail/firedrake/attachments/20150724/b17230a2/attachment.sig>
More information about the firedrake
mailing list