← Back to team overview

dolfin team mailing list archive

Re: assembly on sub domains

 

On Thursday 08 May 2008 16:03:54 Nuno David Lopes wrote:
> On Thursday 08 May 2008, Anders Logg wrote:
> > This really needs to be explained in the manual at some point... :-)
> >
> > But we (obviously) need a few more iterations on the interface first.
> > I agree it's difficult to understand exactly what can be expected when
> > assembling over subdomains. The only way to know is to look at the
> > code.
>
> My idea is the following:
>
> For now I don't want tu use dS in my  form file and i have a MeshFunction
> for facets with the following markers:
> 0 for the interior facets

Hello Nuno!

I also had some hard time getting into the assembling over different 
subdomains. I think you have got it now. I have one suggestion though. Put 
the Homogenuous Neumann boundary conditions on the third or fourth marker.

In the form file you then specify the form for the non-zero Neumann condition 
with ds0 and the "other" non-zero boundary condition with the form ds1. You 
then only have to specify a MeshFunction with three numbers. 0 for the ds0 
form, 1 for the ds1 form and "what ever" for the rest, as the these markers 
will be ignored in the assembly.

> 0 for the exterior facets where i will consider zero Neumann boundary
>    conditions, i.e., they have no contribution on assembling
>
> 1 for non-zero Neumann boundary condition
>
> 2 for other no-zero boundary condition
>
> 3 for Dirichlet Boundary condition
>
> It seems that i could use the same MeshFunction in assemble function as in:
>
> assemble(A,a,mesh, cell_domains,facets_domains,facets_domains)
>
> is this right?
>
> If i want to use different markers for the interior facets then i should
> considerer 2 different MeshFunctions   with the correct order.
> 0..n-1 for interior
> 0..n-1 for exterior
> ??
>
> And again, if you don't use dS in your forms, the assembler will not take
> into account the third meshfunction, so it could be whatever you want,
> right?

Yes or just send an empty MeshFunction,

mf_empty = MeshFunction<uint>;

Cheers!

Johan

>
> I'm trying to get into the code, :)
>
> If this works...i hope so
> I could try to make a "simple"
> modified demo of the Poisson's demos, or something like that, with
> different heat diffusion coefficient's and with different kinds of boundary
> conditions, using this approach, instead of the usual conditional function
> for subdomains.
>
> Thanks...again and again




References