On 14/12/15 11:56, Buesing, Henrik wrote:
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?
Yes, I would like to have periodic bcs for two of the fields. On one of the fields I want to prescribe Dirichlet bc.
OK, so you can't do this strongly, because there's no "edge" in the domain. You could do one of two things: 1. manually identify the dofs in the non-periodic field to kill You would do something like: from firedrake import * from firedrake import utils class MyDirichletBC(DirichletBC): @utils.cached_property def nodes(self): # Return a numpy array that identifies the appropriate # indices. 2. The other option is to apply these terms weakly somehow. They will then turn into dS integrals. To select the "edge", you could interpolate a Heaviside function into a DG0 space which jumps at the edge. Then you could use the jump of this Function to introduce the appropriate weak "internal" boundary. Lawrence