Actual source code: eptorsion2f.h
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: ! petscda.h - distributed arrays (DA)
28: ! petscis.h - index sets (IS)
30: #include "include/finclude/petsc.h"
31: #include "include/finclude/petscvec.h"
32: #include "include/finclude/petscmat.h"
33: #include "include/finclude/petscksp.h"
34: #include "include/finclude/petscpc.h"
35: #include "include/finclude/petscsnes.h"
36: #include "include/finclude/petscda.h"
37: #include "include/finclude/petscis.h"
38: #include "include/finclude/tao_solver.h"
40: ! Common blocks:
41: ! In this example we use common blocks to store data needed by the
42: ! application-provided call-back routines, FormFunction(), FormGradient(),
43: ! and FormHessian(). Note that we can store (pointers to) TAO objects
44: ! within these common blocks.
45: !
46: ! common /params/ - contains parameters for the global application
47: ! mx, my - global discretization in x- and y-directions
48: ! param - nonlinearity parameter
49: !
50: ! common /pdata/ - contains some parallel data
51: ! localX - local work vector (including ghost points)
52: ! localS - local work vector (including ghost points)
53: ! da - distributed array
54: !
55: Vec localX
56: DA da
57: double precision param
58: integer mx, my
60: common /params/ param,mx,my
61: common /pdata/ da,localX
63: ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -