change to petsc-dev

Satish Balay balay at mcs.anl.gov
Tue Jun 24 15:19:37 CDT 2008


On Tue, 24 Jun 2008, Barry Smith wrote:

> 
>   I have pushed the change to PETSc-dev that eliminates the const from the
> definition of XXXType (for example VecType).
> In theory this should have minimal affects on your codes. The only change I
> think you may need are changing, for example,
> 
>   VecType mt = MPIVEC;
> 
> to
> 
>   const VecType mt = MPIVEC.

I think we can avoid this change to user-code - if we do the
following:

#define VECMPI         (char *)"mpi"

[I guess the tradeoff is slightly less rigorous const check by the
compiler]


I tried this change with MatType - and looks like it requires a
corresponding change of MatGetType() from:

MatGetType(Mat mat,const MatType *type)
to
MatGetType(Mat mat,MatType *type)

Satish




More information about the petsc-dev mailing list