xref: /petsc/doc/changes/33.md (revision b11d9968bc79904c690b122f9399be46447eb113)
1# Changes: 3.3
2
3```{rubric} config/configure.py:
4```
5
6- Building PETSc using CMake is enabled automatically if CMake is
7  installed (enabling parallel builds and fast incremental builds),
8  otherwise the plain make-based system is used.
9- Added --with-cuda-only flag to allow compiling CUDA files without
10  requiring Thrust and Cusp
11
12```{rubric} Vec:
13```
14
15- VecCreateSeqWithArray() and VecCreateMPIWithArray() now take a
16  blocksize argument before the local length
17- VecSetBlockSize() cannot be called after VecCreateSeq() or
18  VecCreateMPI() and must be called before VecSetUp() or
19  VecSetFromOptions() or before either VecSetType() or VecSetSizes()
20
21```{rubric} Mat:
22```
23
24- MatScaleSystem() and MatUnScaleSystem() are gone, they didn't do
25  anything.
26- Renamed MatNullSpaceAttach() to MatSetNullSpace()
27- MatMult() no longer removes the nullspace set by MatSetNullSpace()
28- Renamed MatMatMultTranspose() for C=A^T\*B to MatTransposeMatMult()
29- Added MatMatTransposeMult() for C=A\*B^T
30- Added MatRARt() for C=R\*A\*R^T
31- Preallocation routines now automatically set
32  MAT_NEW_NONZERO_ALLOCATION_ERR, if you intentionally preallocate
33  less than necessary then use
34  MatSetOption(mat,MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_FALSE) to
35  disable the error generation.
36- MatSetBlockSize() must be called before MatSetUp() or
37  MatXXXXSetPreallocation() or block size defaults to 1
38- -mat_block_size is NOT processed by MatXXXXSetPreallocation() you
39  MUST call MatSetFromOptions() before MatSetUp() to have it
40  processed
41- You MUST now call MatXXXSetPreallocation() or MatSetUp() on any
42  matrix you create directly (not using DMCreateMatrix()) before
43  calling MatSetValues(), MatSetValuesBlocked() etc.
44- MatGetOwnershipRange() will not work without setting up the
45  matrix.
46- MatSetUpPreallocation() and MatPreallocated() are removed, use
47  MatSetUp()
48- MatPreallocateSymmetricInitialize() is removed, use
49  MatPreallocateInitialize()
50- MatCreateMPIAIJ(), MatCreateMPIBAIJ(), MatCreateMPISBAIJ(),
51  MatCreateMPIDense() are now MatCreateAIJ(), MatCreateBAIJ(),
52  MatCreateSBAIJ(), MatCreateDense(). Note that on a single process
53  they have always created the sequential version of the matrix so
54  this naming is more accurate.
55- Renamed MatMerge_SeqsToMPI() to MatCreateMPIAIJSumSeqAIJ()
56- Renamed MatMerge() to MatCreateMPIAIJConcatenateSeqAIJ()
57- Added block size in call to MatCreateIS()
58- MatInvertBlockDiagonal() now returns a const pointer
59
60```{rubric} PC:
61```
62
63- Remove PCASASetDM(), use PCSetDM() instead.
64- Add PCFieldSplitSetSchurFactType(), rename
65  -pc_fieldsplit_schur_factorization_type to
66  -pc_fieldsplit_schur_fact_type.
67- Added native algebraic multigrid method -pc_type gamg. Aggregation
68  method is recommended: -pc_gamg_type agg and for elliptic
69  operators smoothing is recommended: -pc_gamg_agg_nsmooths 1.
70- PCSetCoordinates(PC,PetscInt,PetscInt,PetscReal\*) added second
71  integer argument for number of local vertices.
72- Added PCISSetSubdomainScalingFactor(PC,PetscScalar).
73- ```{rubric} PCGASM:
74  ```
75  - Remove PCGASMSetLocalSubdomains(), use PCGASMSetSubdomains();
76    **note:** the first argument is now the list of "inner"
77    subdomains (without overlap), unlike before and for PCASM
78  - PCGASMSetTotalSubdomains(PC,PetscInt,PetscBool); added third
79    argument to indicate whether local subdomains should be
80    constructed.
81  - Removed PCGASMCreateSubdomains(), use
82    PCGASMCreateLocalSubdomains(Mat,PetscInt,PetscInt,IS\*[],IS\*[]);
83    second PetscInt argument is requested overlap
84  - PCGASMCreateSubdomains2D(PC,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt\*,IS[]\*,IS[]\*):
85    the 9-th and 10-th argument have been swapped: the 9-th outputs
86    the inner subdomains, the 10-th outputs the outer subdomains.
87- PCMG multigrid defaults changed to use a Chebyshev smoother with
88  block Jacobi Gauss-Seidel relaxation. This is a linear
89  preconditioner so it can be used with normal Krylov methods rather
90  than only flexible methods, as well as having fewer
91  synchronization pointst. Use
92  `-mg_levels_ksp_type gmres -mg_levels_ksp_max_it 1 -mg_levels_pc_type bjacobi`
93  for the original behavior.
94
95```{rubric} KSP:
96```
97
98- KSPSetOperators() will automatically set the null space present on
99  the input matrix
100- Renamed KSPCHEBYCHEV to KSPCHEBYSHEV
101- Added Hybrid CHEBYCHEV (-ksp_chebyshev_hybrid)
102- Added pipelined GMRES (KSPPGMRES) which performs one non-blocking
103  reduction per iteration instead of two blocking reductions.
104- Added flexible BiCGStab (KSPFBCGS) which tolerates a nonlinear
105  preconditioner (like KSPFGMRES).
106- Added improved flexible BiCGStab (KSPIFBCGS) which tolerates a
107  nonlinear preconditioner and performs one reduction every other
108  iteration (like KSPIBCGS).
109
110```{rubric} SNES:
111```
112
113- Added SNESGetSNESLineSearch
114- Changed default max_its and max_funcs for non-newton SNES solvers
115  to 10000 and 30000 respectively
116- Changed options and command-line arguments for SNESFAS to be in
117  line with PCMG
118- Added quasi-Newton (SNESQN), Nonlinear GMRES (SNESNGMRES),
119  nonlinear conjugate gradients (SNESNCG), and multi-stage methods
120  (SNESMS, used as a smoother for nonlinear multigrid).
121- Support for Full Approximation Scheme nonlinear multigrid
122  (SNESFAS) moved from DMMG to SNES and made composable with the
123  methods above.
124- SNES line search type should be set by name with
125  SNESLineSearchSetType rather than with SNESLineSearchSet, see
126  below.
127
128```{rubric} SNESLineSearch:
129```
130
131- SNESLineSearch object added
132- The default SNESLineSearch of a SNES may be gotten with
133  SNESGetSNESLineSearch(SNES snes, SNESLineSearch \*linesearch)
134- The linesearch type may be set with SNESLineSearchSetType() or
135  -snes_linesearch_type
136- The line search (and pre and post checks) is applied using
137  SNESLineSearchApply()
138- Pre/Post-check methods may be set with
139  SNESLineSearchSetPre/PostCheck()
140- The previous steplength may be accessed through
141  SNESLineSearchSetLambda()
142- The damping parameter may be set through
143  SNESLineSearchSetDamping() or -snes_linesearch_damping
144- Success of the line search is determined using
145  SNESLineSearchGetSuccess()
146- Custom linesearches may be built through
147  SNESLINESEARCHSHELL,("shell") or by registering a new linesearch
148  type with SNESLineSearchRegisterDynamic()
149- SNESLINESEARCHBT,("bt") replaces SNES_LS_CUBIC and
150  SNES_LS_QUADRATIC, and order may be set with
151  SNESLineSearchSetOrder() or -snes_linesearch_order
152- SNESLINESEARCHBASIC,("basic") replaces SNES_LS_BASIC and
153  SNES_LS_BASICNONORMS. Norms may be turned off with
154  SNESLineSearchSetComputeNorms() or -snes_linesearch_norms 0
155- SNESLineSearchSetTolerances() replaces SNESLSSetParams(), with the
156  former alpha parameter set with SNESLineSearchBTSetAlpha() or
157  -snes_linesearch_alpha
158- Added Line Search type SNESLINESEARCHL2,("l2") as the default for
159  NRICHARDSON
160- SNESLINESEARCHCP,("cp") added as the default line search method
161  for SNESNCG and SNESQN
162
163```{rubric} TS:
164```
165
166- -ts_max_time changed to -ts_final_time
167- TSDefaultComputeJacobian() and TSDefaultComputeJacobianColor()
168  have been removed. Configure TS to use coloring with
169  SNESSetJacobian().
170- Added TSROSW for Rosenbrock-W methods.
171- Added a common, extensible system for adaptive controllers, see
172  TSGetAdapt().
173
174```{rubric} DM/DA:
175```
176
177- Added DMCreateDecomposition(DM,PetscInt,char\*[]\*,IS[]\*,DM[]\*) for
178  use with PCFIELDSPLIT,PCASM,PCGASM
179- Added DMCreateDecompositionDM(DM,const char\*,DM\*) to create a
180  version of the DM encapsulating a named decomposition; use with
181  DMCreateDecomposition()
182- Added DMRedundant for managing globally coupled degrees of
183  freedom.
184- Removed DMCompositeAddArray(), use DMRedundantCreate() and
185  DMCompositeAddDM().
186- Renamed DMGetMatrix(), DMGetInterpolation(), DMGetInjection(), and
187  DMGetColoring() to DMCreateMatrix(), etc for semantic consistency.
188- The communicator argument to DMRefine() and DMCoarsen() can be
189  MPI_COMM_NULL, but not PETSC_NULL, because the latter may not be
190  the correct type.
191- Added DMCoarsenHookAdd() and DMRefineHookAdd() for shepherding
192  persistent resolution-dependent data between levels.
193- Added DMGetNamedGlobalVector() for storing persistent
194  resolution-dependent data.
195- DMDASNESSetFunctionLocal() and DMDASNESSetJacobianLocal() can be
196  used for convenient local evaluation; these routines will
197  eventually replace DMDASetLocalFunction() and
198  DMDASetLocalJacobian().
199
200```{rubric} DMMG:
201```
202
203- DMMG is now completely removed from PETSc. Equivalent (and better)
204  functionality can now be obtained by calling SNESSetDM() or
205  KSPSetDM(). Make sure to avoid resolution-dependent data in the
206  user context. Use SNESGetDM() or KSPGetDM() in the function
207  evaluation context to obtain the grid. DMGetNamedGlobalVector(),
208  DMCoarsenHookAdd(), and DMRefineHookAdd() can be used to manage
209  persistent resolution-dependent data.
210
211```{rubric} PetscViewer:
212```
213
214- A VTK binary viewer was added, see PETSCVIEWERVTK.
215
216```{rubric} SYS:
217```
218
219- PetscBagLoad() now requires you previously created and registered
220  all the records in the PETSc bag, allows loading on systems with
221  different struct layout/endianness.
222- PetscSF added as a type-generic graph communication mechanism. The
223  current implementation requires MPI-2 one-sided and the interface
224  is currently optional.
225
226```{rubric} Fortran:
227```
228
229- PETSC_NULL_TRUTH is now PETSC_NULL_BOOL
230- PetscOptionsGetEnum() now available from Fortran
231
232```{rubric} ExternalPackages:
233```
234
235- The Hypre interface was updated to 2.8.0b and now supports 64-bit
236  integers.
237- SuperLU_DIST interface updated to 3.1.
238- SuperLU interface updated to 4.3.
239- Sundials interface updated to 2.5.0.
240- FFTW interface updated to 3.3.2.
241- ParMetis updated to 4.0.2 and split from Metis 5.0.2 which is now
242  separate.
243
244```{rubric} Build:
245```
246
247- If Python 2.7 is available, the config/builder2.py is now
248  available for a complete build, including dependency tracking.
249
250```{rubric} Examples:
251```
252
253- SNES ex62 illustrates the use of DMComplex to solve the Stokes
254  equation on an unstructured mesh. The Python tests show how to use
255  block preconditioning strategies from the command line.
256- SNES ex52 illustrates the use of CUDA for FEM integration
257