← Back to team overview

dolfin team mailing list archive

Re: Boundary terms in Dolfin

 

On Thu, Jul 07, 2005 at 06:33:11PM +0200, jhoffman@xxxxxxxxxxx wrote:

> This is also an important case; when the "boundary condition" is applied
> to a part of the domain not being part of the boundary. So maybe we should
> also add the possibility to create "Boundary-like" object in the form of
> discrete surfaces (e.g. a collection of faces) or discrete curves (e.g. a
> collection of edges), not necessarily being part of the boundary. This
> then of course demands new algorithms for the "init" function.
> 
> I guess this is part of what Matt is working on, but on the other hand
> this may not involve too much work, and there seems to exist a demand on
> this type of functionality, so maybe it would be a good thing to add.
> 
> /Johan

I agree, this is alternative (2) in my previous post. Even if we
change the mesh backend later this year, I think our API is pretty
good (the iterators, the classes, the functions etc) and this mostly
concerns the API (the implementation is easy).

Maybe there should be another applyBC() in FEM that takes a Boundary
as argument instead of a Mesh, and the version of applyBC() taking a
Mesh as an argument just creates the default boundary and calls
applyBC() with this boundary? That way we can have one implementation
but people can call it differently depending on their needs.

Then Garth can create his own boundary and call applyBC() with this
boundary. Would that work?

I imagine something like

    class BoundarySpecification() // Better suggestion for name?
    {
    public:

        // Return -1 if not on boundary, otherwise boundary ID
        int operator() (const Point& point) const;

    };

Then one can create a boundary using

    MyBoundarySpecification bs;
    Boundary boundary(mesh, bs);

Note that this creates an object boundary which represents a part of
the mesh (does not have to be part of the physical boundary), and that
the entities contained in this boundary can be assigned to different
parts of the boundary depending on the boundary ID returned by the
BoundarySpecification.

/Anders



Follow ups

References