← Back to team overview

dolfin team mailing list archive

Re: Function input

 

On Thu, Feb 16, 2006 at 12:55:10PM +0100, Johan Jansson wrote:
> On Thu, Feb 16, 2006 at 12:02:35AM -0600, Anders Logg wrote:
> > I suggest that we update the interface for Function input so it works
> > the same as for other objects, so we change from
> > 
> >     File file("function.xml");
> >     Function f;
> >     functionfile.parse(f, element);
> > 
> > to 
> > 
> >     File file("function.xml");
> >     file >> f;
> > 
> > While reading the Function, the input checks the type of finite
> > element and attaches it appropriately if found (only P1 for now).
> > Otherwise, it generates a warning that the element could not be found
> > so it needs to be supplied by the user by
> > 
> >     f.attach(element);
> > 
> > For this to work (automatically creating and attaching an element
> > while reading), we need to let a Function keep a local FiniteElement
> > in the same way as it can keep a local Vector (element_local == true,
> > same as vector_local == true in DiscreteFunction).
> > 
> > Any objections?
> > 
> > /Anders
> > 
> 
> This is a good idea. I didn't think having to attach the element
> before reading a file was a very intuitive interface, but if we can
> detect and attach common elements automatically then it's not so
> important.

ok, I'll see what I can do.

/Anders



References