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