1# Changes: 2.0.17 2 3```{rubric} General: 4``` 5 6- Added support for Windows NT/95 using the Microsoft Developers 7 Studio Visual C++. See the file 'Installation' for details. 8- Other new machines on which this release has been tested: Cray 9 T3E, SGI Origin See the file petsc/Installation for a complete 10 list. 11 12```{rubric} TS (Timestepping Solvers): 13``` 14 15- Modified the pseudo-transient continuation updates: 16- Changed the default update to dt = 17 current_dt\*previous_fnorm/current_fnorm. 18- Added the routine TSPseudoIncrementDtFromInitialDt() and the 19 corresponding option -ts_pseudo_increment_dt_from_initial_dt to 20 indicate use of the alternative update formula dt = 21 initial_dt\*initial_fnorm/current_fnorm. 22- Changed the calling sequence of TSRegister(). 23 24```{rubric} SNES (Nonlinear Solvers): 25``` 26 27- Added support for computing large, sparse Jacobians efficiently 28 via finite differences, see Section 5.6 (Finite Difference 29 Jacobian Approximations) of the users manual. 30- Added the routines SNESGetNumberLinearIterations() and 31 SNESSetConvergenceHistory(). See man pages for details. 32- Activated a counter of function evaluations, which is used in 33 convergence tests to terminate solver if the number of function 34 evaluations exceeds a given tolerance. Note: Users of matrix-free 35 Newton-Krylov methods may need to reset the default allowable 36 maximum (1000), via SNESSetTolerances() or -snes_max_func 37 \<maxfunc>. 38- Changed the calling sequence of SNESRegister(). 39 40```{rubric} SLES (Linear Solvers): 41``` 42 43- See PC and KSP 44 45```{rubric} KSP (Krylov Subspace Methods): 46``` 47 48- Changed the calling sequence of KSPRegister(). 49 50```{rubric} PC (Preconditioners): 51``` 52 53- Changed the calling sequence of PCRegister(). 54- New Additive Schwarz variants (preconditioner type PCASM) 55- Added the routine PCASMSetType() (and the corresponding option 56 -pc_asm_type [basic,restrict,interpolate,none]) for setting the 57 variant of the additive Schwarz method. See the man page and users 58 manual for details. 59- Changed the default variant of PCASM from full restriction and 60 interpolation to full restriction only, since this version 61 requires less communication and for many problems converges faster 62 than the basic variant that uses full restriction and 63 interpolation. Users can still employ the basic ASM by calling 64 PCASMSetType(pc,PC_ASM_BASIC) or by using the option -pc_asm_type 65 basic. 66- Added an interface to the SPAI preconditioner implementation of 67 Steven Bernard; see src/contrib/spai. This has undergone little 68 testing and optimization; it is intended mainly for "hackers". 69 70```{rubric} MAT (Matrices): 71``` 72 73- Added the matrix option, 74 MatSetOption(mat,MAT_NEW_NONZERO_LOCATION_ERROR), that will cause 75 an error if a new nonzero is generated in a sparse matrix. 76 (currently implemented for AIJ and BAIJ matrices only). This is a 77 useful flag when using SAME_NONZERO_PATTERN in calling 78 SLESSetOperators() to ensure that the nonzero pattern truly does 79 remain unchanged. For examples, see the programs 80 petsc/src/snes/examples/tutorials/[ex5.c,ex5f.F]. 81- Added the routine MatSetUnfactored(), intended primarily for use 82 with in-place ILU(0) factorization as a preconditioner for 83 matrix-free Krylov methods. See the manual page for details. 84- Added the routines MatConvertRegisterAll() and 85 MatLoadRegisterAll() to allow the restriction of the matrix 86 routines linked into an application code. This can decrease the 87 size of your executable and the time it takes to link your 88 program. For details, see the manual page and 89 petsc/src/snes/examples/tutorials/ex5.c 90- Added the routine MatSetValuesBlocked(), for more efficient 91 assembly of block AIJ formatted matrices (MATSEQBAIJ and 92 MATMPIBAIJ). 93- Changed the calling sequence of MatReorderingRegister(); 94 95```{rubric} DA (Distributed Arrays): 96``` 97 98- Added additional arguments to DACreate1d(), DACreate2d(), and 99 DACreate3d() to allow the user to set the distribution of nodes on 100 each processor; set these arguments to PETSC_NULL for the standard 101 default distribution. 102- Modified DAGetInfo() to return the type of periodicity. 103 104```{rubric} VEC (Vectors): 105``` 106 107- Added the routine VecCreateGhost() to create vectors that have 108 ghost padding at the end of the local array. This is useful for 109 gathering remote values to perform local calculations that involve 110 off-processor ghost values. This is often appropriate for codes 111 using unstructured grids. See 112 petsc/src/vec/examples/tutorials/ex9.c for possible usage. 113 114```{rubric} IS (Index Sets): 115``` 116 117```{rubric} Draw (Graphics): 118``` 119 120- Application codes should not need to use #include "draw.h" anymore 121 from C/C++, since this file is now included automatically when 122 "petsc.h" or any other PETSc include file is included. 123 124```{rubric} Viewers: 125``` 126 127- VIEWER_DRAWX_WORLD, VIEWER_DRAWX_SELF, VIEWER_MATLAB_WORLD are now 128 supported from Fortran. 129- Added VIEWER_DRAWX\_(MPI_Comm comm) from C. Useful for rapid code 130 prototyping without having to declare a Viewer. 131 132```{rubric} System Routines: 133``` 134 135- Since memory leaks and uninitialized memory can be serious 136 problems for large-scale application codes, we've added several 137 new tools to assist in their diagnosis. These tools are all work 138 in conjunction with the PETSc memory allocation (the default for 139 codes that are compiled in debug mode with 140 BOPT=[g,g_c++,g_complex]). 141- Added the runtime option -trmalloc_log, which activates logging of 142 all calls to malloc via the new routines PetscTrLog() and 143 PetscTrLogDump(). 144- Added the routine PetscGetResidentSetSize() to determine the total 145 memory used by a process (this is activated by -trmalloc_log); see 146 the man page for details. 147- Added the option -trmalloc_nan for tracking down allocated memory 148 that is used before it has been initialized. This option calls the 149 new routines PetscInitializeNans() and PetscInitializeLargeInts(). 150 So far these work on the Sun4 system. 151 152```{rubric} Error Handling: 153``` 154 155- The error checking macros SETERRQ() and SETERRA() now have the 156 calling sequence SETERRQ(int ierr,int pierr,char \*message); where 157 pierr is an additional integer error code passed to the error 158 handler. Currently you should just set pierr=1. 159- Also, SETERRQ() and SETERRA() now use the macro \_\_FUNC\_\_ to keep 160 track of routine names. Users need not worry about this in their 161 application codes, but can take advantage of this feature if 162 desired by setting this macro before each user-defined routine 163 that may call SETERRQ(), SETERRA(), CHKERRQ(), or CHKERRA(). 164 \_\_FUNC\_\_ should be set to a string containing the routine name. 165 For example, #undef \_\_FUNC\_\_ #define \_\_FUNC\_\_ "MyRoutine1" int 166 MyRoutine1() { /\* code here \*/ return 0; } See 167 petsc/src/snes/examples/tutorials/ex3.c for an example. 168- PETSc error handlers now take two additional arguments. Consult 169 the man page for PetscPushErrorHandler() for more information. 170 171```{rubric} Event Logging: 172``` 173 174- Changed PLogPrintSummary(MPI_Comm,FILE \*) to 175 PLogPrintSummary(MPI_Comm,char \*). 176- Now the option -log_summary takes [filename] as an optional 177 argument. 178 179```{rubric} Fortran Interface: 180``` 181 182- Added some limited support for direct use of Fortran90 pointers in 183 the routines Vec[Get,Restore]ArrayF90(), 184 Mat[Get,Restore]ArrayF90(), IS[Get,Restore]IndicesF90(), 185 ISBlock[Get,Restore]IndicesF90(), VecDuplicateVecsF90(), 186 VecDestroyVecsF90(), DAGetGlobalIndicesF90(). See the man pages 187 and the section 'Fortran90' in the users manal for details. 188 Unfortunately, these routines currently work only with the NAG F90 189 compiler. We hope to support other compilers as well, but we will 190 need assistance from the vendors since the Fortran90/C interface 191 is not a defined standard. 192- Added the macro PetscDoubleExp(a,b) = a d b (machines where double 193 precision arithmetic is used) = a e b (machines where single 194 precision arithmetic is used, e.g., Crays) This macro is intended 195 for use only if you wish to maintain a Fortran code that is 196 portable to both the Cray T3d/T3e and other Unix machines. 197- For mixed Fortran/C users: added the makefile flag FCONF that may 198 be used in place of the flag CONF. For an example of usage, see 199 src/vec/examples/tutorials/makefile 200