1: ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2: ! Include file for program eptorsion2f.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 and
26: ! index sets:
27: ! petscdm.h - distributed arrays (DA)
28: ! petscis.h - index sets (IS)
30: #include finclude/petscsys.h 31: #include finclude/petscvec.h 32: #include finclude/petscmat.h 33: #include finclude/petscksp.h 34: #include finclude/petscpc.h 35: #include finclude/petscsnes.h 36: #include finclude/petscdmda.h 37: #include finclude/petscdm.h 38: #include finclude/petscis.h 39: #include finclude/petsctao.h 41: ! Common blocks:
42: ! In this example we use common blocks to store data needed by the
43: ! application-provided call-back routines, FormFunction(), FormGradient(),
44: ! and FormHessian(). Note that we can store (pointers to) TAO objects
45: ! within these common blocks.
46: !
47: ! common /params/ - contains parameters for the global application
48: ! mx, my - global discretization in x- and y-directions
49: ! param - nonlinearity parameter
50: !
51: ! common /pdata/ - contains some parallel data
52: ! localX - local work vector (including ghost points)
53: ! localS - local work vector (including ghost points)
54: ! dm - distributed array
55: !
56: Vec localX
57: DM dm
58: PetscReal param
59: PetscInt mx, my
61: common /params/ param,mx,my
62: common /pdata/ dm,localX
64: ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -