Date: 2013-07-02T14:39:27+00:00

Actual source code: somefort.F
petsc-3.4.2 2013-07-02

      1: !
      2: !
      3: !     Utility routine used to set constants into the
      4: !     PETSc Fortran common block
      5: !

      7:       subroutine PetscSetCommonBlock(c1,c2)
      8:       implicit none

     10: #include      <finclude/petscsys.h>

     12:       integer c1,c2

     14:       PETSC_COMM_WORLD    = c1
     15:       PETSC_COMM_SELF     = c2

     17:       call PetscSetFortranBasePointers(PETSC_NULL_CHARACTER,            &
     18:      &     PETSC_NULL_INTEGER,PETSC_NULL_SCALAR,                        &
     19:      &     PETSC_NULL_DOUBLE,PETSC_NULL_REAL,PETSC_NULL_OBJECT,         &
     20:      &     PETSC_NULL_BOOL,PETSC_NULL_FUNCTION)

     22:       return
     23:       end

     25:       subroutine PetscGetCommonCOMM(c1)
     26:       implicit none
     27: #include      <finclude/petscsys.h>
     28:       integer c1

     30:       c1 = PETSC_COMM_WORLD
     31:       return
     32:       end

     34:       block data PetscCommInit
     35:       implicit none
     36: !
     37: !     this code is duplicated - because including finclude/petscsys.h here
     38: !     gives compile errors.
     39: !
     40:       MPI_Comm PETSC_COMM_WORLD
     41:       MPI_Comm PETSC_COMM_SELF
     42:       common /petscfortran9/ PETSC_COMM_WORLD
     43:       common /petscfortran10/ PETSC_COMM_SELF
     44:       data   PETSC_COMM_WORLD /0/
     45:       data   PETSC_COMM_SELF /0/
     46:       end