fenics team mailing list archive
-
fenics team
-
Mailing list archive
-
Message #00388
Re: neumann conditions
On Tue, Mar 18, 2008 at 05:59:19PM -0400, Gideon Simpson wrote:
> I'm familiar with handling the Diritchlet conditions, and I see in the
> Assembler header file that there is a procedure for handling construction
> over subdomains. I'm a little unclear about exterior vs. interior facet
> domains, which I understand to be the faces of the tets on the exterior of
> the domain vs. the faces of tets in the interior, and how to relate that to
> my dirichlet/neumann problem.
>
> I think I've been able to work around it by using the mesh labels within
> the ffc by declaring
>
> ds0 = Integral("exterior facet", 0)
>
> and integrating against ds0, but I'd like to understand how to handle this
> inside of dolfin.
It's enough to use ds (for exterior facets, i.e., the boundary or
parts thereof) and dS (for interior facets, i.e., faces of tets that
are not on the boundary).
Create a mesh function over the mesh and set its value 0 on the facets
(on the boundary) that you want to include and 1 on the others.
Similarly, if you have two different parts you want to define
different integrals on, create ds0, ds1 and set 0 on one and 1 on the
other, then 2 on the rest, etc.
--
Anders
> -gideon
>
> On Mar 18, 2008, at 4:52 PM, Anders Logg wrote:
>
>> On Tue, Mar 18, 2008 at 09:23:25PM +0100, Murtazo Nazarov wrote:
>>>> That helps. Suppose I want to apply such a condition on one part of
>>>> the boundary and specify dirichlet conditions on another part. I have
>>>> the different boundary regions identified with cell markers. But how
>>>> I would apply such a cell filter in this context?
>>
>> For Neumann, send the MeshFunction defining the part of the boundary
>> you want to integrate over to the assembler (see Assembler.h). For
>> Dirichlet, send the MeshFunction defining the part of the boundary you
>> want to set the condition on to the constructor of DirichletBC.
>>
>
References