1: ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2: ! Include file for program chwirut2f.F 3: ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4: ! 6: #include "petsc/finclude/petsctao.h" 7: use petsctao 8: implicit none 10: ! Common blocks: 11: ! In this example we use common blocks to store data needed by the 12: ! Section 1.5 Writing Application Codes with PETSc-provided call-back routines, FormMinimizationFunction(), 13: ! FormFunctionGradient(), and FormHessian(). Note that we can store 14: ! (pointers to) TAO objects within these common blocks. 15: ! 16: ! common /params/ - contains parameters that help to define the Section 1.5 Writing Application Codes with PETSc 17: ! 18: PetscReal t(0:213) 19: PetscReal y(0:213) 20: PetscInt m,n 21: PetscMPIInt nn 22: PetscMPIInt rank 23: PetscMPIInt size 24: PetscMPIInt idle_tag, die_tag 25: parameter (m=214) 26: parameter (n=3) 27: parameter (nn=n) 28: parameter (idle_tag=2000) 29: parameter (die_tag=3000) 31: common /params/ t,y,rank,size 33: ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -