← Back to team overview

dolfin team mailing list archive

Re: Added operations to NewVector wrapper as well as a test for the new [...]

 

On Wed, Jan 12, 2005 at 03:24:01PM -0600, Anders Logg wrote:
> Good to see that you've started working on the new la.
> 
> Some questions/thoughts:
> 
> 1. Is any of the new stuff used in src/demo/la/newla? Looks like the
> old Vector is still used?
> 

Ah yes, I see now. Now it's fixed.

> 2. Is the purpose of the class NewVector::Index that access and
> assignment need to be handled differently? Same as Matrix::Element?

Yes. PETSc doesn't allow us to keep pointers into the data of a vector
(in the parallel case it's not possible to get a pointer at all), so a
vector has to be treated just as a sparse matrix.

Perhaps we can have a discussion on how much "syntactic sugar" we
should put on the PETSc wrapper interface. I think we should keep it
simple, but at least the standard indexing operations should be there.

> 
> 3. We have earlier decided to replace the class KrylovSolver. Instead
> of doing
> 
>   KrylovSolver ks(KrylovSolver::GMRES);
>   ks.solve(A, x, b);
> 
> one should be able to do
> 
>   GMRES::solve(A, x, b);
> 
> or
> 
>   CG::solve(A, x, b);
> 
> Maybe it is better to put the wrappers for PETSc solvers in classes
> NewGMRES, NewCG, etc instead of NewKrylovSolver?

Ok, I wasn't aware of this. I'll do that instead.

By the way, I found out how to use the PETSc Krylov solvers by
providing only the action of the operator:

http://www.epcc.ed.ac.uk/computing/services/cray_service/documents/local_libs/PETSC/manual.html#Node26

I don't think it's meaningful to wrap it, but that's what we need to
use for the Newton solver in the ODE solver.

  Johan



Follow ups

References