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