xref: /petsc/doc/changes/322.md (revision d52a580b706c59ca78066c1e38754e45b6b56e2b) !
1# Changes: 3.22
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 `-mpiuni-allow-multiprocess-launch` to allow mpiexec to launch multiple indendent MPI-Uni jobs. Previously a sanity check
13  error message was always produced
14
15```{rubric} Configure/Build:
16```
17
18- Add `--with-openmp-kernels`
19- Update to work with python-3.13
20- Change `MPIU_Allreduce()` to always returns an MPI error code that should be checked with `PetscCallMPI()`
21- Add `PetscCallReturnMPI()`, `PetscCallMPIReturnMPI()`, and `PetscCheckReturnMPI()` to check for in PETSc provided MPI callbacks
22
23```{rubric} Sys:
24```
25
26- Add `PetscPragmaUseOMPKernels`
27- Deprecate `PetscOptionsRestoreViewer()` in favor of `PetscViewerDestroy()`
28- Deprecate `PetscOptionsGetViewer()` and `PetscOptionsGetViewers()` in favor of `PetscOptionsCreateViewer()` and `PetscOptionsCreateViewers()`
29- Deprecate `PetscOptionsPushGetViewerOff()`, `PetscOptionsPopGetViewerOff()`, and `PetscOptionsGetViewerOff()` in favor of
30  `PetscOptionsPushCreateViewerOff()`, `PetscOptionsPopCreateViewerOff()`, and `PetscOptionsGetCreateViewerOff()`
31- Add `PetscObjectContainerCompose()` and `PetscObjectContainerQuery()`
32- Add `size_t` argument to `PetscMPIErrorString()`
33- Add `PetscCallExternalAbort()` for calling external library functions from functions not returning `PetscErrorCode`
34- Add `PetscRandomSetOptionsPrefix()`
35- Add `PetscOptionsGetBool3()` to get a ternary logical value from a command line option
36
37```{rubric} Event Logging:
38```
39
40```{rubric} PetscViewer:
41```
42
43- Add `PetscViewerASCIIStdoutSetFileUnit()`
44- Add `PetscShmgetAllocateArrayScalar()`, `PetscShmgetDeallocateArrayScalar()`, `PetscShmgetAllocateArrayInt()`, and `PetscShmgetDeallocateArrayInt()` for Fortran
45
46```{rubric} PetscDraw:
47```
48
49```{rubric} AO:
50```
51
52```{rubric} IS:
53```
54
55```{rubric} VecScatter / PetscSF:
56```
57
58- Add `PetscSFRegisterPersistent()` and `PetscSFDeregisterPersistent()` for safe optimization of persistent communication
59
60```{rubric} PF:
61```
62
63```{rubric} Vec:
64```
65
66- The `IS` passed to `VecISAXPY()`, `VecISCopy()`, `VecISSet()`, and `VecISShift()` must have the same communicator of the vectors used
67- Make `VecLock` API active in optimized mode
68- `VecNestSetSubVec()` and `VecNestSetSubVecs()` now take references to input vectors rather than creating duplicates
69- Deprecate `VecSetInf()` with `VecFlag()`
70
71```{rubric} PetscSection:
72```
73
74```{rubric} PetscPartitioner:
75```
76
77```{rubric} Mat:
78```
79
80- Change `MatProductSetFill()` to support `PETSC_DETERMINE` and `PETSC_CURRENT`. `MatMatMult()` and its friends and relations now accept
81  `PETSC_DETERMINE` and `PETSC_CURRENT` in the `fill` argument. `PETSC_DEFAULT` is deprecated for those functions
82- Change the default `MatType` of the output `Mat` of `MatSchurComplementComputeExplicitOperator()` to be `MATDENSE`. It may be changed from the command line, e.g., `-fieldsplit_1_explicit_operator_mat_type aij`
83- Add `MATOP_GET_BLOCK_DIAGONAL` and `MATOP_GET_VBLOCK_DIAGONAL` to set methods returning the diagonal point blocks of a matrix
84
85```{rubric} MatCoarsen:
86```
87
88```{rubric} PC:
89```
90
91- Add support in `PCFieldSplitSetFields()` including with `-pc_fieldsplit_%d_fields fields` for `MATNEST`, making it possible to
92  utilize multiple levels of `PCFIELDSPLIT` with `MATNEST` from the command line
93- Add `PCCompositeSpecialSetAlphaMat()` API to use a matrix other than the identity in
94  preconditioners based on an alternating direction iteration, e.g., setting $M$ for
95  $P = (A + alpha M) M^{-1} (alpha M + B)$
96- Reuse the result of $T = A_{00}^-1 A_{01}$ in `PCApply_FieldSplit_Schur` with `-pc_fieldsplit_schur_fact_type full`
97- Change the option database keys for coarsening for `PCGAMG` to use the prefix `-pc_gamg_`, for example `-pc_gamg_mat_coarsen_type`
98- Add `PCGAMGSetGraphSymmetrize()` and `-pc_gamg_graph_symmetrize` to control symmetrization when coarsening the graph
99- Add `-pc_hypre_type ilu` with `-pc_hypre_ilu_type`, `-pc_hypre_ilu_iterative_setup_type`, `-pc_hypre_ilu_iterative_setup_maxiter`,
100  `-pc_hypre_ilu_iterative_setup_tolerance`, `-pc_hypre_ilu_print_level`, `-pc_hypre_ilu_logging`, `-pc_hypre_ilu_level`,
101  `-pc_hypre_ilu_max_nnz_per_row`, `-pc_hypre_ilu_tol`, `-pc_hypre_ilu_maxiter`, `-pc_hypre_ilu_drop_threshold`,
102  `-pc_hypre_ilu_tri_solve`, `-pc_hypre_ilu_lower_jacobi_iters`, `-pc_hypre_ilu_upper_jacobi_iters`, and `-pc_hypre_ilu_local_reordering`
103- Improve `-pc_type boomeramg` with `-pc_hypre_boomeramg_smooth_num_sweeps`, `-pc_hypre_boomeramg_ilu_type`, `-pc_hypre_boomeramg_ilu_iterative_setup_type`,
104  `-pc_hypre_boomeramg_ilu_iterative_setup_option`, `-pc_hypre_boomeramg_ilu_iterative_setup_maxiter`, `-pc_hypre_boomeramg_ilu_iterative_setup_tolerance`,
105  `-pc_hypre_boomeramg_ilu_print_level`, `-pc_hypre_boomeramg_ilu_logging`, `-pc_hypre_boomeramg_ilu_level`, `-pc_hypre_boomeramg_ilu_max_nnz_per_row`,
106  `-pc_hypre_boomeramg_ilu_maxiter`, `-pc_hypre_boomeramg_ilu_drop_tol`, `-pc_hypre_boomeramg_ilu_tri_solve`, `-pc_hypre_boomeramg_ilu_lower_jacobi_iters`,
107  `-pc_hypre_boomeramg_ilu_upper_jacobi_iters`, and `-pc_hypre_boomeramg_ilu_local_reordering`
108
109```{rubric} KSP:
110```
111
112- Add support for `PETSC_DETERMINE` as an argument to `KSPSetTolerances()` to set the parameter back to its initial value when the object's type was set
113- Deprecate `PETSC_DEFAULT` in favor of `PETSC_CURRENT` for `KSPSetTolerances()`
114
115```{rubric} SNES:
116```
117
118- Add support for `PETSC_DETERMINE` as an argument to `SNESSetTolerances()` to set the parameter back to its initial value when the object's type was set
119- Deprecate `PETSC_DEFAULT` in favor of `PETSC_CURRENT` for `SNESSetTolerances()`
120- Add `DMAdaptorMonitor()`, `DMAdaptorMonitorSet()`, `DMAdaptorMonitorCancel()`, and `DMAdaptorMonitorSetFromOptions()`
121- Add `DMAdaptorMonitorSize()`, `DMAdaptorMonitorError()`, `DMAdaptorMonitorErrorDraw()`, `DMAdaptorMonitorErrorDrawLGCreate()`, and `DMAdaptorMonitorErrorDrawLG()`
122- Add `DMAdaptorMonitorRegister()`, `DMAdaptorMonitorRegisterAll()`, and `DMAdaptorMonitorRegisterDestroy()`
123- Add `DMAdaptorGetCriterion()` and `DMAdaptorSetCriterion()`
124- Add `DMAdaptorSetOptionsPrefix()`
125- Add Newton's method with arc length continuation: `SNESNEWTONAL` with `SNESNewtonALSetFunction()`, `SNESNewtonALGetFunction()`, `SNESNewtonALComputeFunction()`, `SNESNewtonALGetLoadParameter()`, and `SNESNewtonALSetCorrectionType()`
126- Add `SNESNewtonTRSetTolerances()` and `SNESNewtonTRSetUpdateParameters()` to programmatically set trust region parameters
127- Deprecate `SNESSetTrustRegionTolerance()` in favor of `SNESNewtonTRSetTolerances()`
128- Add `SNESResetCounters()` to reset counters for linear iterations and function evaluations
129
130```{rubric} SNESLineSearch:
131```
132
133```{rubric} TS:
134```
135
136- Add Rosenbrock-W methods from {cite}`rang2015improved` with $B_{PR}$ stability: `TSROSWR34PRW`, `TSROSWR3PRL2`, `TSROSWRODASPR`, and `TSROSWRODASPR2`
137- Add support for `PETSC_DETERMINE` as an argument to `TSSetTolerances()` to set the parameter back to its initial value when the object's type was set
138- Deprecate `PETSC_DEFAULT` in favor of `PETSC_CURRENT` for `TSSetTolerances()`
139- Add support for `PETSC_DETERMINE` as an argument to `TSSetMaxSteps()` and `TSSetMaxTime()`
140- Deprecate `PETSC_DEFAULT` in favor of `PETSC_CURRENT` for `TSAdaptSetSafety()`
141- Deprecate `PETSC_DEFAULT` in favor of `PETSC_CURRENT` for `TSAdaptSetClip()`
142- Deprecate `PETSC_DEFAULT` in favor of `PETSC_CURRENT` for `TSAdaptSetStepLimits()`
143- Add `TSGetStepResize()`
144- Add `-ts_monitor_solution_vtk_interval` to control the interval for dumping files
145- Add a new ARKIMEX solver for fast-slow systems that are partitioned component-wise and additively at the same time
146- Add `TSRHSSplitSetIFunction()`, `TSRHSSplitSetIJacobian()`, `TSRHSSplitSetSNES()`, `TSRHSSplitGetSNES()`, `TSARKIMEXSetFastSlowSplit()`, and `TSARKIMEXGetFastSlowSplit()` to support the new solver
147
148```{rubric} TAO:
149```
150
151- Add support for `PETSC_DETERMINE` as an argument to `TaoSetTolerances()` and `TaoSetConstraintTolerances()` to set the parameter back to its initial value when the object's type was set
152- Deprecate `PETSC_DEFAULT` in favor of `PETSC_CURRENT` for `TaoSetTolerances()` and `TaoSetConstraintTolerances()`
153
154```{rubric} DM/DA:
155```
156
157- Add `DMGetSparseLocalize()` and `DMSetSparseLocalize()`
158- Add `DMGeomModelRegister()`, `DMGeomModelRegisterAll()`, `DMGeomModelRegisterDestroy()`, `DMSnapToGeomModel()`, and `DMSetSnapToGeomModel()` to support registering geometric models
159- Add `DMGetOutputSequenceLength()`
160- Add an additional return vector to `DMCreateMassMatrixLumped()` to retrieve the local mass lumping
161- Add `DMPlexMigrateGlobalToNaturalSF()` modifies the NaturalSF to map from the SF's old global section to the new global section
162
163```{rubric} DMSwarm:
164```
165
166```{rubric} DMPlex:
167```
168
169- Add `DMLabelGetValueBounds()`
170- Add `DMPlexOrientLabel()`
171- Add an argument to `DMPlexLabelCohesiveComplete()` in order to change behavior at surface boundary
172- Remove `DMPlexSnapToGeomModel()`
173- Add refinement argument to `DMPlexCreateHexCylinderMesh()`
174- Now `DMPlexComputeBdIntegral()` takes one function per field
175- Add `DMPlexCreateEdgeNumbering()`
176- Add `DMPlexComputeL2FluxDiffVec()` and `DMPlexComputeL2FluxDiffVecLocal()`
177- Add `DMAdaptorSetType()`, `DMAdaptorGetType()`, `DMAdaptorRegister()`, `DMAdaptorRegisterAll()`, and `DMAdaptorRegisterDestroy()`
178- Add `DMAdaptorGetMixedSetupFunction()` and `DMAdaptorSetMixedSetupFunction()`
179- Add `DMPlexCreateCellNumbering()`
180- Add `DMPlexBuildFromCellSectionParallel()` and `DMPlexCreateFromCellSectionParallel()`
181- Add `-dm_plex_box_label` to add "Face Sets" label with current "box" conventions
182- Add "Face Sets" label to simplex meshes using current "box" conventions
183- Update `PetscViewerExodusII` object to cache variable names for faster and more robust look-ups
184- Add `PetscViewerExodusIISetNodalVariable()`, `PetscViewerExodusIISetZonalVariable()`, `PetscViewerExodusIIGetNodalVariable()`, and `PetscViewerExodusIIGetZonalVariable()` to set or get the number of variables in a file
185- Add `PetscViewerExodusIISetNodalVariableName()`, `PetscViewerExodusIISetZonalVariableName()`, `PetscViewerExodusIIGetNodalVariableName()`, and `PetscViewerExodusIIGetZonalVariableName()` to set or get a single variable name
186- Add `PetscViewerExodusIISetNodalVariablesNames()`, `PetscViewerExodusIISetZonalVariablesNames()`, `PetscViewerExodusIIGetNodalVariablesNames()`, and `PetscViewerExodusIIGetZonalVariablesNames()` to set or get all variable names at the same time (not available in Fortran)
187- Add degree bounds to `DMCopyFields()`, `DMCopyDS()`, `PetscDSCopy()`, and `PetscDSSelectDiscretizations()`
188- Add `PetscFELimitDegree()`
189- Add localizationHeight and sparseLocalize arguments to `DMPlexCreateBoxMesh()` for coordinate localization on periodic meshes
190- Add parallel CGNS reader, enabled by `-dm_plex_cgns_parallel`
191- Add CGNS function for `VecLoad()` of solutions in parallel (must be run with `-dm_plex_cgns_parallel`)
192- Add `PetscViewerCGNSOpen()` convenience function
193- Add `PetscViewerCGNSGetSolutionTime()`, `PetscViewerCGNSGetSolutionName()`, `PetscViewerCGNSSetSolutionIndex()`, and `PetscViewerCGNSGetSolutionIndex()`
194- Add `DMPlexGetDepthStratumGlobalSize()`
195
196```{rubric} FE/FV:
197```
198
199```{rubric} DMNetwork:
200```
201
202```{rubric} DMStag:
203```
204
205```{rubric} DT:
206```
207
208- Add `PetscDSSetIntegrationParameters()` and `PetscDSSetCellParameters()`
209
210```{rubric} Fortran:
211```
212
213- Add `PETSC_NULL_ENUM` to be used instead of `PETSC_NULL_INTEGER` when a pointer to an `enum` is expected in a PETSc function call
214- Add `PETSC_NULL_INTEGER_ARRAY`, `PETSC_NULL_SCALAR_ARRAY`, and `PETSC_NULL_REAL_ARRAY` for use instead of
215  `PETSC_NULL_INTEGER`, `PETSC_NULL_SCALAR`, and `PETSC_NULL_REAL` when an array is expected in a PETSc function call
216- Add automatically generated interface definitions for most PETSc functions to detect illegal usage at compile time
217- Add `PetscObjectIsNull()` for users to check if a PETSc object is `NULL`
218- 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
219