xref: /petsc/doc/changes/323.md (revision 0f5843cc88a1f2490c9cb5df20c0244c01aa9124)
17f296bb3SBarry Smith# Changes: 3.23
27f296bb3SBarry Smith
37f296bb3SBarry Smith% STYLE GUIDELINES:
47f296bb3SBarry Smith% * Capitalize sentences
57f296bb3SBarry Smith% * Use imperative, e.g., Add, Improve, Change, etc.
67f296bb3SBarry Smith% * Don't use a period (.) at the end of entries
77f296bb3SBarry Smith% * If multiple sentences are needed, use a period or semicolon to divide sentences, but not at the end of the final sentence
87f296bb3SBarry Smith
97f296bb3SBarry Smith```{rubric} General:
107f296bb3SBarry Smith```
117f296bb3SBarry Smith
127f296bb3SBarry Smith- Add `PetscCtxDestroyFn` as the prototype for all context destroy functions. It is `PetscErrorCode ()(void **)`. Previously some context destructor
137f296bb3SBarry Smith  setters took `PetscErrorCode ()(void *)`. But these would not work directly with PETSc objects as contexts and having two different
147f296bb3SBarry Smith  context destructor models added unneeded complexity to the library. This change is not backward compatible
157f296bb3SBarry Smith- Deprecate `PetscContainerSetUserDestroy()` with `PetscContainerSetCtxDestroy()`, updating will require a small change in calling code
167f296bb3SBarry Smith- Deprecate `PetscContainerCtxDestroyDefault` with `PetscCtxDestroyDefault()`
177f296bb3SBarry Smith- Add `PetscIntViewNumColumns()`, `PetscScalarViewNumColumns()`, and `PetscRealViewNumColumns()`
187f296bb3SBarry Smith- Change `PetscGetKokkosExecutionSpace()` to return the `Kokkos::DefaultExecutionSpace` object instead of a reference to it
197f296bb3SBarry Smith
207f296bb3SBarry Smith```{rubric} Configure/Build:
217f296bb3SBarry Smith```
227f296bb3SBarry Smith
237f296bb3SBarry Smith- 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`
247f296bb3SBarry Smith- Add option `--with-library-name-suffix=<suffix>`
257f296bb3SBarry Smith
267f296bb3SBarry Smith```{rubric} Sys:
277f296bb3SBarry Smith```
287f296bb3SBarry Smith
297f296bb3SBarry Smith- Add `PetscCIntCast()`
307f296bb3SBarry Smith- Add `PetscObjectHasFunction()` to query for the presence of a composed method
317f296bb3SBarry Smith- Add `PetscSortedCheckDupsCount()` and `PetscFindCount()`
327f296bb3SBarry Smith
337f296bb3SBarry Smith```{rubric} Event Logging:
347f296bb3SBarry Smith```
357f296bb3SBarry Smith
367f296bb3SBarry Smith```{rubric} PetscViewer:
377f296bb3SBarry Smith```
387f296bb3SBarry Smith
397f296bb3SBarry Smith```{rubric} PetscDraw:
407f296bb3SBarry Smith```
417f296bb3SBarry Smith
427f296bb3SBarry Smith- Add `PetscDrawHGAddWeightedValue()`
437f296bb3SBarry Smith
447f296bb3SBarry Smith```{rubric} AO:
457f296bb3SBarry Smith```
467f296bb3SBarry Smith
477f296bb3SBarry Smith```{rubric} IS:
487f296bb3SBarry Smith```
497f296bb3SBarry Smith
507f296bb3SBarry Smith- Add `ISGetCompressOutput()` and `ISSetCompressOutput()`
517f296bb3SBarry Smith
527f296bb3SBarry Smith```{rubric} VecScatter / PetscSF:
537f296bb3SBarry Smith```
547f296bb3SBarry Smith
557f296bb3SBarry Smith```{rubric} PF:
567f296bb3SBarry Smith```
577f296bb3SBarry Smith
587f296bb3SBarry Smith```{rubric} Vec:
597f296bb3SBarry Smith```
607f296bb3SBarry Smith
617f296bb3SBarry Smith- 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
627f296bb3SBarry Smith- Add `VecKokkosPlaceArray()` and `VecKokkosResetArray()`
637f296bb3SBarry Smith
647f296bb3SBarry Smith```{rubric} PetscSection:
657f296bb3SBarry Smith```
667f296bb3SBarry Smith
677f296bb3SBarry Smith```{rubric} PetscPartitioner:
687f296bb3SBarry Smith```
697f296bb3SBarry Smith
707f296bb3SBarry Smith```{rubric} Mat:
717f296bb3SBarry Smith```
727f296bb3SBarry Smith
737f296bb3SBarry Smith- Add `MatCopyHashToXAIJ()` which allows assembling an XAIJ matrix in hash table form into another XAIJ matrix
747f296bb3SBarry Smith- Add `MatResetHash()` which allows resetting an XAIJ matrix to use a hash table
757f296bb3SBarry Smith- Add `MatCreateSeqAIJKokkosWithKokkosViews()` which allows creation of a `MATSEQAIJKOKKOS` matrix with AIJ data in Kokkos views
767f296bb3SBarry Smith- Change `MatCreateMPIAIJWithSeqAIJ()` so that B can be passed in with local indices and compactification skipped
777f296bb3SBarry Smith- Change option `-mat_factor_bind_factorization <host | device>` to `-pc_factor_mat_factor_on_host <bool>` for `MATAIJ` device matrices
787f296bb3SBarry Smith- Add option `-pc_factor_mat_solve_on_host <bool>` for `MATSEQAIJKOKKOS` matrices
797f296bb3SBarry Smith
807f296bb3SBarry Smith```{rubric} MatCoarsen:
817f296bb3SBarry Smith```
827f296bb3SBarry Smith
837f296bb3SBarry Smith```{rubric} PC:
847f296bb3SBarry Smith```
857f296bb3SBarry Smith
867f296bb3SBarry Smith- Add `PCHYPREGetCFMarkers()` to extract Coarse/Fine splittings created by BoomerAMG from `PCHYPRE`, similar to `PCGetInterpolations()` and `PCGetCoarseOperators()`
877f296bb3SBarry Smith
887f296bb3SBarry Smith```{rubric} KSP:
897f296bb3SBarry Smith```
907f296bb3SBarry Smith
917f296bb3SBarry Smith```{rubric} SNES:
927f296bb3SBarry Smith```
937f296bb3SBarry Smith
947f296bb3SBarry Smith- Add `DMPlexSetSNESVariableBounds()`
957f296bb3SBarry Smith
967f296bb3SBarry Smith```{rubric} SNESLineSearch:
977f296bb3SBarry Smith```
987f296bb3SBarry Smith
997f296bb3SBarry Smith- Add `SNESLINESEARCHBISECTION` as new SNES line search type, performing a bisection line search on the directional derivative
1007f296bb3SBarry Smith- Add `SNESLineSearchVIDirDerivFn` to compute directional derivative taking into account VI bounds, and update `SNESLineSearchGetVIFunctions()` and `SNESLineSearchSetVIFunctions()` accordingly
1017f296bb3SBarry Smith
1027f296bb3SBarry Smith```{rubric} TS:
1037f296bb3SBarry Smith```
1047f296bb3SBarry Smith
1057f296bb3SBarry Smith- Add `TSSetEvaluationTimes()`, `TSGetEvaluationTimes()`, and `TSGetEvaluationSolutions()` for evaluating solutions a given list of times. Also activatable via `-ts_eval_times`
1067f296bb3SBarry Smith- Deprecate `TSGetTimeSpan()` --> `TSGetEvaluationTimes()` and `TSGetTimeSpanSolutions()` --> `TSGetEvaluationSolutions()`
107*3beb8511SBarry Smith- v3.23.3: Add `TSGetIJacobianP()`
1087f296bb3SBarry Smith
1097f296bb3SBarry Smith```{rubric} TAO:
1107f296bb3SBarry Smith```
1117f296bb3SBarry Smith
1127f296bb3SBarry Smith```{rubric} DM/DA:
1137f296bb3SBarry Smith```
1147f296bb3SBarry Smith
1157f296bb3SBarry Smith- Deprecate `DMGetSection()` and `DMSetSection()` for existing `DMGetLocalSection()` and `DMSetLocalSection()`
1167f296bb3SBarry Smith- Replace the Fortran array `DMDALocalInfo` with a derived type whose entries match the C struct
1177f296bb3SBarry Smith- Change the Fortran `DMDAGetNeighbors()` to return a `PetscMPIInt, pointer :: n(:)` and add a Fortran `DMDARestoreNeighbors()`
1187f296bb3SBarry Smith- Change the Fortran `DMDAGetOwnershipRanges()` to return `PetscInt, pointer :: n(:)` and add a Fortran `DMDARestoreOwnershipRanges()`
1197f296bb3SBarry Smith
1207f296bb3SBarry Smith```{rubric} DMSwarm:
1217f296bb3SBarry Smith```
1227f296bb3SBarry Smith
1237f296bb3SBarry Smith- Add `DMSwarmSortRestorePointsPerCell()`
1247f296bb3SBarry Smith- Change `DMSwarmVectorGetField()` and add `DMSwarmVectorDefineFields()` to handle multiple fields
1257f296bb3SBarry Smith- Add `DMSwarmComputeMoments()`
1267f296bb3SBarry Smith- Add `DMSwarmCellDMCreate()`, `DMSwarmCellDMDestroy()`, `DMSwarmCellDMView()`, `DMSwarmCellDMGetDM()`, `DMSwarmCellDMGetFields()`, `DMSwarmCellDMGetCoordinateFields()`, `DMSwarmCellDMGetCellID()`, `DMSwarmCellDMGetSort()`, `DMSwarmCellDMSetSort()`, and `DMSwarmCellDMGetBlockSize()`
1277f296bb3SBarry Smith- Add `DMSwarmAddCellDM()`, `DMSwarmSetCellDMActive()`, and `DMSwarmGetCellDMActive()`
1287f296bb3SBarry Smith- Add `DMSwarmCreateGlobalVectorFromFields()`, `DMSwarmDestroyGlobalVectorFromFields()`, `DMSwarmCreateLocalVectorFromFields()`, and `DMSwarmDestroyLocalVectorFromFields()`
1297f296bb3SBarry Smith- Add `DMSwarmSortDestroy()`
1307f296bb3SBarry Smith- Add `DMSwarmRemapType`, `DMSwarmRemap()`, and `DMSwarmDuplicate()`
1317f296bb3SBarry Smith- Add `DMSwarmGetType()`
1327f296bb3SBarry Smith- Add `DMSwarmGetCellDMByName()` and `DMSwarmGetCellDMNames()`
1337f296bb3SBarry Smith
1347f296bb3SBarry Smith```{rubric} DMPlex:
1357f296bb3SBarry Smith```
1367f296bb3SBarry Smith
1377f296bb3SBarry Smith- Add `DMPlexTransformGetMatchStrata()` and `DMPlexTransformSetMatchStrata()`
1387f296bb3SBarry Smith- Deprecate `DMPlexSetGlobalToNaturalSF()` and `DMPlexGetGlobalToNaturalSF()` for existing `DMSetNaturalSF()` and `DMGetNaturalSF()`
1397f296bb3SBarry Smith- Add `-dm_plex_box_label_bd` to setup isoperiodicity when using `-dm_plex_box_label_bd`
1407f296bb3SBarry Smith- Change `PetscViewerCGNSGetSolutionTime()` to no longer error if "TimeValues" array isn't found in CGNS file
1417f296bb3SBarry Smith- Add `PetscViewerCGNSGetSolutionIteration()`
1427f296bb3SBarry Smith- Add `DMPlexGetInterpolatePreferTensor()` and `DMPlexSetInterpolatePreferTensor()`
1437f296bb3SBarry Smith- Add `PetscCallEGADS()`
1447f296bb3SBarry Smith- Add `DMPlexTransformGetTransformTypes()` and `DMPlexTransformSetTransformTypes()`
1457f296bb3SBarry Smith- 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.
1467f296bb3SBarry Smith
1477f296bb3SBarry Smith```{rubric} FE/FV:
1487f296bb3SBarry Smith```
1497f296bb3SBarry Smith
1507f296bb3SBarry Smith- Add `PetscFEGeomMode`
1517f296bb3SBarry Smith- Change `PetscFEGeomCreate()`, `DMFieldCreateFEGeom()`, and `DMSNESGetFEGeom()` to take `PetscFEGeomMode`
1527f296bb3SBarry Smith
1537f296bb3SBarry Smith```{rubric} DMNetwork:
1547f296bb3SBarry Smith```
1557f296bb3SBarry Smith
1567f296bb3SBarry Smith```{rubric} DMStag:
1577f296bb3SBarry Smith```
1587f296bb3SBarry Smith
1597f296bb3SBarry Smith```{rubric} DT:
1607f296bb3SBarry Smith```
1617f296bb3SBarry Smith
1627f296bb3SBarry Smith- Add `PetscDSGetLowerBound()`, `PetscDSSetLowerBound()`, `PetscDSGetUpperBound()`, `PetscDSSetUpperBound()`, `PetscDSCopyBounds()`
1637f296bb3SBarry Smith- Add `PetscProbComputeKSStatisticWeighted()` and `PetscProbComputeKSStatisticMagnitude()`
1647f296bb3SBarry Smith
1657f296bb3SBarry Smith```{rubric} Fortran:
1667f296bb3SBarry Smith```
1677f296bb3SBarry Smith
1687f296bb3SBarry Smith- Deprecate all Fortran function names with the suffix F90 with the equivalent function name without the suffix F90. Functions such as `VecGetArray()`
1697f296bb3SBarry Smith  now take a Fortran pointer as arguments and hence behave like the deprecated `VecGetArrayF90()`
1707f296bb3SBarry Smith- 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
1717f296bb3SBarry Smith- Add `PETSC_NULL_INTEGER_ARRAY`, `PETSC_NULL_SCALAR_ARRAY`, and `PETSC_NULL_REAL_ARRAY` for use instead of
1727f296bb3SBarry Smith  `PETSC_NULL_INTEGER`, `PETSC_NULL_SCALAR`, and `PETSC_NULL_REAL` when an input array is expected in a PETSc function call but not
1737f296bb3SBarry Smith  provided by the user
1747f296bb3SBarry Smith- Add `PETSC_NULL_INTEGER_POINTER` for arguments that return as arrays, for example, `PetscInt, pointer :: idx(:)` but not needed by the user.
1757f296bb3SBarry Smith- Add automatically generated interface definitions for most PETSc functions to detect illegal usage at compile time
1767f296bb3SBarry Smith- Add `PetscObjectIsNull()` for users to check if a PETSc object is `NULL`. All PETSc objects are now null when they are declared
1777f296bb3SBarry Smith- 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()`
1787f296bb3SBarry Smith- Use of `case(e)` where `e` is any PETSc enum variable or value must be changed to `PetscEnumCase(e)` or `case(e%v)`
1797f296bb3SBarry Smith- `MatInfo` and similar are now derived data types instead of arrays, use e.g. `matinfo%nz_allocated` to access their components
180