Mismatch in explicit fortran interface for MatGetInfo

Satish Balay balay at mcs.anl.gov
Fri May 29 11:44:30 CDT 2009


I have the following fixed files [untested yet]. But could you tell me
how you've configured PETSc? - and what patchlevel?

[It appears that there are quiet a few breakages with
--with-fortran-interfaces=1 - I might fix this in petsc-dev - not
3.0.0 - as it depends upon some f90 interface changes that are only in
petsc-dev]


Attaching the modified files that go with my untested fix.

include/finclude/ftn-auto/petscmat.h90
include/finclude/ftn-custom/petscmat.h90
src/mat/interface/ftn-auto/matrixf.c
src/mat/interface/ftn-custom/zmatrixf.c
src/mat/interface/matrix.c

Satish


On Wed, 27 May 2009, Barry Smith wrote:

> 
>  Stephan,
> 
>   Satish is working on the patch for this and will get it to you shortly.
> 
>   Sorry for the delay, we were debating how to handle it.
> 
>    Barry
> 
> On May 23, 2009, at 9:00 AM, Stephan Kramer wrote:
> 
> > Hi all,
> > 
> > First of all thanks of a lot for providing explicit fortran interfaces for
> > most functions in Petsc 3. This is of great help. I do however run into a
> > problem using MatGetInfo. The calling sequence for fortran (according to the
> > manual) is:
> > 
> > double precision info(MAT_INFO_SIZE)
> > Mat <cid:part1.02040105.02020103 at imperial.ac.uk> A
> > integer ierr
> > 
> > call MatGetInfo
> > <cid:part2.00070305.02060306 at imperial.ac.uk>(A,MAT_LOCAL,info,ierr)
> > 
> > The interface however seems to indicate the info argument has to be a single
> > double precision (i.e. a scalar not an array). I guess with implicit
> > interfaces this sort of thing would work, but with the provided explicit
> > interface, at least gfortran won't let me have it.
> > 
> > Cheers
> > Stephan
> > 
> 
-------------- next part --------------
        subroutine MatNullSpaceCreate(comm, has_cnst, n, vecs, SP ,ierr)&
     &
       integer comm ! MPI_Comm
       PetscTruth has_cnst ! PetscTruth
       PetscInt n ! PetscInt
       Vec vecs (*) ! Vec
       MatNullSpace SP ! MatNullSpace
       integer ierr
       end subroutine
        subroutine MatNullSpaceDestroy(sp ,ierr)
       MatNullSpace sp ! MatNullSpace
       integer ierr
       end subroutine
        subroutine MatNullSpaceTest(sp, mat, isNull ,ierr)
       MatNullSpace sp ! MatNullSpace
       Mat mat ! Mat
       PetscTruth isNull ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatGetDiagonalBlock(aupper, iscopy, reuse, a ,ierr)
       Mat aupper ! Mat
       PetscTruth iscopy ! PetscTruth
       MatReuse reuse ! MatReuse
       Mat a ! Mat
       integer ierr
       end subroutine
        subroutine MatRealPart(mat ,ierr)
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatImaginaryPart(mat ,ierr)
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatMissingDiagonal(mat, missing, dd ,ierr)
       Mat mat ! Mat
       PetscTruth missing ! PetscTruth
       PetscInt dd ! PetscInt
       integer ierr
       end subroutine
        subroutine MatConjugate(mat ,ierr)
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatGetRowUpperTriangular(mat ,ierr)
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatRestoreRowUpperTriangular(mat ,ierr)
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatSetUp(A ,ierr)
       Mat A ! Mat
       integer ierr
       end subroutine
        subroutine MatScaleSystem(mat, b, x ,ierr)
       Mat mat ! Mat
       Vec b ! Vec
       Vec x ! Vec
       integer ierr
       end subroutine
        subroutine MatUnScaleSystem(mat, b, x ,ierr)
       Mat mat ! Mat
       Vec b ! Vec
       Vec x ! Vec
       integer ierr
       end subroutine
        subroutine MatUseScaledForm(mat, scaled ,ierr)
       Mat mat ! Mat
       PetscTruth scaled ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatDestroy(A ,ierr)
       Mat A ! Mat
       integer ierr
       end subroutine
        subroutine MatValid(m, flg ,ierr)
       Mat m ! Mat
       PetscTruth flg ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatSetValues(mat, m, idxm, n, idxn, v, addv ,ierr)
       Mat mat ! Mat
       PetscInt m ! PetscInt
       PetscInt idxm (*) ! PetscInt
       PetscInt n ! PetscInt
       PetscInt idxn (*) ! PetscInt
       PetscScalar v (*) ! PetscScalar
       InsertMode addv ! InsertMode
       integer ierr
       end subroutine
        subroutine MatSetValuesRowLocal(mat, row, v ,ierr)
       Mat mat ! Mat
       PetscInt row ! PetscInt
       PetscScalar v (*) ! PetscScalar
       integer ierr
       end subroutine
        subroutine MatSetValuesRow(mat, row, v ,ierr)
       Mat mat ! Mat
       PetscInt row ! PetscInt
       PetscScalar v (*) ! PetscScalar
       integer ierr
       end subroutine
        subroutine MatSetValuesStencil(mat, m, idxm, n, idxn, v, addv , &
     &ierr)
       Mat mat ! Mat
       PetscInt m ! PetscInt
       MatStencil idxm (*) ! MatStencil
       PetscInt n ! PetscInt
       MatStencil idxn (*) ! MatStencil
       PetscScalar v (*) ! PetscScalar
       InsertMode addv ! InsertMode
       integer ierr
       end subroutine
        subroutine MatSetStencil(mat, dim, dims, starts, dof ,ierr)
       Mat mat ! Mat
       PetscInt dim ! PetscInt
       PetscInt dims (*) ! PetscInt
       PetscInt starts (*) ! PetscInt
       PetscInt dof ! PetscInt
       integer ierr
       end subroutine
        subroutine MatSetValuesBlocked(mat, m, idxm, n, idxn, v, addv , &
     &ierr)
       Mat mat ! Mat
       PetscInt m ! PetscInt
       PetscInt idxm (*) ! PetscInt
       PetscInt n ! PetscInt
       PetscInt idxn (*) ! PetscInt
       PetscScalar v (*) ! PetscScalar
       InsertMode addv ! InsertMode
       integer ierr
       end subroutine
        subroutine MatGetValues(mat, m, idxm, n, idxn, v ,ierr)
       Mat mat ! Mat
       PetscInt m ! PetscInt
       PetscInt idxm (*) ! PetscInt
       PetscInt n ! PetscInt
       PetscInt idxn (*) ! PetscInt
       PetscScalar v (*) ! PetscScalar
       integer ierr
       end subroutine
        subroutine MatSetLocalToGlobalMapping(x, mapping ,ierr)
       Mat x ! Mat
       ISLocalToGlobalMapping mapping ! ISLocalToGlobalMapping
       integer ierr
       end subroutine
        subroutine MatSetLocalToGlobalMappingBlock(x, mapping ,ierr)
       Mat x ! Mat
       ISLocalToGlobalMapping mapping ! ISLocalToGlobalMapping
       integer ierr
       end subroutine
        subroutine MatSetValuesLocal(mat, nrow, irow, ncol, icol, y,    &
     &addv ,ierr)
       Mat mat ! Mat
       PetscInt nrow ! PetscInt
       PetscInt irow (*) ! PetscInt
       PetscInt ncol ! PetscInt
       PetscInt icol (*) ! PetscInt
       PetscScalar y (*) ! PetscScalar
       InsertMode addv ! InsertMode
       integer ierr
       end subroutine
        subroutine MatSetValuesBlockedLocal(mat, nrow, irow, ncol, icol &
     &, y, addv ,ierr)
       Mat mat ! Mat
       PetscInt nrow ! PetscInt
       PetscInt irow (*) ! PetscInt
       PetscInt ncol ! PetscInt
       PetscInt icol (*) ! PetscInt
       PetscScalar y (*) ! PetscScalar
       InsertMode addv ! InsertMode
       integer ierr
       end subroutine
        subroutine MatMult(mat, x, y ,ierr)
       Mat mat ! Mat
       Vec x ! Vec
       Vec y ! Vec
       integer ierr
       end subroutine
        subroutine MatMultTranspose(mat, x, y ,ierr)
       Mat mat ! Mat
       Vec x ! Vec
       Vec y ! Vec
       integer ierr
       end subroutine
        subroutine MatMultAdd(mat, v1, v2, v3 ,ierr)
       Mat mat ! Mat
       Vec v1 ! Vec
       Vec v2 ! Vec
       Vec v3 ! Vec
       integer ierr
       end subroutine
        subroutine MatMultTransposeAdd(mat, v1, v2, v3 ,ierr)
       Mat mat ! Mat
       Vec v1 ! Vec
       Vec v2 ! Vec
       Vec v3 ! Vec
       integer ierr
       end subroutine
        subroutine MatMultConstrained(mat, x, y ,ierr)
       Mat mat ! Mat
       Vec x ! Vec
       Vec y ! Vec
       integer ierr
       end subroutine
        subroutine MatMultTransposeConstrained(mat, x, y ,ierr)
       Mat mat ! Mat
       Vec x ! Vec
       Vec y ! Vec
       integer ierr
       end subroutine
        subroutine MatLUFactor(mat, row, col, info ,ierr)
       Mat mat ! Mat
       IS row ! IS
       IS col ! IS
       MatFactorInfo info ! MatFactorInfo
       integer ierr
       end subroutine
        subroutine MatILUFactor(mat, row, col, info ,ierr)
       Mat mat ! Mat
       IS row ! IS
       IS col ! IS
       MatFactorInfo info ! MatFactorInfo
       integer ierr
       end subroutine
        subroutine MatLUFactorSymbolic(fact, mat, row, col, info ,ierr)
       Mat fact ! Mat
       Mat mat ! Mat
       IS row ! IS
       IS col ! IS
       MatFactorInfo info ! MatFactorInfo
       integer ierr
       end subroutine
        subroutine MatLUFactorNumeric(fact, mat, info ,ierr)
       Mat fact ! Mat
       Mat mat ! Mat
       MatFactorInfo info ! MatFactorInfo
       integer ierr
       end subroutine
        subroutine MatCholeskyFactor(mat, perm, info ,ierr)
       Mat mat ! Mat
       IS perm ! IS
       MatFactorInfo info ! MatFactorInfo
       integer ierr
       end subroutine
        subroutine MatCholeskyFactorSymbolic(fact, mat, perm, info ,ierr&
     &)
       Mat fact ! Mat
       Mat mat ! Mat
       IS perm ! IS
       MatFactorInfo info ! MatFactorInfo
       integer ierr
       end subroutine
        subroutine MatCholeskyFactorNumeric(fact, mat, info ,ierr)
       Mat fact ! Mat
       Mat mat ! Mat
       MatFactorInfo info ! MatFactorInfo
       integer ierr
       end subroutine
        subroutine MatSolve(mat, b, x ,ierr)
       Mat mat ! Mat
       Vec b ! Vec
       Vec x ! Vec
       integer ierr
       end subroutine
        subroutine MatMatSolve(A, B, X ,ierr)
       Mat A ! Mat
       Mat B ! Mat
       Mat X ! Mat
       integer ierr
       end subroutine
        subroutine MatSolveAdd(mat, b, y, x ,ierr)
       Mat mat ! Mat
       Vec b ! Vec
       Vec y ! Vec
       Vec x ! Vec
       integer ierr
       end subroutine
        subroutine MatSolveTranspose(mat, b, x ,ierr)
       Mat mat ! Mat
       Vec b ! Vec
       Vec x ! Vec
       integer ierr
       end subroutine
        subroutine MatSolveTransposeAdd(mat, b, y, x ,ierr)
       Mat mat ! Mat
       Vec b ! Vec
       Vec y ! Vec
       Vec x ! Vec
       integer ierr
       end subroutine
        subroutine MatRelax(mat, b, omega, flag, shift, its, lits, x ,  &
     &ierr)
       Mat mat ! Mat
       Vec b ! Vec
       PetscReal omega ! PetscReal
       MatSORType flag ! MatSORType
       PetscReal shift ! PetscReal
       PetscInt its ! PetscInt
       PetscInt lits ! PetscInt
       Vec x ! Vec
       integer ierr
       end subroutine
        subroutine MatPBRelax(mat, b, omega, flag, shift, its, lits, x ,&
     &ierr)
       Mat mat ! Mat
       Vec b ! Vec
       PetscReal omega ! PetscReal
       MatSORType flag ! MatSORType
       PetscReal shift ! PetscReal
       PetscInt its ! PetscInt
       PetscInt lits ! PetscInt
       Vec x ! Vec
       integer ierr
       end subroutine
        subroutine MatCopy(A, B, str ,ierr)
       Mat A ! Mat
       Mat B ! Mat
       MatStructure str ! MatStructure
       integer ierr
       end subroutine
        subroutine MatDuplicate(mat, op, M ,ierr)
       Mat mat ! Mat
       MatDuplicateOption op ! MatDuplicateOption
       Mat M ! Mat
       integer ierr
       end subroutine
        subroutine MatGetDiagonal(mat, v ,ierr)
       Mat mat ! Mat
       Vec v ! Vec
       integer ierr
       end subroutine
        subroutine MatGetRowMin(mat, v, idx ,ierr)
       Mat mat ! Mat
       Vec v ! Vec
       PetscInt idx (*) ! PetscInt
       integer ierr
       end subroutine
        subroutine MatGetRowMinAbs(mat, v, idx ,ierr)
       Mat mat ! Mat
       Vec v ! Vec
       PetscInt idx (*) ! PetscInt
       integer ierr
       end subroutine
        subroutine MatGetRowMax(mat, v, idx ,ierr)
       Mat mat ! Mat
       Vec v ! Vec
       PetscInt idx (*) ! PetscInt
       integer ierr
       end subroutine
        subroutine MatGetRowMaxAbs(mat, v, idx ,ierr)
       Mat mat ! Mat
       Vec v ! Vec
       PetscInt idx (*) ! PetscInt
       integer ierr
       end subroutine
        subroutine MatGetRowSum(mat, v ,ierr)
       Mat mat ! Mat
       Vec v ! Vec
       integer ierr
       end subroutine
        subroutine MatTranspose(mat, reuse, B ,ierr)
       Mat mat ! Mat
       MatReuse reuse ! MatReuse
       Mat B ! Mat
       integer ierr
       end subroutine
        subroutine MatIsTranspose(A, B, tol, flg ,ierr)
       Mat A ! Mat
       Mat B ! Mat
       PetscReal tol ! PetscReal
       PetscTruth flg ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatIsHermitianTranspose(A, B, tol, flg ,ierr)
       Mat A ! Mat
       Mat B ! Mat
       PetscReal tol ! PetscReal
       PetscTruth flg ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatPermute(mat, row, col, B ,ierr)
       Mat mat ! Mat
       IS row ! IS
       IS col ! IS
       Mat B ! Mat
       integer ierr
       end subroutine
        subroutine MatPermuteSparsify(A, band, frac, tol, rowp, colp, B &
     &,ierr)
       Mat A ! Mat
       PetscInt band ! PetscInt
       PetscReal frac ! PetscReal
       PetscReal tol ! PetscReal
       IS rowp ! IS
       IS colp ! IS
       Mat B ! Mat
       integer ierr
       end subroutine
        subroutine MatEqual(A, B, flg ,ierr)
       Mat A ! Mat
       Mat B ! Mat
       PetscTruth flg ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatDiagonalScale(mat, l, r ,ierr)
       Mat mat ! Mat
       Vec l ! Vec
       Vec r ! Vec
       integer ierr
       end subroutine
        subroutine MatScale(mat, a ,ierr)
       Mat mat ! Mat
       PetscScalar a ! PetscScalar
       integer ierr
       end subroutine
        subroutine MatNorm(mat, type, nrm ,ierr)
       Mat mat ! Mat
       NormType type ! NormType
       PetscReal nrm ! PetscReal
       integer ierr
       end subroutine
        subroutine MatAssemblyBegin(mat, type ,ierr)
       Mat mat ! Mat
       MatAssemblyType type ! MatAssemblyType
       integer ierr
       end subroutine
        subroutine MatAssembled(mat, assembled ,ierr)
       Mat mat ! Mat
       PetscTruth assembled ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatAssemblyEnd(mat, type ,ierr)
       Mat mat ! Mat
       MatAssemblyType type ! MatAssemblyType
       integer ierr
       end subroutine
        subroutine MatCompress(mat ,ierr)
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatSetOption(mat, op, flg ,ierr)
       Mat mat ! Mat
       MatOption op ! MatOption
       PetscTruth flg ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatZeroEntries(mat ,ierr)
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatGetSize(mat, m, n ,ierr)
       Mat mat ! Mat
       PetscInt m ! PetscInt
       PetscInt n ! PetscInt
       integer ierr
       end subroutine
        subroutine MatGetLocalSize(mat, m, n ,ierr)
       Mat mat ! Mat
       PetscInt m ! PetscInt
       PetscInt n ! PetscInt
       integer ierr
       end subroutine
        subroutine MatGetOwnershipRangeColumn(mat, m, n ,ierr)
       Mat mat ! Mat
       PetscInt m ! PetscInt
       PetscInt n ! PetscInt
       integer ierr
       end subroutine
        subroutine MatGetOwnershipRange(mat, m, n ,ierr)
       Mat mat ! Mat
       PetscInt m ! PetscInt
       PetscInt n ! PetscInt
       integer ierr
       end subroutine
        subroutine MatILUFactorSymbolic(fact, mat, row, col, info ,ierr)&
     &
       Mat fact ! Mat
       Mat mat ! Mat
       IS row ! IS
       IS col ! IS
       MatFactorInfo info ! MatFactorInfo
       integer ierr
       end subroutine
        subroutine MatICCFactorSymbolic(fact, mat, perm, info ,ierr)
       Mat fact ! Mat
       Mat mat ! Mat
       IS perm ! IS
       MatFactorInfo info ! MatFactorInfo
       integer ierr
       end subroutine
        subroutine MatIncreaseOverlap(mat, n, is, ov ,ierr)
       Mat mat ! Mat
       PetscInt n ! PetscInt
       IS is (*) ! IS
       PetscInt ov ! PetscInt
       integer ierr
       end subroutine
        subroutine MatGetBlockSize(mat, bs ,ierr)
       Mat mat ! Mat
       PetscInt bs ! PetscInt
       integer ierr
       end subroutine
        subroutine MatSetBlockSize(mat, bs ,ierr)
       Mat mat ! Mat
       PetscInt bs ! PetscInt
       integer ierr
       end subroutine
        subroutine MatSetUnfactored(mat ,ierr)
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatGetSubMatrix(mat, isrow, iscol, csize, cll, newmat&
     & ,ierr)
       Mat mat ! Mat
       IS isrow ! IS
       IS iscol ! IS
       PetscInt csize ! PetscInt
       MatReuse cll ! MatReuse
       Mat newmat ! Mat
       integer ierr
       end subroutine
        subroutine MatGetSubMatrixRaw(mat, nrows, rows, ncols, cols,    &
     &csize, cll, newmat ,ierr)
       Mat mat ! Mat
       PetscInt nrows ! PetscInt
       PetscInt rows (*) ! PetscInt
       PetscInt ncols ! PetscInt
       PetscInt cols (*) ! PetscInt
       PetscInt csize ! PetscInt
       MatReuse cll ! MatReuse
       Mat newmat ! Mat
       integer ierr
       end subroutine
        subroutine MatStashSetInitialSize(mat, size, bsize ,ierr)
       Mat mat ! Mat
       PetscInt size ! PetscInt
       PetscInt bsize ! PetscInt
       integer ierr
       end subroutine
        subroutine MatInterpolateAdd(A, x, y, w ,ierr)
       Mat A ! Mat
       Vec x ! Vec
       Vec y ! Vec
       Vec w ! Vec
       integer ierr
       end subroutine
        subroutine MatInterpolate(A, x, y ,ierr)
       Mat A ! Mat
       Vec x ! Vec
       Vec y ! Vec
       integer ierr
       end subroutine
        subroutine MatRestrict(A, x, y ,ierr)
       Mat A ! Mat
       Vec x ! Vec
       Vec y ! Vec
       integer ierr
       end subroutine
        subroutine MatNullSpaceAttach(mat, nullsp ,ierr)
       Mat mat ! Mat
       MatNullSpace nullsp ! MatNullSpace
       integer ierr
       end subroutine
        subroutine MatICCFactor(mat, row, info ,ierr)
       Mat mat ! Mat
       IS row ! IS
       MatFactorInfo info ! MatFactorInfo
       integer ierr
       end subroutine
        subroutine MatSetValuesAdic(mat, v ,ierr)
       Mat mat ! Mat
       PetscVoid v ! void
       integer ierr
       end subroutine
        subroutine MatSetColoring(mat, coloring ,ierr)
       Mat mat ! Mat
       ISColoring coloring ! ISColoring
       integer ierr
       end subroutine
        subroutine MatSetValuesAdifor(mat, nl, v ,ierr)
       Mat mat ! Mat
       PetscInt nl ! PetscInt
       PetscVoid v ! void
       integer ierr
       end subroutine
        subroutine MatDiagonalScaleLocal(mat, diag ,ierr)
       Mat mat ! Mat
       Vec diag ! Vec
       integer ierr
       end subroutine
        subroutine MatGetInertia(mat, nneg, nzero, npos ,ierr)
       Mat mat ! Mat
       PetscInt nneg ! PetscInt
       PetscInt nzero ! PetscInt
       PetscInt npos ! PetscInt
       integer ierr
       end subroutine
        subroutine MatIsSymmetric(A, tol, flg ,ierr)
       Mat A ! Mat
       PetscReal tol ! PetscReal
       PetscTruth flg ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatIsHermitian(A, tol, flg ,ierr)
       Mat A ! Mat
       PetscReal tol ! PetscReal
       PetscTruth flg ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatIsSymmetricKnown(A, set, flg ,ierr)
       Mat A ! Mat
       PetscTruth set ! PetscTruth
       PetscTruth flg ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatIsHermitianKnown(A, set, flg ,ierr)
       Mat A ! Mat
       PetscTruth set ! PetscTruth
       PetscTruth flg ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatIsStructurallySymmetric(A, flg ,ierr)
       Mat A ! Mat
       PetscTruth flg ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatStashGetInfo(mat, nstash, reallocs, bnstash,      &
     &breallocs ,ierr)
       Mat mat ! Mat
       PetscInt nstash ! PetscInt
       PetscInt reallocs ! PetscInt
       PetscInt bnstash ! PetscInt
       PetscInt breallocs ! PetscInt
       integer ierr
       end subroutine
        subroutine MatFactorInfoInitialize(info ,ierr)
       MatFactorInfo info ! MatFactorInfo
       integer ierr
       end subroutine
        subroutine MatPtAP(A, P, scall, fill, C ,ierr)
       Mat A ! Mat
       Mat P ! Mat
       MatReuse scall ! MatReuse
       PetscReal fill ! PetscReal
       Mat C ! Mat
       integer ierr
       end subroutine
        subroutine MatPtAPNumeric(A, P, C ,ierr)
       Mat A ! Mat
       Mat P ! Mat
       Mat C ! Mat
       integer ierr
       end subroutine
        subroutine MatPtAPSymbolic(A, P, fill, C ,ierr)
       Mat A ! Mat
       Mat P ! Mat
       PetscReal fill ! PetscReal
       Mat C ! Mat
       integer ierr
       end subroutine
        subroutine MatMatMult(A, B, scall, fill, C ,ierr)
       Mat A ! Mat
       Mat B ! Mat
       MatReuse scall ! MatReuse
       PetscReal fill ! PetscReal
       Mat C ! Mat
       integer ierr
       end subroutine
        subroutine MatMatMultSymbolic(A, B, fill, C ,ierr)
       Mat A ! Mat
       Mat B ! Mat
       PetscReal fill ! PetscReal
       Mat C ! Mat
       integer ierr
       end subroutine
        subroutine MatMatMultNumeric(A, B, C ,ierr)
       Mat A ! Mat
       Mat B ! Mat
       Mat C ! Mat
       integer ierr
       end subroutine
        subroutine MatMatMultTranspose(A, B, scall, fill, C ,ierr)
       Mat A ! Mat
       Mat B ! Mat
       MatReuse scall ! MatReuse
       PetscReal fill ! PetscReal
       Mat C ! Mat
       integer ierr
       end subroutine
        subroutine MatHasOperation(mat, op, has ,ierr)
       Mat mat ! Mat
       MatOperation op ! MatOperation
       PetscTruth has ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatReorderForNonzeroDiagonal(mat, abstol, ris, cis , &
     &ierr)
       Mat mat ! Mat
       PetscReal abstol ! PetscReal
       IS ris ! IS
       IS cis ! IS
       integer ierr
       end subroutine
        subroutine MatMultEqual(A, B, n, flg ,ierr)
       Mat A ! Mat
       Mat B ! Mat
       PetscInt n ! PetscInt
       PetscTruth flg ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatMultAddEqual(A, B, n, flg ,ierr)
       Mat A ! Mat
       Mat B ! Mat
       PetscInt n ! PetscInt
       PetscTruth flg ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatMultTransposeEqual(A, B, n, flg ,ierr)
       Mat A ! Mat
       Mat B ! Mat
       PetscInt n ! PetscInt
       PetscTruth flg ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatMultTransposeAddEqual(A, B, n, flg ,ierr)
       Mat A ! Mat
       Mat B ! Mat
       PetscInt n ! PetscInt
       PetscTruth flg ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatAXPY(Y, a, X, str ,ierr)
       Mat Y ! Mat
       PetscScalar a ! PetscScalar
       Mat X ! Mat
       MatStructure str ! MatStructure
       integer ierr
       end subroutine
        subroutine MatShift(Y, a ,ierr)
       Mat Y ! Mat
       PetscScalar a ! PetscScalar
       integer ierr
       end subroutine
        subroutine MatDiagonalSet(Y, D, is ,ierr)
       Mat Y ! Mat
       Vec D ! Vec
       InsertMode is ! InsertMode
       integer ierr
       end subroutine
        subroutine MatAYPX(Y, a, X, str ,ierr)
       Mat Y ! Mat
       PetscScalar a ! PetscScalar
       Mat X ! Mat
       MatStructure str ! MatStructure
       integer ierr
       end subroutine
        subroutine MatComputeExplicitOperator(inmat, mat ,ierr)
       Mat inmat ! Mat
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatCreate(comm, A ,ierr)
       integer comm ! MPI_Comm
       Mat A ! Mat
       integer ierr
       end subroutine
        subroutine MatSetSizes(A, m, n, mupper, nupper ,ierr)
       Mat A ! Mat
       PetscInt m ! PetscInt
       PetscInt n ! PetscInt
       PetscInt mupper ! PetscInt
       PetscInt nupper ! PetscInt
       integer ierr
       end subroutine
        subroutine MatSetFromOptions(B ,ierr)
       Mat B ! Mat
       integer ierr
       end subroutine
        subroutine MatSetUpPreallocation(B ,ierr)
       Mat B ! Mat
       integer ierr
       end subroutine
        subroutine MatGetColumnVector(A, yy, col ,ierr)
       Mat A ! Mat
       Vec yy ! Vec
       PetscInt col ! PetscInt
       integer ierr
       end subroutine
        subroutine MatShellSetContext(mat, ctx ,ierr)
       Mat mat ! Mat
       PetscVoid ctx ! void
       integer ierr
       end subroutine
        subroutine MatSeqBAIJInvertBlockDiagonal(mat ,ierr)
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatSeqBAIJSetColumnIndices(mat, indices ,ierr)
       Mat mat ! Mat
       PetscInt indices ! PetscInt
       integer ierr
       end subroutine
        subroutine MatCreateSeqBAIJWithArrays(comm, bs, m, n, i, j, a,  &
     &mat ,ierr)
       integer comm ! MPI_Comm
       PetscInt bs ! PetscInt
       PetscInt m ! PetscInt
       PetscInt n ! PetscInt
       PetscInt i ! PetscInt
       PetscInt j ! PetscInt
       PetscScalar a ! PetscScalar
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatMPIBAIJSetHashTableFactor(mat, fact ,ierr)
       Mat mat ! Mat
       PetscReal fact ! PetscReal
       integer ierr
       end subroutine
        subroutine MatSeqAIJSetColumnIndices(mat, indices ,ierr)
       Mat mat ! Mat
       PetscInt indices ! PetscInt
       integer ierr
       end subroutine
        subroutine MatStoreValues(mat ,ierr)
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatRetrieveValues(mat ,ierr)
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatSeqAIJSetPreallocationCSR(B, i, j, v ,ierr)
       Mat B ! Mat
       PetscInt i (*) ! PetscInt
       PetscInt j (*) ! PetscInt
       PetscScalar v (*) ! PetscScalar
       integer ierr
       end subroutine
        subroutine MatCreateSeqAIJWithArrays(comm, m, n, i, j, a, mat , &
     &ierr)
       integer comm ! MPI_Comm
       PetscInt m ! PetscInt
       PetscInt n ! PetscInt
       PetscInt i ! PetscInt
       PetscInt j ! PetscInt
       PetscScalar a ! PetscScalar
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatMPIAIJSetPreallocationCSR(B, i, j, v ,ierr)
       Mat B ! Mat
       PetscInt i (*) ! PetscInt
       PetscInt j (*) ! PetscInt
       PetscScalar v (*) ! PetscScalar
       integer ierr
       end subroutine
        subroutine MatCreateMPIAIJWithArrays(comm, m, n, mupper, nupper &
     &, i, j, a, mat ,ierr)
       integer comm ! MPI_Comm
       PetscInt m ! PetscInt
       PetscInt n ! PetscInt
       PetscInt mupper ! PetscInt
       PetscInt nupper ! PetscInt
       PetscInt i (*) ! PetscInt
       PetscInt j (*) ! PetscInt
       PetscScalar a (*) ! PetscScalar
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatMerge(comm, inmat, n, scall, outmat ,ierr)
       integer comm ! MPI_Comm
       Mat inmat ! Mat
       PetscInt n ! PetscInt
       MatReuse scall ! MatReuse
       Mat outmat ! Mat
       integer ierr
       end subroutine
        subroutine MatGetLocalMat(A, scall, A_loc ,ierr)
       Mat A ! Mat
       MatReuse scall ! MatReuse
       Mat A_loc ! Mat
       integer ierr
       end subroutine
        subroutine MatCreateMPIAIJWithSplitArrays(comm, m, n, mupper,   &
     &nupper, i, j, a, oi, oj, oa, mat ,ierr)
       integer comm ! MPI_Comm
       PetscInt m ! PetscInt
       PetscInt n ! PetscInt
       PetscInt mupper ! PetscInt
       PetscInt nupper ! PetscInt
       PetscInt i (*) ! PetscInt
       PetscInt j (*) ! PetscInt
       PetscScalar a (*) ! PetscScalar
       PetscInt oi (*) ! PetscInt
       PetscInt oj (*) ! PetscInt
       PetscScalar oa (*) ! PetscScalar
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatMFFDDSSetUmin(A, umin ,ierr)
       Mat A ! Mat
       PetscReal umin ! PetscReal
       integer ierr
       end subroutine
        subroutine MatMFFDWPSetComputeNormU(A, flag ,ierr)
       Mat A ! Mat
       PetscTruth flag ! PetscTruth
       integer ierr
       end subroutine
        subroutine MatMFFDSetFromOptions(mat ,ierr)
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatCreateMFFD(comm, m, n, mupper, nupper, J ,ierr)
       integer comm ! MPI_Comm
       PetscInt m ! PetscInt
       PetscInt n ! PetscInt
       PetscInt mupper ! PetscInt
       PetscInt nupper ! PetscInt
       Mat J ! Mat
       integer ierr
       end subroutine
        subroutine MatMFFDGetH(mat, h ,ierr)
       Mat mat ! Mat
       PetscScalar h ! PetscScalar
       integer ierr
       end subroutine
        subroutine MatMFFDSetPeriod(mat, period ,ierr)
       Mat mat ! Mat
       PetscInt period ! PetscInt
       integer ierr
       end subroutine
        subroutine MatMFFDSetFunctionError(mat, error ,ierr)
       Mat mat ! Mat
       PetscReal error ! PetscReal
       integer ierr
       end subroutine
        subroutine MatMFFDAddNullSpace(J, nullsp ,ierr)
       Mat J ! Mat
       MatNullSpace nullsp ! MatNullSpace
       integer ierr
       end subroutine
        subroutine MatMFFDSetHHistory(J, history, nhistory ,ierr)
       Mat J ! Mat
       PetscScalar history (*) ! PetscScalar
       PetscInt nhistory ! PetscInt
       integer ierr
       end subroutine
        subroutine MatMFFDResetHHistory(J ,ierr)
       Mat J ! Mat
       integer ierr
       end subroutine
        subroutine MatMFFDSetBase(J, U, F ,ierr)
       Mat J ! Mat
       Vec U ! Vec
       Vec F ! Vec
       integer ierr
       end subroutine
        subroutine MatMFFDCheckPositivity(dummy, U, a, h ,ierr)
       PetscVoid dummy ! void
       Vec U ! Vec
       Vec a ! Vec
       PetscScalar h ! PetscScalar
       integer ierr
       end subroutine
        subroutine MatSeqSBAIJSetColumnIndices(mat, indices ,ierr)
       Mat mat ! Mat
       PetscInt indices ! PetscInt
       integer ierr
       end subroutine
        subroutine MatCreateSeqSBAIJWithArrays(comm, bs, m, n, i, j, a, &
     &mat ,ierr)
       integer comm ! MPI_Comm
       PetscInt bs ! PetscInt
       PetscInt m ! PetscInt
       PetscInt n ! PetscInt
       PetscInt i ! PetscInt
       PetscInt j ! PetscInt
       PetscScalar a ! PetscScalar
       Mat mat ! Mat
       integer ierr
       end subroutine
        subroutine MatISGetLocalMat(mat, local ,ierr)
       Mat mat ! Mat
       Mat local ! Mat
       integer ierr
       end subroutine
        subroutine MatCreateIS(comm, m, n, mupper, nupper, map, A ,ierr)&
     &
       integer comm ! MPI_Comm
       PetscInt m ! PetscInt
       PetscInt n ! PetscInt
       PetscInt mupper ! PetscInt
       PetscInt nupper ! PetscInt
       ISLocalToGlobalMapping map ! ISLocalToGlobalMapping
       Mat A ! Mat
       integer ierr
       end subroutine
        subroutine MatDenseGetLocalMatrix(A, B ,ierr)
       Mat A ! Mat
       Mat B ! Mat
       integer ierr
       end subroutine
        subroutine MatCreateNormal(A, N ,ierr)
       Mat A ! Mat
       Mat N ! Mat
       integer ierr
       end subroutine
        subroutine MatCreateLRC(A, U, V, N ,ierr)
       Mat A ! Mat
       Mat U ! Mat
       Mat V ! Mat
       Mat N ! Mat
       integer ierr
       end subroutine
        subroutine MatScatterGetVecScatter(mat, scatter ,ierr)
       Mat mat ! Mat
       VecScatter scatter ! VecScatter
       integer ierr
       end subroutine
        subroutine MatScatterSetVecScatter(mat, scatter ,ierr)
       Mat mat ! Mat
       VecScatter scatter ! VecScatter
       integer ierr
       end subroutine
        subroutine MatCreateSeqFFTW(comm, ndim, dim, A ,ierr)
       integer comm ! MPI_Comm
       PetscInt ndim ! PetscInt
       PetscInt dim (*) ! PetscInt
       Mat A ! Mat
       integer ierr
       end subroutine
        subroutine MatCompositeAddMat(mat, smat ,ierr)
       Mat mat ! Mat
       Mat smat ! Mat
       integer ierr
       end subroutine
        subroutine MatCreateTranspose(A, N ,ierr)
       Mat A ! Mat
       Mat N ! Mat
       integer ierr
       end subroutine
        subroutine MatRegisterDAAD(ierr)
       integer ierr
       end subroutine
