On Fri, Oct 31, 2008 at 01:11:48PM +0100, Martin Sandve Alnæs wrote: > 2008/10/31 Anders Logg <[EMAIL PROTECTED]>: > > On Fri, Oct 31, 2008 at 10:12:03AM +0000, Garth N. Wells wrote: > >> > >> > >> DOLFIN wrote: > >> > One or more new changesets pushed to the primary dolfin repository. > >> > A short summary of the last three changesets is included below. > >> > > >> > changeset: 5053:a37ad63c855383fa6aae8b15bf20720b1a96398f > >> > tag: tip > >> > user: Anders Logg <[EMAIL PROTECTED]> > >> > date: Thu Oct 30 18:53:36 2008 +0100 > >> > files: demo/pde/poisson/cpp/main.cpp dolfin/fem/DirichletBC.cpp > >> > dolfin/function/Constant.cpp dolfin/function/Constant.h > >> > dolfin/function/Function.cpp dolfin/function/Function.h > >> > description: > >> > Make Constants work (only scalar constructors added so far) > >> > > >> > >> It would make things simple if we stick to scalar constants and I would > >> be happy with that. Constant vector functions for which all components > >> are equal are easy too, but not all that useful. Anything else, like a > >> vector [0, 1] will required a FiniteElement to guarantee the correct > >> tabulation, right? > >> > >> Garth > > > > That's not a problem. The FunctionSpace for a Constant will be > > discovered automatically. > > > > If a Constant is used in a Form (a.c = c), then the FunctionSpace will > > be created automatically. > > > > If a Constant is used in a DirichletBC, then the FunctionSpace is > > known (but will not be assigned to the Constant since it is const). > > > > If I understand this correctly, this sounds severely limiting and ruins > the simplicity of "a Function always has a FunctionSpace".
Yes, I agree. > A Constant should be possible to use everywhere a Function > is possible to use, including external code. Yes, this would also be good. The problem is that if we insist that all Functions always have a FunctionSpace, then we need to provide a FunctionSpace for Constants. One option could be to implement/generate a FunctionSpace for constants and include it in DOLFIN. -- Anders
signature.asc
Description: Digital signature
_______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
