xref: /petsc/doc/changes/2028.md (revision d5edbea47d35c8a10c003a4b6b8ee9e8eca7c884)
1# Changes: 2.0.28
2
3## Changes
4
5(See [Features] below)
6
7```{rubric} General:
8```
9
10- No longer support PETSC_ARCH=sun4
11- The macros in petscconf.h now begin with PETSC\_
12- `PetscReal()` and `PetscImaginary()` are now
13  `PetscRealPart()` `PetscImaginaryPart()`
14- -optionstable -> -options_table -optionsleft -> -options_left but
15  old left for compatibility
16
17```{rubric} AO (Application Orderings):
18```
19
20```{rubric} TS (Timestepping Solvers):
21```
22
23- `TSSetMonitor()` now takes an additional final optional argument
24  that monitor context.
25
26```{rubric} SNES (Nonlinear Solvers):
27```
28
29- SNES_EQ_LS etc changed to drop \_, for example SNESEQLS
30- Changed calling sequence of SNES monitoring routines to add an
31  additional output parameter indicating why it converged or
32  diverged.
33- Added additional final argument to `SNESSetMonitor()` an
34  optional destroy routine for the monitor context.
35- Changed calling sequence of `MatSNESMFAddNullSpace()` to take
36  `PCNullSpace` object rather than array of vectors.
37- Added final ctx argument to `SNESGetFunction()`,
38  `SNESGetGradient()` and `SNESGetMinimizationFunction()`
39
40```{rubric} SLES (Linear Solvers):
41```
42
43- See PC and KSP
44- `SLESSolveTrans()` is now `SLESSolveTranspose()`
45- `SLESSolve()` now ALWAYS returns a 0 or positive iteration
46  count. Call `KSPGetConvergedReason()` to see if converged or
47  diverged and why.
48
49```{rubric} KSP (Krylov Subspace Methods):
50```
51
52- Added additional final argument to `KSPSetMonitor()` an optional
53  destroy routine for the monitor context.
54- `KSPSolvetrans()` is now `KSPSolveTranspose()`
55- Added flexible gmres (use fgmres or KSPFGMRES as the type) see
56  `KSPFGMRESSetModifyPC()` for one way to change PC at each
57  iteration.
58
59```{rubric} PC (Preconditioners):
60```
61
62- `MGSetRestriction()` and `MGSetInterpolation()` now accept
63  PETSc figures out which one it is based on the number of rows and
64  columns. Now you don't need to use the Shell matrices if you
65  computed it "the other way then PETSc use to expect".
66- `PCApplyTrans()` is now `PCApplyTranspose()`
67- options -pc_ilu_mat_ordering_type \<nd,...> and
68  -pc_lu_mat_ordering_type \<nd,...> now set the ordering type.
69
70```{rubric} MAT (Matrices):
71```
72
73- Added two additional arguments to
74  `MatCreate(MPI_Comm comm,int             m,int n,int M,int N,Mat *)`
75  where m and n are the local ownership sizes. To get the effect of
76  the old `MatCreate()` use m and n equal to PETSC_DECIDE
77- Changed `MatSetLocalToGlobalMappingBlocked()` to
78  `MatSetLocalToGlobalMappingBlock()` so that it would be less
79  then 32 characters long.
80- `MatSolveTrans()`and `MatSolveTransAdd()` are now
81  `MatSolveTransposeXXX()` `MatMultTrans()` and
82  `MatMultTransAdd()`are now `MatMultTransposeXXX()`
83- `MatCreateMPIAdj()` changed to `MatCreateMPICSR()`;
84  `MatCreateSeqAdj()` dropped.
85- Another `MatSetOption()`, `MAT_IGNORE_ZERO_ENTRIES` for AIJ
86  matrices with `ADD_VALUES`.
87- added matrix option `MAT_KEEP_ZEROED_ROWS` causes
88  `MatZeroRows()` to keep the original nonzero data structure and
89  just put 0.0 into the elements that are to be zeroed. Without this
90  option it removes the locations from the nonzero structure.
91
92```{rubric} DA (Distributed Arrays):
93```
94
95```{rubric} VEC (Vectors):
96```
97
98- Added VecGetArray2d() and VecRestoreArray2d()
99
100```{rubric} IS (Index Sets):
101```
102
103- Added second argument to `ISInvertPermutation`() that
104  indicates how many indices are to be stored on that processor;
105  ignored for one processor code. If you use
106  `ISInvertPermutation`() simply add a second argument of
107  `PETSC_DECIDE`.
108
109```{rubric} Draw (Graphics):
110```
111
112- DrawHistxxx changed to DrawHGxxx
113
114```{rubric} Viewers:
115```
116
117```{rubric} System:
118```
119
120- Routines XXXRegister() are now XXXRegisterDynamic() used for
121  registering new object types in dynamic libraries and
122  XXXRegister_Private() is now XXXRegister() used to register new
123  object types whose definitions are in the exectuable.
124- The final argument to OptionsHasName() and OptionsGetXXX() is a
125  PetscTruth * instead of an int\*
126- PETSc functions and objects that began with Table now begin with
127  PetscTable
128- Changed these routines to return an error code. extern int
129  PetscStrchr(const char[],char,char \*\*); extern int
130  PetscStrrchr(const char[],char,char \*\*); extern int
131  PetscStrstr(const char[],const char[],char \*\*); extern int
132  PetscStrtok(const char[],const char[],char \*\*); extern int
133  PetscStrlen(const char[],int \*); added PetscStrallocpy(const
134  char[],char \*\*); PetscStrncmp() and PetscStrcasecmp() now return
135  PETSC_TRUE as a final argument if the strings match else
136  PETSC_FALSE. Note this means removing ! from your current tests
137  and adding it where you don't have it.
138- PetscMemcmp() now has a final argument of true for matching
139  memories.
140- The Fortran versions of the PetscStrxxx() and PetscMemxxx()
141  routines also now have the error flag as the final argument
142- PetscFree() now always returns an error code that may be checked
143  with CHKERRQ(). On systems where free() returns a void (and the
144  user has no access to an error condition in free(), PetscFree()
145  returns 0 i.e. no error; on other systems it returns the error
146  number from free.
147- The BT bitarray macros are now prefixed with PetscBT
148
149```{rubric} Error Handling:
150```
151
152```{rubric} Event Logging:
153```
154
155```{rubric} Fortran Interface:
156```
157
158## Features
159
160(See [Changes] above)
161
162```{rubric} General:
163```
164
165- When doing string substitutions in library directory paths etc one
166  must use \$\{PETSC_DIR} \$\{BOPT} etc now instead of \$PETSC_DIR etc.
167  Also you can put anything in \{anything} as long as it is an
168  environmental variable or passed in the options database with
169  -anything
170- Added PetscEmacsclientErrorHandler() -on_error_emacs [machinename]
171  to allow emacs to jump to error; can be used with any other error
172  handler.
173- So long as you have defined the macro \_\_FUNC\_\_ "main" before
174  your main C/C++ subroutine you can use SETERRQ() and CHKERRQ()
175  instead of SETERRA(), CHKERRA().
176
177```{rubric} AO (Application Orderings):
178```
179
180```{rubric} TS (Timestepping Solvers):
181```
182
183```{rubric} SNES (Nonlinear Solvers):
184```
185
186- Added `SNESSetLineSearchParams()` and
187  `SNESGetLineSearchParams()`, contributed by Matt Knepley.
188- Added `SNESGetConvergedReason()` to find out if a
189  `SNESSolve()` has converged/diverged and why
190- Added `SNESMonitorVecUpdate()` and -snes_vecmonitor_update to
191  display the Newton update at each iteration.
192
193```{rubric} SLES (Linear Solvers):
194```
195
196- See PC and KSP
197
198```{rubric} KSP (Krylov Subspace Methods):
199```
200
201- Added -ksp_gmres_krylov_monitor and `KSPGMRESKrylovMonitor()` to
202  allow one to view the vectors in the Krylov space.
203
204```{rubric} PC (Preconditioners):
205```
206
207- We now provide a drop tolerance based ILU for SeqAIJ matrix format
208  via Yousef Saad's SPARSEKIT2 software. Use
209  -pc_ilu_use_drop_tolerance \<dt,dtcol,rowmax> or
210  `PCILUSetUseDropTolerance`(pc,dt,dtcol,rowmax).
211
212```{rubric} MAT (Matrices):
213```
214
215```{rubric} DA (Distributed Arrays):
216```
217
218```{rubric} VEC (Vectors):
219```
220
221```{rubric} IS (Index Sets):
222```
223
224```{rubric} Draw (Graphics):
225```
226
227- `DrawCreate()` and `DrawOpenX()` now can take
228
229```{rubric} Viewers:
230```
231
232- Added `ViewerASCIIUseTabs()` to allow turning off tabbing during
233  certain viewer operations.
234- Added `ViewerGetSingleton()`, ViewerRestoreSingleton() to allow
235  managing the calling of a sequential viewer from within a parallel
236  viewer.
237- Added `ViewerASCIISynchronizedPrintf`(viewer,....)
238- Binary and ASCII viewers can create compressed files by simply
239  appending a .gz on the filename.
240- PETSc now has a new viewer that generates rudimentary Postscript.
241  Improvements, additions may be added as needed. `DrawOpenPS()`,
242  or `DrawSetType(,DRAW_PS);` or -draw_type ps
243
244```{rubric} System:
245```
246
247- using -trdump with PETSC_USE_STACK compile option (default for
248  BOPT=g\*) will print the entire stack for each malloc, allow one to
249  more easily track down where mallocs where made that where not
250  freed.
251- Added PetscSum_Op to replace MPI_SUM for reductions with
252  MPIU_SCALAR
253- Added PetscMaxSum_Op to do max on first half of entries and sum on
254  second half.
255- Added CHKMEMQ and CHKMEMA macros to help track down memory
256  corruption.
257
258```{rubric} Error Handling:
259```
260
261```{rubric} Event Logging:
262```
263
264```{rubric} Fortran Interface:
265```
266
267- Added Fortran 90 interface support for HP Convex and
268  Solaris.machine.
269