perhaps this routine does not need custom fortran interface.

Does the attached src/mat/impls/nest/ftn-auto/matnestf.c work [with petsc-3.4]?

If so - I'll add this to  petsc dev [master]

thanks,
Satish

On Fri, 13 Jun 2014, Klaij, Christiaan wrote:

> Perhaps this message from May 27 "slipped through the email cracks" as Matt 
> puts it?
> 
> Chris
> 
> 
> dr. ir. Christiaan Klaij
> CFD Researcher
> Research & Development
> E mailto:[email protected]
> T +31 317 49 33 44
> 
> 
> MARIN
> 2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands
> T +31 317 49 39 11, F +31 317 49 32 45, I www.marin.nl
> 
> ________________________________________
> From: Klaij, Christiaan
> Sent: Monday, June 02, 2014 9:54 AM
> To: [email protected]
> Subject: RE: MatNestGetISs in fortran
> 
> Just a reminder. Could you please add fortran support for MatNestGetISs?
> ________________________________________
> From: Klaij, Christiaan
> Sent: Tuesday, May 27, 2014 3:47 PM
> To: [email protected]
> Subject: MatNestGetISs in fortran
> 
> I'm trying to use MatNestGetISs in a fortran program but it seems to be 
> missing from the fortran include file (PETSc 3.4).
> 
> 
#include "petscsys.h"
#include "petscfix.h"
#include "petsc-private/fortranimpl.h"
/* matnest.c */
/* Fortran interface file */

/*
* This file was generated automatically by bfort from the C source
* file.  
 */

#ifdef PETSC_USE_POINTER_CONVERSION
#if defined(__cplusplus)
extern "C" { 
#endif 
extern void *PetscToPointer(void*);
extern int PetscFromPointer(void *);
extern void PetscRmPointer(void*);
#if defined(__cplusplus)
} 
#endif 

#else

#define PetscToPointer(a) (*(PetscFortranAddr *)(a))
#define PetscFromPointer(a) (PetscFortranAddr)(a)
#define PetscRmPointer(a)
#endif

#include "petscmat.h"
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define matnestgetsubmat_ MATNESTGETSUBMAT
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && 
!defined(FORTRANDOUBLEUNDERSCORE)
#define matnestgetsubmat_ matnestgetsubmat
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define matnestsetsubmat_ MATNESTSETSUBMAT
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && 
!defined(FORTRANDOUBLEUNDERSCORE)
#define matnestsetsubmat_ matnestsetsubmat
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define matnestgetsize_ MATNESTGETSIZE
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && 
!defined(FORTRANDOUBLEUNDERSCORE)
#define matnestgetsize_ matnestgetsize
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define matnestgetiss_ MATNESTGETISS
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && 
!defined(FORTRANDOUBLEUNDERSCORE)
#define matnestgetiss_ matnestgetiss
#endif
#ifdef PETSC_HAVE_FORTRAN_CAPS
#define matnestsetsubmats_ MATNESTSETSUBMATS
#elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && 
!defined(FORTRANDOUBLEUNDERSCORE)
#define matnestsetsubmats_ matnestsetsubmats
#endif


/* Definitions of Fortran Wrapper routines */
#if defined(__cplusplus)
extern "C" {
#endif
void PETSC_STDCALL  matnestgetsubmat_(Mat A,PetscInt *idxm,PetscInt *jdxm,Mat 
*sub, int *__ierr ){
*__ierr = MatNestGetSubMat(
        (Mat)PetscToPointer((A) ),*idxm,*jdxm,sub);
}
void PETSC_STDCALL  matnestsetsubmat_(Mat A,PetscInt *idxm,PetscInt *jdxm,Mat 
sub, int *__ierr ){
*__ierr = MatNestSetSubMat(
        (Mat)PetscToPointer((A) ),*idxm,*jdxm,
        (Mat)PetscToPointer((sub) ));
}
void PETSC_STDCALL  matnestgetsize_(Mat A,PetscInt *M,PetscInt *N, int *__ierr 
){
*__ierr = MatNestGetSize(
        (Mat)PetscToPointer((A) ),M,N);
}
void PETSC_STDCALL  matnestgetiss_(Mat A,IS rows[],IS cols[], int *__ierr ){
*__ierr = MatNestGetISs(
        (Mat)PetscToPointer((A) ),rows,cols);
}
void PETSC_STDCALL  matnestsetsubmats_(Mat A,PetscInt *nr, IS is_row[],PetscInt 
*nc, IS is_col[], Mat a[], int *__ierr ){
*__ierr = MatNestSetSubMats(
        (Mat)PetscToPointer((A) ),*nr,is_row,*nc,is_col,a);
}
#if defined(__cplusplus)
}
#endif

Reply via email to