1: ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2: ! Include file for program plate.f
3: ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
4: !
5: ! This program uses CPP for preprocessing, as indicated by the use of
6: ! TAO include files in the directories $TAO_DIR/include/finclude and
7: ! $PETSC_DIR/include/finclude. This convention enables use of the CPP
8: ! preprocessor, which allows the use of the #include statements that
9: ! define TAO objects and variables.
10: !
11: ! Since one must be very careful to include each file no more than once
12: ! in a Fortran routine, application programmers must explicitly list
13: ! each file needed for the various TAO and PETSc components within their
14: ! program (unlike the C/C++ interface).
15: !
16: ! See the Fortran section of the PETSc users manual for details.
17: !
18: ! The following include statements are generally used in TAO programs:
19: ! tao_solver.h - TAO solvers
20: ! petscksp.h - Krylov subspace methods
21: ! petscpc.h - preconditioners
22: ! petscmat.h - matrices
23: ! petscvec.h - vectors
24: ! petsc.h - basic PETSc routines
25: ! In addition, we need the following for use of distributed arrays
26: ! petscdm.h - distributed arrays (DMs)
28: #include finclude/petscsys.h 29: #include finclude/petscvec.h 30: #include finclude/petscmat.h 31: #include finclude/petscksp.h 32: #include finclude/petscpc.h 33: #include finclude/petscsnes.h 34: #include finclude/petscdmda.h 35: #include finclude/petscdm.h 36: #include finclude/petscis.h 37: #include finclude/petsctao.h 38: ! Common blocks:
39: ! In this example we use common blocks to store data needed by the
40: ! application-provided call-back routines, FormFunction(), FormGradient(),
41: ! and FormHessian(). Note that we can store (pointers to) TAO objects
42: ! within these common blocks.
43: !
44: ! common /params/ - contains parameters for the global application
45: ! mx, my - global discretization in x- and y-directions
46: ! hx, hy - mesh spacing in x- and y-directions
47: ! N - dimension of global vectorn
48: ! bheight - height of plate
49: ! bmx,bmy - grid dimensions under plate
50: !
51: ! common /pdata/ - contains some parallel data
52: ! localX - local work vector (including ghost points)
53: ! localV - local work vector (including ghost points)
54: ! Top, Bottom, Left, Right - boundary vectors
55: ! Nx, Ny - number of processes in x- and y- directions
56: ! dm - distributed array
58: Vec localX, localV
59: Vec Top, Left
60: Vec Right, Bottom
61: DM dm
62: PetscReal bheight
63: PetscInt bmx, bmy
64: PetscInt mx, my, Nx, Ny, N
67: common /params/ mx,my,bmx,bmy,bheight,N
68: common /pdata/ dm,localX,localV,Nx,Ny
69: common /pdata/ Left, Top, Right, Bottom
71: ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -