1# Changes: 3.8 2 3```{rubric} General: 4``` 5 6- `--download-metis` is changed to not builds metis with flag 7 `-DMETIS_USE_DOUBLEPRECISION=1` to have consistent behavior 8 between single/double/quad precision builds (and with external 9 build of metis). This affects parmetis as well 10 11```{rubric} Configure/Build: 12``` 13 14- removed with-mpiuni-fortran-binding option 15- removed with-fortran-interfaces option 16- removed with-fortran-datatypes option 17- Added --download-openblas --download-openblas-64-bit-blas-indices 18 19```{rubric} IS: 20``` 21 22- Changed IS_COLORING_GHOSTED to IS_COLORING_LOCAL to match 23 convention. 24- Added ISRenumber to renumber an IS into a contiguous set. 25- ISGlobalToLocalMappingType is now ISGlobalToLocalMappingMode. 26- Added ISGlobalToLocalMappingSetType() to change the algorithm used 27 to apply the mapping. Choices are ISGLOBALTOLOCALMAPPINGBASIC 28 (faster) or ISGLOBALTOLOCALMAPPINGHASH (for large problems, much 29 more scalable in memory usage) 30 31```{rubric} PetscDraw: 32``` 33 34```{rubric} PetscRandom: 35``` 36 37- Added PETSCRANDOM123, a wrapper to the counter-based random number 38 generator 39 [Random123](http://www.deshawresearch.com/resources_random123.html). 40 41```{rubric} PF: 42``` 43 44```{rubric} Vec: 45``` 46 47```{rubric} VecScatter: 48``` 49 50```{rubric} PetscSection: 51``` 52 53```{rubric} Mat: 54``` 55 56- Added a new argument in MatCreateLRC() to express the low-rank 57 correction as A+U\*C\*V'. 58- MatTranspose() now properly handles MAT_INITIAL_MATRIX, 59 MAT_REUSE_MATRIX, MAT_INPLACE_MATRIX. 60- Renamed MatCreateSubMatrix() to MatCreateSubMatrixVirtual(). 61- Renamed MatSubMatrixUpdate() to MatSubMatrixUpdateVirtual(). 62- Renamed MatGetSubMatrices() to MatCreateSubMatrices(). 63- Added MatDestroySubMatrices(). 64- Renamed MatGetSubMatricesMPI() to MatCreateSubMatricesMPI(). 65- Renamed MatGetSubMatrix() to MatCreateSubMatrix(). 66- Renamed MatGetSubMatrixOption() to MatCreateSubMatrixOption(). 67- MatSetOption(mat,MAT_IGNORE_ZERO_ENTRIES,PETSC_TRUE) no longer 68 applies to zero values set or added to the matrix diagonal, they 69 are now not ignored and are included in the matrix nonzero 70 structure. This is useful for Jacobians passed to TS. 71- Added MatFactorSchurStatus. 72 MatFactorGet/Restore/CreateSchurComplement now take an extra 73 status argument. 74- Added MatMatSolveTranspose to solve transposed linear systems for 75 multiple right-hand sides. 76- Added MATAIJMKL and MATBAIJMKL to facilitate use of Intel MKL 77 sparse BLAS routines with matrices stored in AIJ/BAIJ format. 78 79```{rubric} PC: 80``` 81 82- The is_local argument to PCASMSetLocalSubdomains() is now ignored 83 UNLESS the PCASMType is set to restrict 84- Added PCMGSetNumberSmooth() 85- PCMGSetGalerkin() and -pc_mg_galerkin now take 86 PC_MG_GALERKIN_BOTH,PC_MG_GALERKIN_PMAT,PC_MG_GALERKIN_MAT, 87 PC_MG_GALERKIN_NONE as arguments instead of PetscBool 88- Added PCBDDCSetDivergenceMat to help BDDC to compute the flux 89 across the subdomain interfaces. 90- Removed PCBDDCSetNullSpace. Local nullspace information should now 91 be attached to the subdomain matrix via MatSetNullSpace. 92- Added additional PetscBool parameter to 93 PCBDDCCreateFETIDPOperators for the specification of the type of 94 multipliers. 95- Added additional string parameter to PCBDDCCreateFETIDPOperators 96 for the specification of the prefix (can be NULL). 97- FIELDSPLIT now extracts off-diag fieldsplit blocks from the 98 preconditioner instead of the jacobian by default. Use 99 -pc_fieldsplit_off_diag_use_amat to use the jacobian matrix. 100- Added PCFieldSplitSetSchurScale to control the scaling factor of 101 the Schur complement with the DIAG factorization. The 102 corresponding command line option is -pc_fieldsplit_schur_scale. 103 104```{rubric} KSP: 105``` 106 107- Added KSPFETIDP, a linear system solver based on the FETI-DP 108 method. 109- Added the KSPGuess class: available methods are KSPGUESSFISCHER 110 and KSPGUESSPOD. The new KSPGUESSPOD computes an initial guess 111 using the Proper Orthogonal Decomposition technique. 112- KSPFischerGuessCreate has been removed: see the man page of 113 KSPGUESSFISCHER for how to create a Fischer type initial guess. 114- KSPCHEBYSHEV: replace KSPChebyshevEstEigSetUseRandom() with 115 KSPChebyshevEstEigSetUseNoisy(), using a deterministic algorithm 116 to generate noisy vectors. 117 118```{rubric} SNES: 119``` 120 121```{rubric} SNESLineSearch: 122``` 123 124```{rubric} TS: 125``` 126 127- Changed TSGL to TSGLLE. 128- -ts_monitor binary now saves the timestep information as a REAL 129 entry consisting of the REAL_FILE_CLASSID followed by the real 130 value. PetscBinaryRead.m and PetscBinaryIO.py can read these in 131 automatically. 132- Added TSRK5BS scheme to TSRK. 133- Added TSADAPTDSP adaptive controller based on digital signal 134 processing techniques. 135- Removed command line option `-ts_theta_adapt`, use 136 `-ts_adapt_type basic` to turn on adaptivity in TSTHETA. 137- Remove command line option `-ts_alpha_adapt` and routines 138 TSAlphaUseAdapt()/TSAlpha2UseAdapt(), use `-ts_adapt_type basic` 139 to turn on adaptivity in TSALPHA/TSALPHA2. 140- Removed TSBDFUseAdapt(), using time step adaptivity in TSBDF is 141 now the default, use `-ts_adapt_type none` to turn adaptivity 142 off. 143- Added TSAdaptSetAlwaysAccept() to set whether to always accept 144 steps. 145- Added TSAdapt{Set|Get}Safety() to set safety factors and renamed 146 option `-ts_adapt_basic_[reject_]safety` to 147 `-ts_adapt_[reject_]safety`. 148- Renamed TSAdaptBasic{Set|Get}Clip() and option 149 `-ts_adapt_basic_clip` to TSAdapt{Set|Get}Clip() and 150 `-ts_adapt_clip`. 151- Added TSAdaptGetStepLimits() to get minimum and maximum allowed 152 time step. 153- Calling TSAdaptSetType() will reset all option values (safety 154 factors, clipping factors, etc) to default values. 155- Added TS{Set|Get}MaxSteps() and TS{Set|Get}MaxTime(), deprecated 156 TS{Set|Get}Duration(). 157- Added TSGetStepNumber(), deprecated TSGetTimeStepNumber() and 158 TSGetTotalSteps(). 159- Deprecated TSSetInitialTimeStep(), use TSSetTime() and 160 TSSetTimeStep(). 161 162```{rubric} DM/DA: 163``` 164 165- Changed prototypes for DMCompositeGather() and 166 DMCompositeGatherArray() 167- Replace calls to DMDACreateXd() with DMDACreateXd(), 168 [DMSetFromOptions()] DMSetUp() 169- DMDACreateXd() no longer can take negative values for dimensions, 170 instead pass positive values and call DMSetFromOptions() 171 immediately after 172- Added DMSwarm which supports data management and data movement of 173 arbitrary fields defined on a point set. Such functionality is 174 useful for partcle based methods. High level support for 175 particle-in-cell methods is provided when using either a DMDA or 176 DMPLEX mesh. 177 178```{rubric} DMPlex: 179``` 180 181- Added DMPlexRefineSimplexToTensor to refine simplicial into tensor 182 product cell meshes. 183- Added PTScotch partitioner. 184 185```{rubric} PetscViewer: 186``` 187 188```{rubric} SYS: 189``` 190 191- -help now has the option -help intro that only prints the programs 192 help string and then exits the program 193- Petsc64bitInt -> PetscInt64, PetscIntMult64bit() -> 194 PetscInt64Mult(), PetscBagRegister64bitInt() -> 195 PetscBagRegisterInt64() 196 197```{rubric} AO: 198``` 199 200```{rubric} Sieve: 201``` 202 203```{rubric} Fortran: 204``` 205 206PETSC_NULL_INTEGER, PETSC_NULL_REAL etc are now declared as arrays of 207size one instead of as scalar values. 208New shorter calling sequence for PetscError() from Fortran 209SETERRQ(), and CHKERRQ from Fortran now have the same behavior as in 210C and automatically return on errors, they do not abort. 211Correspondingly SERERRA() and CHKERRA() should be used in 'program 212main' - as return is not possible from it. These macros should be 213used from .F90 files because they require long lines 214Simplified Fortran usage. Now you only include 215petsc/finclude/petscXXX and use petscXXX 216 217- For each Fortran function (and main) use the following 218 219 ``` 220 subroutine mysubroutine(.....) 221 #include <petsc/finclude/petscxxx.h> 222 use petscxxx 223 implicit none 224 ``` 225 226 For example if you are using SNES in your code you would have 227 228 ``` 229 #include <petsc/finclude/petscsnes.h> 230 use petscsnes 231 implicit none 232 ``` 233 234- Instead of PETSC_NULL_OBJECT you must pass PETSC_NULL_XXX (for 235 example PETSC_NULL_VEC) using the specific object type XXX that 236 the function call is expecting. 237 238- Objects can be declared either as XXX a or type(tXXX) a, for 239 example Mat a or type(tMat) a. (Note that previously for those who 240 used types it was type(Mat) but that can no longer be used. 241 242Notes: 243 244- There are no longer any .h90 files that may or need to be included 245 246- Like C the include files are now nested so you no longer need to 247 include for example 248 249 ``` 250 #include <petsc/finclude/petscsys.h> 251 #include <petsc/finclude/petscvec.h> 252 #include <petsc/finclude/petscmat.h> 253 #include <petsc/finclude/petscpc.h> 254 #include <petsc/finclude/petscksp.h> 255 ``` 256 257 you can just include 258 259 ``` 260 #include <petsc/finclude/petscksp.h> 261 ``` 262 263- there is now type checking of most function calls. This will help 264 eliminate bugs due to incorrect calling sequences. Note that 265 Fortran distinguishes between a argument that is a scalar (zero 266 dimensional array), a one dimensional array and a two dimensional 267 array (etc). So you may get compile warnings because you are 268 passing in an array when PETSc expects a scalar or vis-versa. If 269 you get these simply fix your declaration of the variable to match 270 what is expected. In some routines like MatSetValues() and friends 271 you can pass either scalars, one dimensional arrays or two 272 dimensional arrays, if you get errors here please send mail to 273 <mailto:petsc-maint@mcs.anl.gov> and include enough of your code so we can 274 see the dimensions of all your variables so we can fix the 275 problems. 276 277- You can continue to use either fixed (.F extension) or free format 278 (.F90 extension) for your source 279 280- All the examples in PETSc have been updated so consult them for 281 clarifications. 282