← Back to team overview

dolfin team mailing list archive

Re: PDE<->ODE interface

 

On Fri, Nov 04, 2005 at 03:11:44PM +0100, Johan Hoffman wrote:

> > We just need to allow the specification of a time derivative in the
> > form. If none is specified, we generate PDE code as usual, and if the
> > form contains a time derivative, we generate code suitable for the ODE
> > solver.
> 
> Yes, that would be the do-nothing option for the PDE case; the way it is
> today demands that you as a user need to semi-discretize in time by
> yourself. But I think it would be a nice feature of FFC to also
> automatically discretize the PDE in time. It is not only about how to
> write the time derivative; the other terms are changed as well.
> 
> Heat equation discretized by Crank-Nicolson:
> 
> a = v*u*dx + k*0.5*dot(grad(v), grad(u))*dx
> L = v*u0*dx - k*0.5*dot(grad(v), grad(u))*dx + v*0.5*(f+f0)*dx
> 
> compared to
> 
> a = v*u.dt()*dx + k*dot(grad(v), grad(u))*dx
> L = v*f*dx

What is wrong with the second alternative? Isn't that what we want?

> I'm not saying this necessarily should be highest priority, but I think it
> is a nice feature that generalizes the automation also to time dependent
> PDEs.
> 
> By doing (2), both space and time discretization would be automated for
> use in the ODE solver. What I'm suggesting is to also include (1) as an
> automation of time and space discretization for use in the PDE solver.
>
> I can understand if you are not too motivated of working on this, since
> it may be considered to be fairly orthogonal to the FFC - ODE solver
> coupling (2). But if there is interest of the (1) functionality, someone
> else might be interested in doing the job.

I must be missing something. We already support (1) today and we will
soon support (2).

/Anders

> >> > I think we should be able to get this working with alternative (2),
> >> > but we need to think about the details.
> >> >
> >> > /Anders
> >>
> >> I think alterntive (1) is also worth considering. Then we would be able
> >> to
> >> write a PDE closer to the mathematical formulation in the form-file.
> >
> > I think semi-discretization in space ("method of lines") is also
> > pretty close to the mathematical formulation. At least it's the way I
> > always write it.
> >
> > /Anders
> >
> 
> I'm not comparing the 'A(u)=f' vs. 'u_t = f(u)' ways to write the
> equation; what I'm saing is that both formulations look much better than a
> semi-discretization of A(u)=f.
> 
> /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