← Back to team overview

dolfin team mailing list archive

Re: Status of linear algebra

 

On Thu, Aug 10, 2006 at 06:06:48PM +0200, Garth N. Wells wrote:
> 
> 
> Anders Logg wrote:
> > On Thu, Aug 10, 2006 at 03:28:19PM +0200, Johan Jansson wrote:
> >> On Thu, Aug 10, 2006 at 09:52:36AM +0200, Anders Logg wrote:
> >>> Garth, what is the status of the linear algebra? If you are happy,
> >>> I'll take another look and then we can take care of the remaining stuff.
> >>>
> >>> Here's a suggested plan:
> >>>
> >>>        1. Review/cleanup (Garth)
> >>>        2. Review/cleanup/class diagram (Anders)
> >>>        3. Fix PyDOLFIN linear algebra including typedefs (Johan J)
> >>>        3. Finish linear algebra section in manual (Johan H)
> >>>        4. Remove PETSc ifdefs from Navier-Stokes module (Johan H)
> >>>        4. Remove PETSc ifdefs from elasticity module (Johan J)
> >>>        4. Unit tests for linear algebra (Anders, Garth)
> >>>        4. Demos for linear algebra (Garth)
> >>>        4. Benchmarks for linear algebra (Garth)
> >>>        4. Review/cleanup of ODE solvers (Anders)
> >>>
> >>> What more do we want to finish before the next release?
> >>>
> >>> Hopefully we can make a concentrated effort and make the release
> >>> quickly so we can move on to work on the mesh.
> >>>
> >>> /Anders
> >> Ok, good plan. I'd also like to review the TimeDependentPDE class
> >> before release. It's related to the linear algebra and to the ODE
> >> solvers. For example, it depends on both DenseVector (from ODE) and
> >> Vector (for storing dofs), so it requires that those have a consistent
> >> relationship and that there exists functions to translate between
> >> them.
> > 
> > DenseVector is now called uBlasVector in the ODE solver. Even if
> > DenseVector is a synonym for uBlasVector, it could potentially be
> > changed in the future.
> > 
> > The class Vector (PETScVector) and uBlasVector are not compatible, but
> > maybe we should add some functionality for copying data between the
> > two, like constructors in both that take the other.
> > 
> > Another option would be to change to uBlasVector in Ko instead of
> > Vector.
> > 
> > I'm not completely happy with defining the ODE solver interface in
> > terms of uBlasVector. It sounds very specific. I would like to say
> > just Vector or dolfin::ode::Vector.
> >
> 
> I too think that it would be better to have just Vector. The difficulty 
> was that PETSc is not very flexible for manipulating vectors 
> element-wise or working with columns and rows of (sparse) matrices, and 
> the ODE solvers are pretty demanding in this respect. Perhaps a few 
> cleverly put together functions in PETScVector and PETScMatrix would do 
> the trick?
> 
> Garth

I can't see that there is any solution for the PETSc vectors that
would be competitive with uBlas for indexing. We could do something
like keeping a copy of the values in a plain array and keep track of
when the values have been changed and need updating but I think it
would be difficult to implement without introducing some extra logic
(like an apply() function) that I don't think we should need for
vectors.

/Anders




References