Date: 2021-03-03T22:27:46+00:00

Actual source code: ex5f.h
petsc-3.14.5 2021-03-03
Report Typos and Errors

      1: !
      2: !  See the Fortran section of the PETSc users manual for details.
      3: !
      4: !  Common blocks:
      5: !  In this example we use common blocks to store data needed by the
      6: !  application-provided call-back routines, FormJacobian() and
      7: !  FormFunction().  Note that we can store (pointers to)
      8: !  PETSc objects within these common blocks.
      9: !
     10: !  common /params/ - contains parameters for the global application
     11: !     mx, my   - global discretization in x- and y-directions
     12: !     lambda   - nonlinearity parameter
     13: !
     14: !  common /pdata/  - contains some parallel data
     15: !     da       - distributed array
     16: !     rank     - processor rank within communicator
     17: !     size     - number of processors
     18: !     xs, ys   - local starting grid indices (no ghost points)
     19: !     xm, ym   - widths of local grid (no ghost points)
     20: !     gxs, gys - local starting grid indices (including ghost points)
     21: !     gxm, gym - widths of local grid (including ghost points)

     23:       PetscInt xs,xe,xm,gxs,gxe,gxm
     24:       PetscInt ys,ye,ym,gys,gye,gym
     25:       PetscInt mx,my
     26:       PetscMPIInt rank,size
     27:       PetscReal lambda

     29:       common /params/ lambda,mx,my
     30:       common /pdata/  xs,xe,xm,gxs,gxe,gxm
     31:       common /pdata/  ys,ye,ym,gys,gye,gym
     32:       common /pdata/  rank,size

     34: ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -