← Back to team overview

dolfin team mailing list archive

Re: Dirichlet bc functions

 

On Sun, Nov 02, 2008 at 05:52:21PM +0000, Garth N. Wells wrote:
> Do we want to insist that Dirichlet bc functions that do not appear 
> inside a form are constructed with a FunctionSpace? DirichletBC is 
> supplied with a FunctionSpace, so if the bc Function does not have a 
> FunctionSpace, we could attach one automatically.
> 
> Garth
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev

I think this is already handled. Look in the Poisson demo. It uses a
Constant to set the BC and it does not have a FunctionSpace attached
to it. The DirichletBC class now uses its own FunctionSpace rather
than the one that the Function has (if any). There is a check (in
DirichletBC::check()) that checks that the FunctionSpace for the
Function is the same as the one in the DirichletBC.

Note that Function::in(V) returns true if the Function does not have a
FunctionSpace (which allows Functions with no specified space to be
used for setting DirichletBC).

--
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References