xref: /petsc/doc/changes/321.md (revision ccfb0f9f40a0131988d7995ed9679700dae2a75a)
1# Changes: 3.21
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 single precision support for using HYPRE and MFEM
13- Require Fortran 2003 compiler with GET_COMMAND_ARGUMENT() support for building PETSc with Fortran bindings
14
15```{rubric} Configure/Build:
16```
17
18- Add `--download-blis-use-openmp=0` to force `download-blis` to not build with OpenMP when `with-openmp` is provided
19- Add `PetscBLASSetNumThreads()` and `PetscBLASGetNumThreads()` for controlling how many threads the BLAS routines use
20- Change `win_cl` and similar `win32fe` compiler wrappers to `win32fe_cl`
21- Add build support for Intel oneAPI compilers `icx` and `ifx` on Microsoft Windows with compiler wrappers `win32fe_icx` and `win32fe_ifx` (only static library build with `ifx`)
22- Add lib/petsc/bin/maint/runjobs.py list-of-jobs script to allow submitting a subset of the jobs to the CI
23
24```{rubric} Sys:
25```
26
27- Add `PetscBench` an object class for managing benchmarks in PETSc
28- Deprecate `PetscVoidFunction`, `PetscVoidStarFunction`, and `PetscErrorCodeFunction` typedefs in favor of
29  `PetscVoidFn` and `PetscErrorCodeFn`
30- Add `PetscOptionsBoundedReal()` and `PetscOptionsRangeReal()`
31- Rename PETSc stream types to `PETSC_STREAM_DEFAULT`, `PETSC_STREAM_NONBLOCKING`, `PETSC_STREAM_DEFAULT_WITH_BARRIER` and `PETSC_STREAM_NONBLOCKING_WITH_BARRIER`. The root device context uses `PETSC_STREAM_DEFAULT` by default
32
33```{rubric} Event Logging:
34```
35
36```{rubric} PetscViewer:
37```
38
39- Change `PetscViewerRestoreSubViewer()` to no longer need a call to `PetscViewerFlush()` after it
40- Introduce `PetscOptionsRestoreViewer()` that must be called after `PetscOptionsGetViewer()` and `PetscOptionsGetViewers()`
41  to ensure thread safety
42- Add `PetscViewerASCIIWORLDSetFileUnit()`
43
44```{rubric} PetscDraw:
45```
46
47```{rubric} AO:
48```
49
50```{rubric} IS:
51```
52
53- Add `ISLocalToGlobalMappingGetNodeInfo()` and `ISLocalToGlobalMappingRestoreNodeInfo()` to access neighboring information of local indices
54- Add support to load an `ISLocalToGlobalMapping` via `ISLocalToGlobalMappingLoad()` from data previously stored using `ISLocalToGlobalMappingView()`
55- Add `ISLocalToGlobalMappingGetBlockMultiLeavesSF()` to share local block data
56
57```{rubric} VecScatter / PetscSF:
58```
59
60- Add MPI-4.0 persistent neighborhood collectives support. Use -sf_neighbor_persistent along with -sf_type neighbor to enable it
61- Add `PetscSFCreateStridedSF()` to communicate strided blocks of data
62
63```{rubric} PF:
64```
65
66```{rubric} Vec:
67```
68
69- Add `VecGhostGetGhostIS()` to get the ghost indices of a ghosted vector
70- Add `-vec_mdot_use_gemv` to let `VecMDot()`, `VecMTDot()` use BLAS2 `gemv()` instead of custom unrolled kernel. Default is on
71- Add `-vec_maxpy_use_gemv` to let `VecMAXPY()` use BLAS2 `gemv()` instead of custom unrolled kernel. Default is off
72- `VecReplaceArray()` on the first Vec obtained from `VecDuplicateVecs()` with either of the two above \*\_use_gemv options won't work anymore. If needed, turn them off or use `VecDuplicateVec()` instead
73- `VecScale()` is now a logically collective operation
74- Add `VecISShift()` to shift a part of the vector
75- `VecISSet()` does no longer accept NULL as index set
76- `VecLoad()` automatically determines whether the file was written using 32-bit or 64-bit indices, and files can read with PETSc built either way
77
78```{rubric} PetscSection:
79```
80
81- Add `PetscSectionGetBlockStarts()` and `PetscSectionSetBlockStarts()`
82- Add argument to `PetscSectionCreateGlobalSection()` that can ignore the local section permutation
83- Add `PetscSectionCreateComponentSubsection()`
84
85```{rubric} PetscPartitioner:
86```
87
88- Add edge weights to `PetscPartitionerPartition()`
89
90```{rubric} Mat:
91```
92
93- Reset `MATLMVM` history vectors if size is changed
94- Add specific support for `MatMultHermitianTranspose()` and `MatMultHermitianTransposeAdd()` in `MATSHELL`, `MATDENSE`, `MATNEST`, and `MATSCALAPACK`
95- Add function `MatProductGetAlgorithm()`
96- `MATTRANSPOSEVIRTUAL`, `MATHERMITIANTRANSPOSEVIRTUAL`, `MATNORMAL`, `MATNORMALHERMITIAN`, and `MATCOMPOSITE` now derive from `MATSHELL`. This implies a new behavior for those `Mat`, as calling `MatAssemblyBegin()`/`MatAssemblyEnd()` destroys scalings and shifts for `MATSHELL`, but it was not previously the case for other `MatType`
97- Add function `MatGetRowSumAbs()` to compute vector of L1 norms of rows ([B]AIJ only)
98- Add partial support for `MatBackwardSolve()`/`MatForwardSolve()` with `MATSOLVERMKL_PARDISO` and `MATSOLVERMKL_CPARDISO`
99- Deprecate `MATIS` options `-matis_xxx`. Use `-mat_is_xxx`
100- Add support for repeated entries in the local part of the local to global map for `MATIS` via the routines `MatISSetAllowRepeated()` and `MatISGetAllowRepeated()`
101- Add support to dump and load a matrix of `MATIS` type
102- Add dense representations of symmetric Broyden matrices `MATLMVMDBFGS`, `MATLMVMDDFP`, and `MATLMVMDQN`
103- Add `MATSELLHIP` and the corresponding HIP kernels for matrix-vector multiplication
104
105```{rubric} MatCoarsen:
106```
107
108- Add `MatCoarsenSetMaximumIterations()` with corresponding option `-mat_coarsen_max_it <4>`. The number of iteration of the coarsening method. Used for the HEM coarsener
109- Add `MatCoarsenSetThreshold()` with corresponding option `-mat_coarsen_threshold <-1>`. Threshold for filtering graph for HEM. Like GAMG < 0 means no filtering
110- Change API for several PetscCD methods used internally in `PCGAMG` and `MatCoarsen` (eg, change `PetscCDSetChuckSize()` to `PetscCDSetChunckSize()`), remove `Mat` argument from\`\`PetscCDGetASMBlocks()\`\`
111
112```{rubric} PC:
113```
114
115- Add `PCGAMGSetLowMemoryFilter()` with corresponding option `-pc_gamg_low_memory_threshold_filter`. Use the system `MatFilter` graph/matrix filter, without a temporary copy of the graph, otherwise use method that can be faster
116- Add `PCGAMGASMSetHEM()` with corresponding option `-pc_gamg_asm_hem_aggs N`. Use ASM smoother constructed from N applications of heavy edge matching
117- `PCMAT` use `MatSolve()` if implemented by the matrix type
118- Add `PCLMVMSetUpdateVec()` for the automatic update of the LMVM preconditioner inside a SNES solve
119- Add `PCGAMGSetInjectionIndex()` with corresponding option `-pc_gamg_injection_index i,j,k...`. Inject provided indices of fine grid operator as first coarse grid restriction (sort of p-multigrid for C1 elements)
120- Add `PC_JACOBI_ROWL1` to `PCJacobiType` to use (scaled) l1 row norms for diagonal approximation with scaling of off-diagonal elements
121- Add `PCJacobiSetRowl1Scale()` and `-pc_jacobi_rowl1_scale scale` to access new scale member of PC_Jacobi class, for new row l1 Jacobi
122- Add `-mg_fine_...` prefix alias for fine grid options to override `-mg_levels_...` options, like `-mg_coarse_...`
123- The generated sub-matrices in `PCFIELDSPLIT`, `PCASM`, and `PCBJACOBI` now retain any null space or near null space attached to them even if the non-zero structure of the outer matrix changes
124- Add support for multiple subdomain per MPI process in `PCBDDC`
125- Add `PCJacobiGetDiagonal()` to access the Jacobi inverted matrix diagonal and its square root variant
126
127```{rubric} KSP:
128```
129
130```{rubric} SNES:
131```
132
133- Add support for Quasi-Newton models in `SNESNEWTONTR` via `SNESNewtonTRSetQNType`
134- Add support for trust region norm customization in `SNESNEWTONTR` via `SNESNewtonTRSetNormType`
135- Remove default of `KSPPREONLY` and `PCLU` for `SNESNASM` subdomain solves: for `SNESASPIN` use `-npc_sub_ksp_type preonly -npc_sub_pc_type lu`
136- Add function typedefs `SNESInitialGuessFn`, `SNESFunctionFn`, `SNESObjectiveFn`, `SNESJacobianFn`, and `SNESNGSFn`
137- Deprecate `DMDASNESFunction`, `DMDASNESJacobian`, `DMDASNESObjective`, `DMDASNESFunctionVec`, `DMDASNESJacobianVec`, and `DMDASNESObjectiveVec`
138  in favor of `DMDASNESFunctionFn`, `DMDASNESJacobianFn`, `DMDASNESObjectiveFn`, `DMDASNESFunctionVecFn`, `DMDASNESJacobianVecFn`, and `DMDASNESObjectiveVecFn`
139
140```{rubric} SNESLineSearch:
141```
142
143- Deprecate `SNESLineSearchShellSetUserFunc()` and `SNESLineSearchShellGetUserFunc()` in favor of `SNESLineSearchShellSetApply()` and `SNESLineSearchShellGetApply()`
144
145```{rubric} TS:
146```
147
148- Add support for custom predictor callbacks in the second-order generalized-alpha method using `TSAlpha2SetPredictor()`
149- Allow adaptivity to change time step size in first step of second-order generalized-alpha method
150- Add `TSSetPostEventStep()` to control the first step after event
151- Rename `TSSetPostEventIntervalStep()` to `TSSetPostEventSecondStep()`, controlling the second step after event
152- Rename option `-ts_event_post_eventinterval_step` to `-ts_event_post_event_second_step`
153- Change the (event) indicator functions type from `PetscScalar[]` to `PetscReal[]` in the user `indicator()` callback set by `TSSetEventHandler()`
154- Add `TSGetStepRollBack()` to access the internal rollback flag
155- Add boolean flag to `TSSetResize()` to control when to resize
156
157```{rubric} TAO:
158```
159
160- Deprecate `TaoCancelMonitors()` (resp. `-tao_cancelmonitors`) in favor of `TaoMonitorCancel()` (resp. `-tao_monitor_cancel`)
161- Deprecate `-tao_view_gradient`, `-tao_view_ls_residual`, `-tao_view_solution`, and `-tao_view_stepdirection` in favor of
162  `-tao_monitor_gradient`, `-tao_monitor_ls_residual`, `-tao_monitor_solution`, and `-tao_monitor_step`
163- Deprecate `-tao_draw_solution`, `-tao_draw_gradient`, and `-tao_draw_step` in favor of `-tao_monitor_solution_draw`, `-tao_monitor_gradient_draw`, and `-tao_monitor_step_draw`
164- Deprecate `TaoSetMonitor()` in favor of `TaoMonitorSet()`
165- Deprecate all of the provided `Tao` monitor routine names in favor of the standard PETSc naming conventions
166
167```{rubric} DM/DA:
168```
169
170- Add MPI reduction inside `SNESComputeObjective_DMDA()`. No need to call reduction in local callback
171- Deprecate `PetscSimplePointFunc` in favor of `PetscSimplePointFn`
172- Move `DMPlexReorderDefaultFlag` to `DMReorderDefaultFlag`
173- Add `DMCreateSectionPermutation()`, `DMReorderSectionGetType()`, and `DMReorderSectionSetType()`
174- Add `DMReorderSectionGetDefault()` and `DMReorderSectionSetDefault()` to allow point permutations when sections are built automatically
175- Change interface to `DMCreateSectionSubDM()` to add component specification
176- Add `DMDAGetBoundaryType()`
177
178```{rubric} DMSwarm:
179```
180
181- Add continuous `DM` argument to `DMSwarmProjectFields()`
182- Add `DMSwarmGetFieldInfo()`
183- Add `DMSwarmVectorGetField()`
184
185```{rubric} DMPlex:
186```
187
188- Drop support for MED, i.e. remove `DMPlexCreateMedFromFile()` and `--with-med`
189- Change protototype of `DMPlexSetSNESLocalFEM()`. Now it accepts a single context and a Boolean indicating to use the objective function callback
190- Replace `DMProjectCoordinates()` with `DMSetCoordinateDisc()`
191- Add argument to `DMPlexCreateCoordinateSpace()`
192- Add `DMPlexCoordMap` and some default maps
193- Add Boolean argument to `DMPlexPartitionLabelCreateSF()` to sort ranks
194- Add `DMClearAuxiliaryVec()` to clear the auxiliary data
195- Add ignoreLabelHalo, sanitizeSubmesh, and ownershipTransferSF arguments to `DMPlexFilter()`
196- Change `DMPlexSetIsoperiodicFaceSF()`, `DMPlexGetIsoperiodicFaceSF()`, and `DMPlexSetIsoperiodicFaceTransform()` to accept multiple values for different periodic pairings
197
198```{rubric} FE/FV:
199```
200
201- Add Jacobian type argument to `PetscFEIntegrateBdJacobian()`
202- Add `PetscFVClone()`
203- Add `PetscFVCreateDualSpace()`
204
205```{rubric} DMNetwork:
206```
207
208```{rubric} DMStag:
209```
210
211- Add support for `DMLocalToLocalBegin()` and `DMLocalToLocalEnd()`
212- Add `DMStagSetRefinementFactor()` and `DMStagGetRefinementFactor()` to set and get the refinement ratio
213- Add support for arbitrary refinement ratio and degree of freedom in interpolation and restriction
214
215```{rubric} DT:
216```
217
218- Add `PetscDSUpdateBoundaryLabels()`
219
220```{rubric} Fortran:
221```
222