Actual source code: somefort.F
petsc-3.3-p7 2013-05-11
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,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