1: ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2: ! Include file for program chwirut2f.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
27: #include finclude/petscsys.h 28: #include finclude/petscvec.h 29: #include finclude/petsctao.h 31: ! Common blocks:
32: ! In this example we use common blocks to store data needed by the
33: ! application-provided call-back routines, FormMinimizationFunction(),
34: ! FormFunctionGradient(), and FormHessian(). Note that we can store
35: ! (pointers to) TAO objects within these common blocks.
36: !
37: ! common /params/ - contains parameters that help to define the application
38: !
39: PetscReal t(0:213)
40: PetscReal y(0:213)
41: PetscInt m,n
42: PetscInt rank
43: PetscInt size
44: PetscInt idle_tag, die_tag
45: parameter (m=214)
46: parameter (n=3)
47: parameter (idle_tag=2000)
48: parameter (die_tag=3000)
50: common /params/ t,y,rank,size
52: ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -