dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #18045
Re: Non-intuitiveness with assembling over sub_domains
On Thu, Apr 08, 2010 at 08:44:21AM -0700, Johan Hake wrote:
> On Thursday April 8 2010 08:36:24 Marie Rognes wrote:
> > Johan Hake wrote:
> > > On Thursday April 8 2010 04:51:24 Marie Rognes wrote:
> > >> There is something suboptimal with regard to assembly over sub_domains
> > >> specified
> > >> by domains (in contrast to markers)
> > >>
> > >> Say I have some functional
> > >>
> > >> (*) M = f*ds
> > >>
> > >> where f is some function. Let 'domain' be some sub-domain.
> > >>
> > >> Now, it is not clear to me what
> > >>
> > >> v = assemble(M, mesh=mesh, exterior_facet_domains=domain)
> > >>
> > >> gives. It would be really convenient (for my purposes) if it gave
> > >> the same as
> > >>
> > >> v = assemble(M, mesh=mesh)
> > >
> > > Considering that ds defaults to ds(0) I think it is a logical behaviour.
> >
> > So
> >
> > ds == ds(0)
> >
> > ?
>
> In ufl/objects.py
>
> ds = Measure(Measure.EXTERIOR_FACET, 0)
>
> So I guess yes.
Yes, this is the case.
I think the current behavior is correct, if one knows that ds = ds(0).
But I understand it can be confusing. Marie and I discussed this last
week and I suggested that we let
ds = ds(-1)
and that should denote integration over all sub domains, and ds(0)
would mean integration specifically over sub domain 0.
I was going to suggest this but I realize now we would need to change
the UFC interface (and FFC). It is currently based on the function
num_foo_integrals
returning the number of integrals and
create_foo_integral(i)
returning the integral for the terms on sub domain i.
This would need to be extended, possibly by overloading with
create_foo_integral()
which would return the terms that are present on all sub domains.
Is it worth the effort of updating ufc.h, the UFC manual, the
assembler and FFC?
--
Anders
Attachment:
signature.asc
Description: Digital signature
Follow ups
References