1# Changes: 3.23 2 3% STYLE GUIDELINES: 4% * Capitalize sentences 5% * Use imperative, e.g., Add, Improve, Change, etc. 6% * Don't use a period (.) at the end of entries 7% * If multiple sentences are needed, use a period or semicolon to divide sentences, but not at the end of the final sentence 8 9```{rubric} General: 10``` 11 12- Add `PetscCtxDestroyFn` as the prototype for all context destroy functions. It is `PetscErrorCode ()(void **)`. Previously some context destructor 13 setters took `PetscErrorCode ()(void *)`. But these would not work directly with PETSc objects as contexts and having two different 14 context destructor models added unneeded complexity to the library. This change is not backward compatible 15- Deprecate `PetscContainerSetUserDestroy()` with `PetscContainerSetCtxDestroy()`, updating will require a small change in calling code 16- Deprecate `PetscContainerCtxDestroyDefault` with `PetscCtxDestroyDefault()` 17- Add `PetscIntViewNumColumns()`, `PetscScalarViewNumColumns()`, and `PetscRealViewNumColumns()` 18- Change `PetscGetKokkosExecutionSpace()` to return the `Kokkos::DefaultExecutionSpace` object instead of a reference to it 19 20```{rubric} Configure/Build: 21``` 22 23- Update `--download-pastix` to use CMake build, with additional dependency on LAPACKE and CBLAS, can use for ex. MKL with `--with-blaslapack-dir=${MKLROOT}`, or Netlib LAPACK with `--download-netlib-lapack --with-netlib-lapack-c-bindings` 24- Add option `--with-library-name-suffix=<suffix>` 25 26```{rubric} Sys: 27``` 28 29- Add `PetscCIntCast()` 30- Add `PetscObjectHasFunction()` to query for the presence of a composed method 31- Add `PetscSortedCheckDupsCount()` and `PetscFindCount()` 32 33```{rubric} Event Logging: 34``` 35 36```{rubric} PetscViewer: 37``` 38 39```{rubric} PetscDraw: 40``` 41 42- Add `PetscDrawHGAddWeightedValue()` 43 44```{rubric} AO: 45``` 46 47```{rubric} IS: 48``` 49 50- Add `ISGetCompressOutput()` and `ISSetCompressOutput()` 51 52```{rubric} VecScatter / PetscSF: 53``` 54 55```{rubric} PF: 56``` 57 58```{rubric} Vec: 59``` 60 61- Add `PetscKDTree`, an implementation of K-d trees for efficient nearest-neighbor point searches. Includes `PetscKDTreeCreate()`, `PetscKDTreeDestroy()`, `PetscKDTreeView()`, and then `PetscKDTreeQueryPointsNearestNeighbor()` for actually doing the nearest-neighbor query 62- Add `VecKokkosPlaceArray()` and `VecKokkosResetArray()` 63 64```{rubric} PetscSection: 65``` 66 67```{rubric} PetscPartitioner: 68``` 69 70```{rubric} Mat: 71``` 72 73- Add `MatCopyHashToXAIJ()` which allows assembling an XAIJ matrix in hash table form into another XAIJ matrix 74- Add `MatResetHash()` which allows resetting an XAIJ matrix to use a hash table 75- Add `MatCreateSeqAIJKokkosWithKokkosViews()` which allows creation of a `MATSEQAIJKOKKOS` matrix with AIJ data in Kokkos views 76- Change `MatCreateMPIAIJWithSeqAIJ()` so that B can be passed in with local indices and compactification skipped 77- Change option `-mat_factor_bind_factorization <host | device>` to `-pc_factor_mat_factor_on_host <bool>` for `MATAIJ` device matrices 78- Add option `-pc_factor_mat_solve_on_host <bool>` for `MATSEQAIJKOKKOS` matrices 79 80```{rubric} MatCoarsen: 81``` 82 83```{rubric} PC: 84``` 85 86- Add `PCHYPREGetCFMarkers()` to extract Coarse/Fine splittings created by BoomerAMG from `PCHYPRE`, similar to `PCGetInterpolations()` and `PCGetCoarseOperators()` 87 88```{rubric} KSP: 89``` 90 91```{rubric} SNES: 92``` 93 94- Add `DMPlexSetSNESVariableBounds()` 95 96```{rubric} SNESLineSearch: 97``` 98 99- Add `SNESLINESEARCHBISECTION` as new SNES line search type, performing a bisection line search on the directional derivative 100- Add `SNESLineSearchVIDirDerivFn` to compute directional derivative taking into account VI bounds, and update `SNESLineSearchGetVIFunctions()` and `SNESLineSearchSetVIFunctions()` accordingly 101 102```{rubric} TS: 103``` 104 105- Add `TSSetEvaluationTimes()`, `TSGetEvaluationTimes()`, and `TSGetEvaluationSolutions()` for evaluating solutions a given list of times. Also activatable via `-ts_eval_times` 106- Deprecate `TSGetTimeSpan()` --> `TSGetEvaluationTimes()` and `TSGetTimeSpanSolutions()` --> `TSGetEvaluationSolutions()` 107 108```{rubric} TAO: 109``` 110 111```{rubric} DM/DA: 112``` 113 114- Deprecate `DMGetSection()` and `DMSetSection()` for existing `DMGetLocalSection()` and `DMSetLocalSection()` 115- Replace the Fortran array `DMDALocalInfo` with a derived type whose entries match the C struct 116- Change the Fortran `DMDAGetNeighbors()` to return a `PetscMPIInt, pointer :: n(:)` and add a Fortran `DMDARestoreNeighbors()` 117- Change the Fortran `DMDAGetOwnershipRanges()` to return `PetscInt, pointer :: n(:)` and add a Fortran `DMDARestoreOwnershipRanges()` 118 119```{rubric} DMSwarm: 120``` 121 122- Add `DMSwarmSortRestorePointsPerCell()` 123- Change `DMSwarmVectorGetField()` and add `DMSwarmVectorDefineFields()` to handle multiple fields 124- Add `DMSwarmComputeMoments()` 125- Add `DMSwarmCellDMCreate()`, `DMSwarmCellDMDestroy()`, `DMSwarmCellDMView()`, `DMSwarmCellDMGetDM()`, `DMSwarmCellDMGetFields()`, `DMSwarmCellDMGetCoordinateFields()`, `DMSwarmCellDMGetCellID()`, `DMSwarmCellDMGetSort()`, `DMSwarmCellDMSetSort()`, and `DMSwarmCellDMGetBlockSize()` 126- Add `DMSwarmAddCellDM()`, `DMSwarmSetCellDMActive()`, and `DMSwarmGetCellDMActive()` 127- Add `DMSwarmCreateGlobalVectorFromFields()`, `DMSwarmDestroyGlobalVectorFromFields()`, `DMSwarmCreateLocalVectorFromFields()`, and `DMSwarmDestroyLocalVectorFromFields()` 128- Add `DMSwarmSortDestroy()` 129- Add `DMSwarmRemapType`, `DMSwarmRemap()`, and `DMSwarmDuplicate()` 130- Add `DMSwarmGetType()` 131- Add `DMSwarmGetCellDMByName()` and `DMSwarmGetCellDMNames()` 132 133```{rubric} DMPlex: 134``` 135 136- Add `DMPlexTransformGetMatchStrata()` and `DMPlexTransformSetMatchStrata()` 137- Deprecate `DMPlexSetGlobalToNaturalSF()` and `DMPlexGetGlobalToNaturalSF()` for existing `DMSetNaturalSF()` and `DMGetNaturalSF()` 138- Add `-dm_plex_box_label_bd` to setup isoperiodicity when using `-dm_plex_box_label_bd` 139- Change `PetscViewerCGNSGetSolutionTime()` to no longer error if "TimeValues" array isn't found in CGNS file 140- Add `PetscViewerCGNSGetSolutionIteration()` 141- Add `DMPlexGetInterpolatePreferTensor()` and `DMPlexSetInterpolatePreferTensor()` 142- Add `PetscCallEGADS()` 143- Add `DMPlexTransformGetTransformTypes()` and `DMPlexTransformSetTransformTypes()` 144- Several `DMPLEX` functions including `DMPlexVecGetClosure()` now requiring a dummy argument for the length of the returned array, for example `PETSC_NULL_INTEGER` that was previously missing not in the Fortran API. 145 146```{rubric} FE/FV: 147``` 148 149- Add `PetscFEGeomMode` 150- Change `PetscFEGeomCreate()`, `DMFieldCreateFEGeom()`, and `DMSNESGetFEGeom()` to take `PetscFEGeomMode` 151 152```{rubric} DMNetwork: 153``` 154 155```{rubric} DMStag: 156``` 157 158```{rubric} DT: 159``` 160 161- Add `PetscDSGetLowerBound()`, `PetscDSSetLowerBound()`, `PetscDSGetUpperBound()`, `PetscDSSetUpperBound()`, `PetscDSCopyBounds()` 162- Add `PetscProbComputeKSStatisticWeighted()` and `PetscProbComputeKSStatisticMagnitude()` 163 164```{rubric} Fortran: 165``` 166 167- Deprecate all Fortran function names with the suffix F90 with the equivalent function name without the suffix F90. Functions such as `VecGetArray()` 168 now take a Fortran pointer as arguments and hence behave like the deprecated `VecGetArrayF90()` 169- Add `PETSC_NULL_ENUM_XXX` to be used instead of `PETSC_NULL_INTEGER` when a pointer to an XXX `enum` is expected in a PETSc function call 170- Add `PETSC_NULL_INTEGER_ARRAY`, `PETSC_NULL_SCALAR_ARRAY`, and `PETSC_NULL_REAL_ARRAY` for use instead of 171 `PETSC_NULL_INTEGER`, `PETSC_NULL_SCALAR`, and `PETSC_NULL_REAL` when an input array is expected in a PETSc function call but not 172 provided by the user 173- Add `PETSC_NULL_INTEGER_POINTER` for arguments that return as arrays, for example, `PetscInt, pointer :: idx(:)` but not needed by the user. 174- Add automatically generated interface definitions for most PETSc functions to detect illegal usage at compile time 175- Add `PetscObjectIsNull()` for users to check if a PETSc object is `NULL`. All PETSc objects are now null when they are declared 176- Change the PETSc Fortran API so that non-array values, `v`, passed to PETSc routines expecting arrays must be cast with `[v]` in the calling sequence. For example, with `VecSetValues()` 177- Use of `case(e)` where `e` is any PETSc enum variable or value must be changed to `PetscEnumCase(e)` or `case(e%v)` 178- `MatInfo` and similar are now derived data types instead of arrays, use e.g. `matinfo%nz_allocated` to access their components 179