← Back to team overview

dolfin team mailing list archive

Re: DG

 

> On Thu, Jan 18, 2007 at 12:03:14PM +0100, Johan Hoffman wrote:
>> > On Thu, Jan 18, 2007 at 11:20:16AM +0100, Johan Hoffman wrote:
>> >> Ok. I understand.
>> >>
>> >> So it is assumed that a discontinuous element is discontinuous along
>> all
>> >> cell faces.
>> >
>> > Yes.
>> >
>> >> Ideally you would like to be able to integrate over subdomains of the
>> >> mesh; typically defined by the dx/ds-operators.
>> >>
>> >> Maybe something like:
>> >>
>> >> Mesh mesh("mesh.xml");
>> >>
>> >> Array<Face> surf_faces_1;
>> >> surf_faces_1 = ...
>> >>
>> >> Array<Face> surf_faces_2;
>> >> surf_faces_2 = ...
>> >>
>> >> mesh.defineSurface(surf_faces_1);
>> >> mesh.defineSurface(surf_faces_2);
>> >>
>> >> [in form-file]
>> >>
>> >> ...
>> >>
>> >> a = (u,v)*ds1 + (u,v)*ds2
>> >
>> > Yes, that would be great, but there is no such support in the UFC
>> > specification. It is always assumed that you integrate over the whole
>> > mesh.
>> >
>> > So you need to define different forms for different meshes, but that
>> > should be ok?
>>
>> Maybe, as long as there is a natural way to add forms. If assembling
>> matrices, I guess that you could always assemble different matrices for
>> different meshes and then add them together in some way (although this
>> appears a bit cumbersome?), and for adding the action of several forms
>> I'm
>> not sure what to do.
>>
>> From my perspective I think the natural way would be to include the
>> option
>> of assembling over only a part of the mesh inside FFC/Dolfin::Assembler,
>> rather than figuring out a way to add matrices/actions after assembly.
>> As
>> far as I can see, assembling over a submesh (volume or surface) should
>> be
>> as easy as using an bool-indicator MeshFunction over cells/faces inside
>> the assembly loop.
>>
>> What do you think?
>
> Yes, you should be able to assembly over a subset of a mesh, but you
> still need two forms. One form that you assembly on some subset of the
> mesh and another form that you assemble over another subset.

Yes, I see how I can do that; assembling two different forms on different
subsets of the mesh, and then patch them together afterwards in some way.
Although I think it would be more elegant to avoid the patching and
instead be able to specify integration over subdomains in one form (with
dx/ds), as you would do it with pen and paper.

Another variant is to use special meshes; with for example two verticies
at the same position along the inner surface, with no couplings over the
surface. That way one could assemble one form with no coupling over the
interface. And then after assembling that form, one could add some
coupling of the dofs over of interface, for example by a surface integral
over the surface. This coupling could then be added by some map of the
dofs on (each side of the) the surface to the dofs of the assembled form.
But of course, again it would be more elegant to be able to add this
integral within the first form.

/Johan



>
> /Anders
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>




Follow ups

References