-------------- next part --------------

#if !defined(PETSC_USE_FORTRAN_MODULES) 
#include "finclude/ftn-custom/petscmatdef.h90"
#endif


#if defined(PETSC_USE_FORTRAN_DATATYPES) && !defined(MAT_HIDE)
#define MAT_HIDE type(Mat)
#define MATFDCOLORING_HIDE type(MatFDColoring)
#define MATNULLSPACE_HIDE type(MatNullSpace)
#define USE_MAT_HIDE use petscmatdef
#elif !defined(MAT_HIDE)
#define MAT_HIDE Mat
#define MATFDCOLORING_HIDE MatFDColoring
#define MATNULLSPACE_HIDE MatNullSpace
#define USE_MAT_HIDE
#endif

      Interface 
        Subroutine MatGetArrayF90(mat,array,ierr)
          USE_MAT_HIDE
          PetscScalar, pointer :: array(:,:)
          PetscErrorCode ierr
          MAT_HIDE     mat
        End Subroutine
      End Interface


      Interface 
        Subroutine MatRestoreArrayF90(mat,array,ierr)
          USE_MAT_HIDE
          PetscScalar, pointer :: array(:,:)
          PetscErrorCode ierr
          MAT_HIDE     mat
        End Subroutine
      End Interface

      Interface
         Subroutine MatGetInfo(mat, flag, info ,ierr)
         USE_MAT_HIDE
         MAT_HIDE  mat
         MatInfoType flag
         MatInfo info(:)
         PetscErrorCode ierr
       End Subroutine
      End Interface
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: matrixf.c
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090529/b1a0c098/attachment-0003.diff>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: zmatrixf.c
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090529/b1a0c098/attachment-0004.diff>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: matrix.c
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090529/b1a0c098/attachment-0005.diff>


More information about the petsc-users mailing list