Actual source code: plate2f.h
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: ! petscda.h - distributed arrays (DAs)
28: #include "include/finclude/petsc.h"
29: #include "include/finclude/petscvec.h"
30: #include "include/finclude/petscmat.h"
31: #include "include/finclude/petscksp.h"
32: #include "include/finclude/petscpc.h"
33: #include "include/finclude/petscsnes.h"
34: #include "include/finclude/petscda.h"
35: #include "include/finclude/petscis.h"
36: ! For random numbers:
37: #include "include/finclude/petscsys.h"
38: #include "include/finclude/tao_solver.h"
39: ! Common blocks:
40: ! In this example we use common blocks to store data needed by the
41: ! application-provided call-back routines, FormFunction(), FormGradient(),
42: ! and FormHessian(). Note that we can store (pointers to) TAO objects
43: ! within these common blocks.
44: !
45: ! common /params/ - contains parameters for the global application
46: ! mx, my - global discretization in x- and y-directions
47: ! hx, hy - mesh spacing in x- and y-directions
48: ! N - dimension of global vectorn
49: ! bheight - height of plate
50: ! bmx,bmy - grid dimensions under plate
51: !
52: ! common /pdata/ - contains some parallel data
53: ! localX - local work vector (including ghost points)
54: ! localV - local work vector (including ghost points)
55: ! Top, Bottom, Left, Right - boundary vectors
56: ! Nx, Ny - number of processes in x- and y- directions
57: ! da - distributed array
59: Vec localX, localV
60: Vec Top, Left
61: Vec Right, Bottom
62: DA da
63: double precision bheight
64: integer bmx, bmy
65: integer mx, my, Nx, Ny, N
68: common /params/ mx,my,bmx,bmy,bheight,N
69: common /pdata/ da,localX,localV,Nx,Ny
70: common /pdata/ Left, Top, Right, Bottom
72: ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -