dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #00810
Re: Boundary terms in Dolfin
On Fri, Jul 08, 2005 at 08:49:22AM +0200, jhoffman@xxxxxxxxxxx wrote:
> > On Thu, Jul 07, 2005 at 08:11:00PM +0200, jhoffman@xxxxxxxxxxx wrote:
> >> >> I agree that we should support both, although 2 would be the only one
> >> >> avoiding checking (for Karin & Johan) as far as I understand.
> >> >
> >> > It depends on what the user wants. If someone calls
> >> >
> >> > FEM::applyBC(..., mesh, ...)
> >> >
> >> > then we have to iterate over the entire boundary. On the other hand,
> >> > if someone calls
> >> >
> >> > FEM::applyBC(..., boundary, ...)
> >> >
> >> > then we only have to loop over that portion of the boundary.
> >>
> >> Yes, but doesn't this involve checking if we are on the "boundary" by
> >> comparing boundary ID's?
> >
> > Only when generating the boundary. The implementation of the first
> > function will look like
> >
> > void applyBC(..., mesh, ...)
> > {
> > Boundary boundary(mesh);
> > applyBC(..., boundary, ...);
> > }
> >
> > When a boundary is generated, we have to iterate over the entire mesh
> > and detect which entities are on the boundary. (This is automatically
> > detected by the algorithms in BoundaryInit.)
> >
> > But when we iterate over entities (like edges) on a Boundary, then we
> > really just iterate over the entities on the Boundary (not iterating
> > over the entire mesh and skipping the interior).
> >
> > Also note that if we assemble more than once, then the boundary has to
> > be computed only the first time (this is automatically handled by the
> > Mesh class, it knows if the boundary has already been computed).
> >
> > /Anders
>
> Ok. You mean that the only case when the first function is used is when
> one is only interested in the whole boundary of the domain, in which case
> this is stored in the Mesh class after being computed once. That makes
> sense.
Yep. :-)
> And for the general case of the second function, one creates several
> Boundary objects for each boundary condition to be applied.
Yes, that sounds like a good idea; creating several Boundary objects
with corresponding BoundaryCondition objects and calling applyBC() on
each pair.
The question is then if the BoundarySpecification class should just
return true or false, not an integer, since one would also create
multiple BoundarySpecification objects, one for each part of the
boundary.
/Anders
Follow ups
References
-
Re: Boundary terms in Dolfin
From: Anders Logg, 2005-07-07
-
Re: Boundary terms in Dolfin
From: jhoffman, 2005-07-07
-
Re: Boundary terms in Dolfin
From: Robert C. Kirby, 2005-07-07
-
Re: Boundary terms in Dolfin
From: jhoffman, 2005-07-07
-
Re: Boundary terms in Dolfin
From: Anders Logg, 2005-07-07
-
Re: Boundary terms in Dolfin
From: jhoffman, 2005-07-07
-
Re: Boundary terms in Dolfin
From: Anders Logg, 2005-07-07
-
Re: Boundary terms in Dolfin
From: jhoffman, 2005-07-07
-
Re: Boundary terms in Dolfin
From: Anders Logg, 2005-07-07
-
Re: Boundary terms in Dolfin
From: jhoffman, 2005-07-08