← Back to team overview

dolfin team mailing list archive

Re: Plans for next release

 

On Thu, Dec 22, 2005 at 01:38:37PM +0100, Johan Hoffman wrote:
> 
> > We're getting closer to 0.6.0, and here is a short summary of what I
> > think should be on the TODO list for the next release (which will
> > most likely be 0.5.12):
> >
> > 1. Make all modules support both 2D and 3D. Today, the dimension is
> > some random value between 2 and 3 picked by the maintainer of each
> > module. Since the mesh is given as an argument to the module/solver,
> > it just needs to look at the mesh to determine the dimension. This is
> > a simple if-statement we need to add to each module (and keep two sets
> > of forms to choose from). I can go first and do the Poisson module,
> > and then I hope I can get help with some of the others: convdiff,
> > elasticity, elasticity-updated, navierstokes, stokes.
> 
> This may require some preparations before the simple if-statement is
> sufficient. I would think the easiest thing would be to have an
> if-statemet when the forms are initialized? But then we would typically
> need something like a copy constructor or similar for the forms, or? If
> so, that would have to be supported also on the FFC side.
> 
> /Johan

Isn't it enough to do something like

BilinearForm* a;
LinearForm* L;

if ( mesh.type() == Mesh::triangles )
{
    a = new Poisson2D::BilinearForm();
    L = new Poisson2D::LinearForm(f);
}
else
{
    a = new Poisson3D::BilinearForm();
    L = new Poisson3D::LinearForm(f);
}

and something similar for Navier-Stokes?

/Anders



References