xref: /petsc/doc/changes/dev.md (revision a4e01a8b1ea6aa127f3e22aee39c726cf71ba8b6)
1# Changes: Development
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```{rubric} Configure/Build:
13```
14
15- Make `SYCL` a `devicePackage`, i.e., builds `--with-sycl` now have `PETSC_HAVE_DEVICE` defined
16- Add the option `--with-devicelanguage` to compile `PetscDevice` code using either a C or C++ compiler
17- Add `Caliper`, an instrumentation and performance profiling library that can be used to profile `Hypre`.
18
19```{rubric} Sys:
20```
21
22- Add `PetscCallHYPRE()` to check HYPRE error codes and print error messages on failure
23
24
25```{rubric} Event Logging:
26```
27
28- Add two approaches for GPU energy monitoring:  `-log_view_gpu_energy` and `-log_view_gpu_energy_meter`
29- Add API `PetscLogGpuEnergy()`, `PetscLogGpuEnergyMeter()`, `PetscLogGpuEnergyMeterBegin()` and `PetscLogGpuEnergyMeterEnd()` for GPU energy monitoring
30
31```{rubric} PetscViewer:
32```
33
34-  Change the final argument of `PetscViewerGLVisSetFields()` to `PetscCtxDestroyFn *`. This means the destroy function must dereference the argument before operating on it
35
36```{rubric} PetscDraw:
37```
38
39```{rubric} AO:
40```
41
42```{rubric} IS:
43```
44
45```{rubric} VecScatter / PetscSF:
46```
47
48```{rubric} PF:
49```
50
51```{rubric} Vec:
52```
53
54```{rubric} PetscSection:
55```
56
57```{rubric} PetscPartitioner:
58```
59
60```{rubric} Mat:
61```
62
63- Change the `destroy()` function argument of `MatShellSetMatProductOperation()` to type `PetscCtxDestroyFn *`. This means the destroy function must dereference the argument before operating on it
64- Remove `MatMissingDiagonal()`. Developers should use `MatGetDiagonalMarkers_SeqXXX()` when the functionality is needed
65- Change `MatSetOption(A, MAT_HERMITIAN, PETSC_TRUE)` for `MatSBAIJ` to no longer automatically set the option `MAT_SYMMETRIC` to `PETSC_FALSE`. It is now the duty of the user to call `MatSetOption(A, MAT_SYMMETRIC, PETSC_FALSE)` if a `MatSBAIJ` is Hermitian but not symmetric
66
67```{rubric} MatCoarsen:
68```
69
70```{rubric} PC:
71```
72
73- Add multi-precision support for MUMPS. One could use `-pc_precision <single, double>` to set the precision to be used by MUMPS, which can be different from `PetscScalar`'s precision
74- Add support for MUMPS out-of-core facility with the option `-mat_mumps_ooc_tmpdir <dir>` and new functions `MatMumpsSetOocTmpDir()`, `MatMumpsGetOocTmpDir()`
75
76```{rubric} KSP:
77```
78
79- Remove `KSPHPDDMPrecision` in favor of `PetscPrecision`
80
81```{rubric} SNES:
82```
83
84- Change the `destroy()` function argument of `SNESSetConvergenceTest()` to type `PetscCtxDestroyFn *`. This means the destroy function must dereference the argument before operating on it
85- Add `SNESSetObjectiveDomainError()`
86- Change `SNES_DIVERGED_FNORM_NAN` to `SNES_DIVERGED_FUNCTION_NANORINF`
87- Add `SNES_DIVERGED_OBJECTIVE_NANORINF`
88- Add `SNES_DIVERGED_OBJECTIVE_DOMAIN`
89- Add developer functions `SNESCheckFunctionDomainError()`, `SNESLineSearchCheckFunctionDomainError()`, `SNESCheckObjectiveDomainError()`, `SNESLineSearchCheckObjectiveDomainError()`, `SNESCheckJacobianDomainError()`, and `SNESLineSearchCheckJacobianDomainError()`
90
91```{rubric} SNESLineSearch:
92```
93
94```{rubric} TS:
95```
96
97- Add `TSPseudoComputeFunction()` to get nonlinear residual while avoiding recalculation if possible
98- Remove unused `TSPseudoVerifyTimeStepDefault()`
99- Remove `TSPseudoComputeTimeStep()` and `TSPseudoVerifyTimeStep()`
100- Change the `destroy()` function argument of `TSTrajectorySetTransform()` to type `PetscCtxDestroyFn *`. This means the destroy function must dereference the argument before operating on it
101- Correct option `-ts_max_reject` to `-ts_max_step_rejections`
102- Correct option `-ts_dt` to `-ts_time_step`
103
104```{rubric} TAO:
105```
106
107```{rubric} PetscRegressor:
108```
109
110```{rubric} DM/DA:
111```
112
113-  Change the final argument of `DMShellSetDestroyContext()` to `PetscCtxDestroyFn *`. This means the destroy function must dereference the argument before operating on it
114
115```{rubric} DMSwarm:
116```
117
118```{rubric} DMPlex:
119```
120
121- Add `DMPlexVecGetClosureAtDepth()`
122- Add an extra communicator argument to `DMPlexFilter()` to allow extracting local meshes
123
124```{rubric} FE/FV:
125```
126
127```{rubric} DMNetwork:
128```
129
130```{rubric} DMStag:
131```
132
133```{rubric} DT:
134```
135
136```{rubric} Fortran:
137```
138
139- Replace `./configure` option `--with-mpi-f90module-visibility` with `--with-mpi-ftn-module=<mpi or mpi_f08>`
140- Add `PETSC_INT_KIND` and `PETSC_MPIINT_KIND`
141- Fortran code should now use `MPIU_Comm` instead of `MPI_Comm`, and similarly for other MPI types, see section "Fortran and MPI" in the users guide
142
143