dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #00807
Re: Boundary terms in Dolfin
> 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.
And for the general case of the second function, one creates several
Boundary objects for each boundary condition to be applied.
/Johan
>
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
>
Follow ups
References
-
Re: Boundary terms in Dolfin
From: Anders Logg, 2005-06-30
-
Re: Boundary terms in Dolfin
From: Karin Kraft, 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: 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