← Back to team overview

dolfin team mailing list archive

Re: Boundary terms in Dolfin

 

On Thu, Jul 07, 2005 at 08:19:13PM +0200, jhoffman@xxxxxxxxxxx wrote:
> > 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.
> 
> Yes, this sounds like a way to do it.
> 
> > Then Garth can create his own boundary and call applyBC() with this
> boundary. Would that work?
> 
> I think so.
> 
> > 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);
> >
> 
> This should work. Maybe there should be a more general name than boundary,
> since it may in fact does not have to be part of the physical boundary? On
> the other hand we do not want the name to connect to the dimension of the
> object either (such as "surface" for example); "subdomain", "subset", or
> "manifold" might work?

Perhaps, but it's natural to work with boundaries when specifying
boundary conditions. The standard case is that boundary conditions are
really specified on boundaries, and if someone wants to specify
boundary conditions on some other part of the domain that may be fine
but it's still called a boundary.

Another point may be that we should have Domain and Boundary, not Mesh
and Boundary. On the other hand, Mesh is probably the right concept
since it is really a mesh (a collection of mesh entities) rather than
a Domain. Perhaps we will need Domain at a later point, and then one
could create a Mesh from a Domain, and a Mesh might as well be a mesh
created from a Boundary:

Domain domain(...);
Mesh mesh(domain);

Domain domain(...);
Boundary boundary(domain);
Mesh mesh(boundary);

> > 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.
> 
> Sounds good. But again, doesn't the different boundary ID's involve a
> check when assembling?

No, only when building the boundary. The user supplying the
BoundaryCondition could check the boundary ID, but the iteration would
only be over the boundary.

/Anders



Follow ups

References