xref: /petsc/doc/changes/323.md (revision ccfb0f9f40a0131988d7995ed9679700dae2a75a)
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- v3.23.3: Add `TSGetIJacobianP()`
108
109```{rubric} TAO:
110```
111
112```{rubric} DM/DA:
113```
114
115- Deprecate `DMGetSection()` and `DMSetSection()` for existing `DMGetLocalSection()` and `DMSetLocalSection()`
116- Replace the Fortran array `DMDALocalInfo` with a derived type whose entries match the C struct
117- Change the Fortran `DMDAGetNeighbors()` to return a `PetscMPIInt, pointer :: n(:)` and add a Fortran `DMDARestoreNeighbors()`
118- Change the Fortran `DMDAGetOwnershipRanges()` to return `PetscInt, pointer :: n(:)` and add a Fortran `DMDARestoreOwnershipRanges()`
119
120```{rubric} DMSwarm:
121```
122
123- Add `DMSwarmSortRestorePointsPerCell()`
124- Change `DMSwarmVectorGetField()` and add `DMSwarmVectorDefineFields()` to handle multiple fields
125- Add `DMSwarmComputeMoments()`
126- Add `DMSwarmCellDMCreate()`, `DMSwarmCellDMDestroy()`, `DMSwarmCellDMView()`, `DMSwarmCellDMGetDM()`, `DMSwarmCellDMGetFields()`, `DMSwarmCellDMGetCoordinateFields()`, `DMSwarmCellDMGetCellID()`, `DMSwarmCellDMGetSort()`, `DMSwarmCellDMSetSort()`, and `DMSwarmCellDMGetBlockSize()`
127- Add `DMSwarmAddCellDM()`, `DMSwarmSetCellDMActive()`, and `DMSwarmGetCellDMActive()`
128- Add `DMSwarmCreateGlobalVectorFromFields()`, `DMSwarmDestroyGlobalVectorFromFields()`, `DMSwarmCreateLocalVectorFromFields()`, and `DMSwarmDestroyLocalVectorFromFields()`
129- Add `DMSwarmSortDestroy()`
130- Add `DMSwarmRemapType`, `DMSwarmRemap()`, and `DMSwarmDuplicate()`
131- Add `DMSwarmGetType()`
132- Add `DMSwarmGetCellDMByName()` and `DMSwarmGetCellDMNames()`
133
134```{rubric} DMPlex:
135```
136
137- Add `DMPlexTransformGetMatchStrata()` and `DMPlexTransformSetMatchStrata()`
138- Deprecate `DMPlexSetGlobalToNaturalSF()` and `DMPlexGetGlobalToNaturalSF()` for existing `DMSetNaturalSF()` and `DMGetNaturalSF()`
139- Add `-dm_plex_box_label_bd` to setup isoperiodicity when using `-dm_plex_box_label_bd`
140- Change `PetscViewerCGNSGetSolutionTime()` to no longer error if "TimeValues" array isn't found in CGNS file
141- Add `PetscViewerCGNSGetSolutionIteration()`
142- Add `DMPlexGetInterpolatePreferTensor()` and `DMPlexSetInterpolatePreferTensor()`
143- Add `PetscCallEGADS()`
144- Add `DMPlexTransformGetTransformTypes()` and `DMPlexTransformSetTransformTypes()`
145- 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.
146
147```{rubric} FE/FV:
148```
149
150- Add `PetscFEGeomMode`
151- Change `PetscFEGeomCreate()`, `DMFieldCreateFEGeom()`, and `DMSNESGetFEGeom()` to take `PetscFEGeomMode`
152
153```{rubric} DMNetwork:
154```
155
156```{rubric} DMStag:
157```
158
159```{rubric} DT:
160```
161
162- Add `PetscDSGetLowerBound()`, `PetscDSSetLowerBound()`, `PetscDSGetUpperBound()`, `PetscDSSetUpperBound()`, `PetscDSCopyBounds()`
163- Add `PetscProbComputeKSStatisticWeighted()` and `PetscProbComputeKSStatisticMagnitude()`
164
165```{rubric} Fortran:
166```
167
168- Deprecate all Fortran function names with the suffix F90 with the equivalent function name without the suffix F90. Functions such as `VecGetArray()`
169  now take a Fortran pointer as arguments and hence behave like the deprecated `VecGetArrayF90()`
170- 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
171- Add `PETSC_NULL_INTEGER_ARRAY`, `PETSC_NULL_SCALAR_ARRAY`, and `PETSC_NULL_REAL_ARRAY` for use instead of
172  `PETSC_NULL_INTEGER`, `PETSC_NULL_SCALAR`, and `PETSC_NULL_REAL` when an input array is expected in a PETSc function call but not
173  provided by the user
174- Add `PETSC_NULL_INTEGER_POINTER` for arguments that return as arrays, for example, `PetscInt, pointer :: idx(:)` but not needed by the user.
175- Add automatically generated interface definitions for most PETSc functions to detect illegal usage at compile time
176- Add `PetscObjectIsNull()` for users to check if a PETSc object is `NULL`. All PETSc objects are now null when they are declared
177- 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()`
178- Use of `case(e)` where `e` is any PETSc enum variable or value must be changed to `PetscEnumCase(e)` or `case(e%v)`
179- `MatInfo` and similar are now derived data types instead of arrays, use e.g. `matinfo%nz_allocated` to access their components
180