xref: /petsc/doc/changes/315.md (revision 2cdf5ea42bccd4e651ec69c5d7cf37657be83b41)
1# Changes: 3.15
2
3```{rubric} General:
4```
5
6- Add `PetscKokkosInitializeCheck()`, which initializes Kokkos if it
7  is not yet initialized
8- Add support for `-debug_terminal` Terminal to use Apple's Terminal
9  instead of xterm, allowing use of cut-paste
10- Make Terminal the default device to display the debugger on Apple
11  instead of xterm
12- Add PetscHasExternalPackage() determining whether PETSc has been
13  configured with the given external package such as "hdf5"
14
15```{rubric} Configure/Build:
16```
17
18- On macOS, `MACOS_FIREWALL=1` or `MACOS_FIREWALL_REFRESH=1` can
19  be passed to make to automatically add firewall rules preventing
20  firewall popups during testing. See
21  `make -f gmakefile.test help` for details
22
23- `./configure --with-macos-firewall-rules` makes
24  `MACOS_FIREWALL=1` the default
25
26- Change `--download-petsc4py` to `--with-petsc4py` to have PETSc build
27  and use petsc4py
28
29- Add `--download-mmg` and `--download-parmmg`, 3D unstructured mesh
30  adaptation package (interaction with DMPlex not available yet)
31
32- Improve detection of Git repositories when a `--download-package`
33  option is used
34
35  - Support `ssh://*.git` and `https://*.git` URLs without the
36    additional `git://` prefix
37  - Local directories can be specified without the `git://`
38    prefix as well
39  - Any valid Git repository (including bare and with
40    `--separate-git-dir`) is now correctly detected
41
42- `--download-yaml` or `--with-yaml` are no longer required for
43  YAML support (but can still be used to avoid compiling source
44  included with PETSc)
45
46```{rubric} Sys:
47```
48
49- Add `PETSCRANDOMCURAND` to support CURAND random number generator
50- Add `PetscRandomGetValues()` and `PetscRandomGetValuesReal()` to retrieve
51  an array of random numbers
52- Add `PetscOptions` argument to `PetscOptionsInsertFileYAML()`
53- Add `PetscCalloc()` to allocate zeroed memory
54- Automatically detect YAML and JSON option files by extension or
55  particular first line
56- Update YAML options file processing to ignore keys starting with
57  `$`, Add some special processing
58- Add `PetscBagViewFromOptions()`
59- Add `PetscLogEventDeactivatePush()`, `PetscLogEventDeactivatePop()`
60- Add new option to `-log_view` to view nested event timing
61  information as a flame graph
62
63```{rubric} PetscViewer:
64```
65
66- `PetscViewerAndFormat` now allows a payload
67- Change `PetscViewerFlowControlStepMaster()`,
68  `PetscViewerFlowControlEndMaster()` to
69  `PetscViewerFlowControlStepMain()`, `PetscViewerFlowControlEndMain()`
70- HDF5: `FILE_MODE_APPEND` (= `FILE_MODE_UPDATE`) now creates a new file if it does not exist yet
71- VU: `PetscViewerVUSetMode()` is now deprecated;
72  please use standard `PetscViewerFileSetMode()` instead
73
74```{rubric} PetscDraw:
75```
76
77```{rubric} AO:
78```
79
80```{rubric} IS:
81```
82
83```{rubric} VecScatter / PetscSF:
84```
85
86- `VecScatter` is now the same type as `PetscSF`, in other words, we
87  have `typedef PetscSF VecScatter`
88- Remove `VecScatter` types `VECSCATTER{SEQ,MPI1,MPI3,MPI3NODE,SF}`. One
89  can use all `PetscSF` types as `VecScatter` types
90- Rename `PetscLayoutsCreateSF()` to `PetscSFCreateFromLayouts()` and
91  move its declaration from `petscis.h` to `petscsf.h`
92- Deprecate `MPIU_REPLACE`; Use `MPI_REPLACE` instead
93- Deprecate `PetscSFBcastAndOp` variants; Use `PetscSFBcast` instead
94- Deprecate `PetscSFCreateEmbeddedSF`; Use `PetscSFCreateEmbeddedRootSF`
95  instead
96- Add experimental NVIDIA NVSHMEM support; For details on how to use
97  it, contact <mailto:petsc-maint@mcs.anl.gov>
98- Add `PetscSFCreateByMatchingIndices()` to create SF by matching root
99  and leaf indices
100
101```{rubric} PF:
102```
103
104```{rubric} Vec:
105```
106
107- Change `Vec{Get,Restore}Array{Read}Inplace` to
108  `Vec{Get,Restore}Array{Read}AndMemType()` and add an extra argument
109  to also return the memory type of the array
110- Remove vector type `VECNODE`
111- Add `VecConcatenate()` function for vertically concatenating an
112  array of vectors into a single vector. Also returns an array of
113  index sets to access the original components within the
114  concatenated final vector
115
116```{rubric} PetscSection:
117```
118
119```{rubric} PetscPartitioner:
120```
121
122```{rubric} Mat:
123```
124
125- Add `MatSetPreallocationCOO()` and `MatSetValuesCOO()` to preallocate and
126  set values in a matrix using COO format. Currently efficiently
127  implemented only for `MATCUSPARSE`
128- Add the option `MAT_FORCE_DIAGONAL_ENTRIES` for `MatSetOption()`. It
129  forces allocation of all diagonal entries
130- Remove `MAT_NEW_DIAGONALS` from `MatOption`
131- Add `UNKNOW_NONZERO_PATTERN` as new value for `MatStructure`. It
132  indicates that the relationship is unknown, when set the AIJ
133  matrices check if the two matrices have identical patterns and if
134  so use the faster code
135- Add `MAT_FACTOR_QR`, `MatQRFactor()`, `MatQRFactorSymbolic()`, and
136  `MatQRFactorNumeric()` for QR factorizations. Currently the only
137  built-in implementation uses LAPACK on sequential dense matrices
138- Change option `-mat_cusparse_transgen` to `-mat_form_explicit_transpose` to hint PETSc to form an explicit transpose for repeated operations like MatMultTranspose. Currently implemented only for `AIJCUSPARSE` and `AIJKOKKOS`
139- Add a `MatOption` `MAT_FORM_EXPLICIT_TRANSPOSE`
140
141```{rubric} PC:
142```
143
144- Add `PCGAMGSetRankReductionFactors()`, provide an array,
145  `-pc_gamg_rank_reduction_factors factors`, tp specify factor by
146  which to reduce active processors on coarse grids in `PCGAMG` that
147  overrides default heuristics
148- Change `PCCompositeAddPC()` to `PCCompositeAddPCType()`, now
149  `PCCompositeAddPC()` adds a specific `PC` object
150- Add a Compatible Relaxation (CR) viewer `PCMG` with `-pc_mg_adapt_cr`
151- Experimental: Add support for assembling AIJ (CUSPARSE and KOKKOS)
152  matrix on the Cuda device with `MatSetValuesDevice()`,
153  `MatCUSPARSEGetDeviceMatWrite()`, and Kokkos with
154  `MatKokkosGetDeviceMatWrite`
155- Add `PCMGSetResidualTranspose()` to support transposed linear solve
156  using `PCMG` and `PCGAMG`
157
158```{rubric} KSP:
159```
160
161- Add `-all_ksp_monitor` which turns on monitoring for all KSP
162  solvers regardless of their prefix. This is useful for monitoring
163  solvers with inner solvers such as `PCMG`, `PCGAMG`, `PCFIELDSPLIT`.
164- Add support for monitor `KSPPREONLY`. This is useful for monitoring
165  solvers with inner solvers such as `PCMG`, `PCGAMG`, `PCFIELDSPLIT`.
166- Add `KSPConvergedReasonViewSet()` to set an ADDITIONAL function that
167  is to be used at the end of the linear solver to display the
168  convergence reason of the linear solver
169- Add `KSPConvergedReasonViewCancel()` to remove all user-added
170  converged reason view functions
171- Add `KSPGetConvergedReasonString()` to retrieve a human readable
172  string for ksp converged reason
173- Change `KSPReasonView()` to `KSPConvergenceReasonView()`
174- Change `KSPReasonViewFromOptions()` to
175  `KSPConvergedReasonViewFromOptions()`
176- Add `KSPConvergedDefaultSetConvergedMaxits()` to declare convergence
177  when the maximum number of iterations is reached
178- Fix many `KSP` implementations to actually perform the number of
179  iterations requested
180- Chebyshev uses `MAT_SPD` to default to CG for the eigen estimate
181- Add `KSPPIPECG2`, a pipelined solver that reduces the number of
182  allreduces to one per two iterations and overlaps it with two PCs
183  and SPMVs using non-blocking allreduce
184- Add `KSPConvergedRateView()` and `KSPComputeConvergenceRate()` to
185  check the convergence rate of a linear solve
186- Add `KSPSetUseExplicitTranspose()` to explicitly transpose the
187  system in `KSPSolveTranspose()`
188- Add `KSPMonitorLGCreate()`, and remove `KSPMonitorLGResidualNorm*()`
189  and `KSPMonitorLGTrueResidualNorm*()`
190- Add `KSPMonitorError()`, used by `-ksp_monitor_error`
191- Add arguments to `KSPMonitorSetFromOptions()` to allow line graphs
192  to be configured
193- Deprecate `KSP{Set|Get}MatSolveBlockSize()`, use
194  `KSP{Set|Get}MatSolveBatchSize()` instead
195- Reduce default `KSPView()` ASCII output to a single subdomain's
196  KSP/PC information for `PCASM`, resp. `PCBJacobi`. Use
197  `-ksp_view ::ascii_info_detail` to output KSP/PC information for all
198  subdomains
199
200```{rubric} SNES:
201```
202
203- Add `SNESConvergedCorrectPressure()`, which can be selected using
204  `-snes_convergence_test correct_pressure`
205- Remove `SNESMonitorLGCreate()` and `SNESMonitorLGResidualNorm()` which
206  are now handled by the default monitor
207- Add `SNESConvergedReasonViewSet()` to set an ADDITIONAL function
208  that is to be used at the end of the nonlinear solver to display
209  the convergence reason of the nonlinear solver
210- Add `SNESConvergedReasonViewCancel()` to remove all user-added
211  converged reason view functions
212- Add `SNESGetConvergedReasonString()` to retrieve a human readable
213  string for snes converged reason
214- Add `SNESFASFullSetTotal()` to use total residual restriction and
215  total solution interpolation in the initial cycle of full FAS
216  multigrid
217- Deprecate `-snes_nasm_sub_view`, use `-snes_view ::ascii_info_detail` instead
218
219```{rubric} SNESLineSearch:
220```
221
222```{rubric} TS:
223```
224
225- Change to `--download-sundials2` to indicate the version of SUNDIALS
226  PETSc downloads, which is very old and out-dated
227- Add forward and adjoint sensitivity support for cases that involve
228  parameterized mass matrices
229- Add `TSGetNumEvents()` to retrieve the number of events
230- Add `-ts_monitor_cancel`
231- Now `-ts_view_solution` respects the TS prefix
232- Add `TSSetMatStructure()` to indicate the relationship between the
233  nonzero structures of the I Jacobian and the RHS Jacobian
234- Automatically set the `MatStructure` flag of TS to
235  `SAME_NONZERO_PATTERN` if the RHS matrix is obtained with a
236  `MatDuplicate()` from the I Jacobian
237
238```{rubric} TAO:
239```
240
241- Add `TaoSetRecycleFlag()` and `TaoGetRecycleFlag()` interfaces to
242  enable some Tao algorithms to re-use iterate information from the
243  previous `TaoSolve()` call
244- Add new Augmented Lagrangian Multiplier Method (`TAOALMM`) for
245  solving optimization problems with general nonlinear constraints
246
247```{rubric} DM/DA:
248```
249
250- Remove unneeded `Vec` argument from `DMPatchZoom()`
251- Change `DMDACreatePatchIS()` to collective operation and add an
252  extra argument to indicate whether off processor values will be
253  returned
254- Add `DMComputeError()`, which uses `PetscDS` information for the exact
255  solution
256- Add `DMShellGetGLobalVector()`
257- Add `DMInterpolateSolution()` for interpolating solutions between
258  meshes in a potentially nonlinear way
259- `DMInterpolationSetUp()` now can drop points outside the domain
260
261```{rubric} DMSwarm:
262```
263
264- `DMSwarmViewXDMF()` can now use a full path for the filename
265- Add `DMSwarmSetPointCoordinatesRandom()`
266- Add `-dm_view_radius` to set size of drawn particles
267
268```{rubric} DMPlex:
269```
270
271- Using `-petscpartitioner_simple_node_grid` and
272  `-petscpartitioner_simple_process_grid`, the Simple partitioner can
273  now make grid partitions
274- Add `DMGet/SetFieldAvoidTensor()` to allow fields to exclude tensor
275  cells in their definition
276- Remove regular refinement and marking from `DMPlexCreateDoublet()`
277- Add high order FEM interpolation to `DMInterpolationEvaluate()`
278
279```{rubric} FE/FV:
280```
281
282- Add `PetscDualSpaceTransformHessian()`,
283  `PetscDualSpacePushforwardHessian()`, and
284  `PetscFEPushforwardHessian()`
285- Now `PetscFEGetCellTabulation()` and `PetscFEGetFaceTabulation()` ask
286  for the number of derivatives
287- Add `PetscDualSpaceLagrangeGet/SetUseMoments()` and
288  `PetscDualSpaceLagrangeGet/SetMomentOrder()` to allow a moment
289  integral for P0
290
291```{rubric} DMNetwork:
292```
293
294- Add `DMNetworkAddSubnetwork()` for network of subnetworks
295- Add `DMNetworkAdd/GetSharedVertices()`, `DMNetworkIsSharedVertex()`
296- Remove `DMNetworkSetEdgeList()`,
297  `DMNetworkSet/GetComponentNumVariables()`,
298  `DMNetworkSet/Add/GetNumVariables()`,
299  `DMNetworkGetComponentKeyOffset()`, `DMNetworkGetVariableOffset()`,
300  `DMNetworkGetVariableGlobalOffset()`
301- Change the prototypes for `DMNetworkAdd/GetComponent()`
302- Rename `DMNetworkSet/GetSizes()` to `DMNetworkSet/GetNumSubNetworks()`
303- Rename `DMNetworkGetComponentVariableOffset()` to
304  `DMNetworkGetLocalVecOffset()`,
305  `DMNetworkGetComponentVariableGlobalOffset()` to
306  `DMNetworkGetGlobalVecOffset()`
307- Rename `DMNetworkGetSubnetworkInfo()` to `DMNetworkGetSubnetwork()`
308
309```{rubric} DT:
310```
311
312- `PetscDSCopyBoundary()` now takes a list of fields for which
313  boundary copying is done
314- Add `PetscDSGet/SetJetDegree()`, and `-dm_ds_jet_degree` is needed to
315  enable it under a DM
316- Add `PetscWeakForm` class to manage function pointers for problem
317  assembly
318
319```{rubric} Fortran:
320```
321
322- Add configure option `--with-mpi-f90module-visibility`
323  [default=\`\`1\`\`]. With `0`, `mpi.mod` will not be visible in use code
324  (via `petscsys.mod`) - so `mpi_f08` can now be used
325- Add `PetscDLAddr()` to get name for a symbol
326