dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #01933
Re: Version 0.6.0?
On Mon, Feb 13, 2006 at 05:35:37PM +0100, Garth N. Wells wrote:
> On Mon, 2006-02-13 at 17:06 +0100, Johan Jansson wrote:
> > On Mon, Feb 13, 2006 at 09:39:14AM -0600, Anders Logg wrote:
> > > On Mon, Feb 13, 2006 at 02:46:04PM +0100, Johan Jansson wrote:
> > >
> > > > I think two remaining features to implement are:
> > > >
> > > > 1. Loading Functions (DiscreteFunction) from file.
> > >
> > > ok, which format do we want to do initially? DOLFIN XML?
> > >
> > > Maybe we should also consider some binary format that is quicker to
> > > write and parse? Could be useful mostly during computations (and less
> > > useful for storing solutions for future reference) for example when
> > > solving the dual problem and linearizing around a previously computed
> > > solution (or time sequence of solutions) that doesn't fit in memory.
> >
>
> I think that an XML format would be great. Considering problems which
> won't fit into the memory is still some time away. I'd lile to be able
> to write functions to a file to allow restarts.
ok, let's begin with fixing the XML input/output for Vector. Then we
should have what we need to read/write functions + we also need to
decide on which elements to precompile and store.
The XML format for Vector is temporarily disabled after the change of
linear algebra backend to PETSc, so it should be easy to fix.
There's a lot of different elements we would potentially need to
pregenerate, including different degree polynomials, vector-valued
elements with different number of components, mixed elements etc, so
it's not obvious which we should pick. (Of course if something is
missing in the first set of elements we can always add it later when
someone needs it.)
> > Isn't a natural candidate the VTK format? This is the standard output
> > format for DOLFIN, isn't it natural to be able to read it back in?
> >
>
> VTK is limited in the types of elements on which the functions are
> defined (linear and quadratic, although the output for quadratic
> elements looks weird because ParaView doesn't draw the element, but
> makes it's own triangulation of the surface based on the provided data),
> so values away from vertexes would be lost, and it doesn't handle
> discontinuous functions.
>
> > > > 2. An interface for projecting/interpolating between Functions. The
> > > > main example which requires some manual work in solvers is defining
> > > > the initial values by a UserFunction and wanting to represent that as
> > > > a DiscreteFunction.
> > >
> > > I'm not sure what you mean. I thought I solved this with the new
> > > functionality I added to the Function class last week. You can define
> > > a Function for the initial value by overloading eval(), or even by
> > >
> > > Function u = 0.0;
> > >
> > > and then u can change from being a user-defined Function to a discrete
> > > Function. See new convection-diffusion demo.
> > >
> > > You can also do
> > >
> > > Function u(x, mesh, element);
> > > u = f;
> > >
> > > to interpolate f to u.
> > >
> >
> Is the interpolation linear (to the vertexes only), or does it work for
> higher-order elements?
Works for all types of elements. The function f is evaluated at all
nodes of the element that defines u.
/Anders
> Garth
>
> > Ok, great! I'm sorry, I didn't realize this was what you added last
> > week.
> >
> > I think interpolation is enough, projection can wait.
> >
> > > I have limited time to work on new features before Geilo, but I can
> > > probably fit something in if I get some help.
> > >
> >
> > Yes, I also have limited time. But maybe we can at least start looking
> > at Function input and decide what we should do, i.e. if we should
> > design a DOLFIN XML data format for Functions or use the VTK format.
> >
> > Johan
> >
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
--
Anders Logg
Research Assistant Professor
Toyota Technological Institute at Chicago
http://www.tti-c.org/logg/
Follow ups
References