xref: /petsc/doc/changes/300.md (revision b11d9968bc79904c690b122f9399be46447eb113)
1*7f296bb3SBarry Smith# Changes: 3.0.0
2*7f296bb3SBarry Smith
3*7f296bb3SBarry Smith```{rubric} General:
4*7f296bb3SBarry Smith```
5*7f296bb3SBarry Smith
6*7f296bb3SBarry Smith- Changed the MATLAB engine portion of the MATLAB configure code to
7*7f296bb3SBarry Smith  require a separate flag --with-matlab-engine
8*7f296bb3SBarry Smith- Changed the Socket viewer to be the same as the binary viewer
9*7f296bb3SBarry Smith  except for its creation
10*7f296bb3SBarry Smith- Changed the MATLAB Socket code to work the same as the Matlab
11*7f296bb3SBarry Smith  binary reader except for its creation
12*7f296bb3SBarry Smith- You can now replace the PetscVFPrintf() function pointer to
13*7f296bb3SBarry Smith  redirect all stdout/stderr output in Microsoft Windows for example.
14*7f296bb3SBarry Smith- Removed MPICCommToFortran() and MPIFortranCommToC() since
15*7f296bb3SBarry Smith  MPI_Comm_c2f() and f2c() are now always available.
16*7f296bb3SBarry Smith- PetscOptionsInsertFile() now takes a MPI_Comm as the first
17*7f296bb3SBarry Smith  argument and a final flag argument indicating if the file  MUST be
18*7f296bb3SBarry Smith  located. It is also changed to be more scalable, only the 0th
19*7f296bb3SBarry Smith  process opens it and broadcasts the input to the other processes.
20*7f296bb3SBarry Smith- Added PetscObjectIncrementTabLevel() to allow proper indenting of
21*7f296bb3SBarry Smith  monitor output for embedded solvers for multigrid levels, for
22*7f296bb3SBarry Smith  block Jacobi, for SNES inside TS and KSP inside SNES etc.
23*7f296bb3SBarry Smith
24*7f296bb3SBarry Smith```{rubric} Logging:
25*7f296bb3SBarry Smith```
26*7f296bb3SBarry Smith
27*7f296bb3SBarry Smith- The int stage used in the PetscLogStageXXX() routines is now a
28*7f296bb3SBarry Smith  PetscLogStage
29*7f296bb3SBarry Smith- PetscLogEventRegister() and PetscLogStageRegister() now return the
30*7f296bb3SBarry Smith  result in the final argument instead of the first
31*7f296bb3SBarry Smith- PetscLogClassRegister() is changed to PetscClassIdRegister() and
32*7f296bb3SBarry Smith  returns the classid in the final argument, not the first
33*7f296bb3SBarry Smith- PetscEvent is now PetscLogEvent
34*7f296bb3SBarry Smith
35*7f296bb3SBarry Smith```{rubric} config/configure.py:
36*7f296bb3SBarry Smith```
37*7f296bb3SBarry Smith
38*7f296bb3SBarry Smith- Changed location of base makefiles to conf from bmake/common
39*7f296bb3SBarry Smith- Changed location of generated base makefiles to \$PETSC_ARCH/conf
40*7f296bb3SBarry Smith  instead of bmake/\$PETSC_ARCH
41*7f296bb3SBarry Smith- Changed location of generated include files to \$PETSC_ARCH/include
42*7f296bb3SBarry Smith- Changed location of generated libraries (including from external
43*7f296bb3SBarry Smith  packages) to \$PETSC_ARCH/lib
44*7f296bb3SBarry Smith- You will need to change include \$\{PETSC_DIR}/bmake/common/base to
45*7f296bb3SBarry Smith  \$\{PETSC_DIR}/conf/base
46*7f296bb3SBarry Smith
47*7f296bb3SBarry Smith```{rubric} IS:
48*7f296bb3SBarry Smith```
49*7f296bb3SBarry Smith
50*7f296bb3SBarry Smith- ISPartitioningCount() now takes an additional argument, the length
51*7f296bb3SBarry Smith  of the count array (that is the number of partitions).
52*7f296bb3SBarry Smith
53*7f296bb3SBarry Smith```{rubric} Vec:
54*7f296bb3SBarry Smith```
55*7f296bb3SBarry Smith
56*7f296bb3SBarry Smith- Added logical argument to VecSetOption() to toggle option in
57*7f296bb3SBarry Smith  either way
58*7f296bb3SBarry Smith- The PetscMap inside the Vec object is now allocated and reference
59*7f296bb3SBarry Smith  counted and shared between vectors and matrices, this will
60*7f296bb3SBarry Smith  decrease memory usage on systems with a large size.
61*7f296bb3SBarry Smith
62*7f296bb3SBarry Smith```{rubric} VecScatter:
63*7f296bb3SBarry Smith```
64*7f296bb3SBarry Smith
65*7f296bb3SBarry Smith```{rubric} Mat:
66*7f296bb3SBarry Smith```
67*7f296bb3SBarry Smith
68*7f296bb3SBarry Smith- MatSetOption() now takes a final PetscTruth flag to toggle the
69*7f296bb3SBarry Smith  option. The redundant options like MAT_NO_SYMMETRIC are removed
70*7f296bb3SBarry Smith- The MatSetOption() options MAT_ROWS_SORTED, MAT_COLUMNS_SORTED are
71*7f296bb3SBarry Smith  no longer needed and are removed.
72*7f296bb3SBarry Smith- MatConvert() now uses the matrix prefix when using option
73*7f296bb3SBarry Smith  -matconvert_type.
74*7f296bb3SBarry Smith- The bdiag matrix formats have been removed
75*7f296bb3SBarry Smith- MatTranspose() now takes a new second argument MatReuse; also to
76*7f296bb3SBarry Smith  do an inplace transpose use MAT_REUSE_MATRIX and pass the address
77*7f296bb3SBarry Smith  of the first argument as the third argument (you can no longer
78*7f296bb3SBarry Smith  pass 0).
79*7f296bb3SBarry Smith- MATPLAPACK is removed; instead so long as PETSc is
80*7f296bb3SBarry Smith  config/configure.py with --download-plapack the MATMPIDENSE matrix
81*7f296bb3SBarry Smith  will automatically use the parallel plapack solvers
82*7f296bb3SBarry Smith- The "parallel direct solver" matrix types like
83*7f296bb3SBarry Smith  MATAIJSPOOLES are ALL gone. Now you use
84*7f296bb3SBarry Smith  -pc_factor_mat_solver_package
85*7f296bb3SBarry Smith  spooles etc or PCFactorSetMatSolverPackage() or if working
86*7f296bb3SBarry Smith  directly with
87*7f296bb3SBarry Smith  matrices, MatGetFactor(A,MATSPOOLES,...)
88*7f296bb3SBarry Smith- Removed MatFDColoringSetRecompute(), now use
89*7f296bb3SBarry Smith  MatFDSetFrequency(mat,-2) to have Jacobian computed at next Newton
90*7f296bb3SBarry Smith  step but never again.
91*7f296bb3SBarry Smith- Removed MatFDColoringSet/GetFrequency() and -mat_fd_coloring_freq
92*7f296bb3SBarry Smith  since you can now use SNESSetLagJacobian() or -snes_lag_jacobian
93*7f296bb3SBarry Smith- The PetscMap inside the Mat object is now allocated and reference
94*7f296bb3SBarry Smith  counted and shared between vectors and matrices, this will
95*7f296bb3SBarry Smith  decrease memory usage on systems with a large size.
96*7f296bb3SBarry Smith- The first argument to MatXXXFactorSymbolic/Numeric() is now the
97*7f296bb3SBarry Smith  factored matrix
98*7f296bb3SBarry Smith- The fields global_rows,global_columns,local_rows,local_columns
99*7f296bb3SBarry Smith  have been removed from the MatGetInfo() data. User MatGetSize(),
100*7f296bb3SBarry Smith  MatGetLocalSize() to get that data
101*7f296bb3SBarry Smith
102*7f296bb3SBarry Smith```{rubric} PC:
103*7f296bb3SBarry Smith```
104*7f296bb3SBarry Smith
105*7f296bb3SBarry Smith- PCHasApplyTranspose() was renamed to PCApplyTransposeExists().
106*7f296bb3SBarry Smith- Added much faster matrix converter to use hypre preconditioners
107*7f296bb3SBarry Smith  for PETSc AIJ matrices
108*7f296bb3SBarry Smith- ILU preconditioner now defaults to use shift to prevent zero pivot
109*7f296bb3SBarry Smith- ICC preconditioner now defaults to use Manteuffel shift to force
110*7f296bb3SBarry Smith  positive definiteness
111*7f296bb3SBarry Smith- Added -pc_factor_shift_in_blocks and PCFactorSetShiftInBlocks()
112*7f296bb3SBarry Smith  made default for ILU
113*7f296bb3SBarry Smith- PCApplyRichardson() now returns two additional arguments, the
114*7f296bb3SBarry Smith  number of iterations performed and the reason it finished.
115*7f296bb3SBarry Smith
116*7f296bb3SBarry Smith```{rubric} KSP:
117*7f296bb3SBarry Smith```
118*7f296bb3SBarry Smith
119*7f296bb3SBarry Smith- KSPSetConvergenceTest() now takes an optional final argument,
120*7f296bb3SBarry Smith  destroy() that will be called to destroy the context passed in as
121*7f296bb3SBarry Smith  the second to last argument
122*7f296bb3SBarry Smith- KSPDefaultConverged() now has a KSPDefaultConvergedCreate() and
123*7f296bb3SBarry Smith  KSPDefaultConvergedDestroy() that creates the default context to
124*7f296bb3SBarry Smith  be passed KSPSetConvergenceTest() and the destroy to be passed in.
125*7f296bb3SBarry Smith- Added KSPIBCGS a variant of Bi-CG-stab that has only 1
126*7f296bb3SBarry Smith  synchronization point rather than 3 in the usual.
127*7f296bb3SBarry Smith
128*7f296bb3SBarry Smith```{rubric} SNES:
129*7f296bb3SBarry Smith```
130*7f296bb3SBarry Smith
131*7f296bb3SBarry Smith- SNESSetRhs() and SNESSetSolution() were removed. Use instead
132*7f296bb3SBarry Smith  SNESSolve(snes, b, x) to pass right-hand side (optional, can be
133*7f296bb3SBarry Smith  PETSC_NULL) and solution (required).
134*7f296bb3SBarry Smith- SNES now takes ownership of user-provided vector for right hand
135*7f296bb3SBarry Smith  side and solution passed to SNESSolve(), and until the next
136*7f296bb3SBarry Smith  SNESSolve() is called.
137*7f296bb3SBarry Smith- SNES now takes ownership of user-provided vector for function
138*7f296bb3SBarry Smith  evalutation passed to SNESSetFunction(), thus this vector can be
139*7f296bb3SBarry Smith  safely destroyed after this call.
140*7f296bb3SBarry Smith- SNESConverged_LS() and SNESConverged_LS() were removed. Use
141*7f296bb3SBarry Smith  SNESDefaultConverged() or SNESSkipConverged() as convergence test.
142*7f296bb3SBarry Smith- Option -snes_convergence_test was added, accepting values
143*7f296bb3SBarry Smith  default|short, for setting SNESDefaultConverged() or
144*7f296bb3SBarry Smith  SNESSkipConverged() as convergence test.
145*7f296bb3SBarry Smith- Option -snes_no_convergence_test was removed. Use instead
146*7f296bb3SBarry Smith  "-snes_convergence_test skip".
147*7f296bb3SBarry Smith- Do not use the error PETSC_ERR_ARG_DOMAIN within your
148*7f296bb3SBarry Smith  FormFunction() rather call SNESSetFunctionDomainError.
149*7f296bb3SBarry Smith- The line search functions now take an additional argument xnorm.
150*7f296bb3SBarry Smith- SNESSetConvergenceTest() takes another optional argument
151*7f296bb3SBarry Smith  PetscErrorCode (*destroy)(void*) that will be called with
152*7f296bb3SBarry Smith  SNESDestroy() to destroy the context.
153*7f296bb3SBarry Smith- Added SNESSetLagPreconditioner(), -snes_lag_preconditioner,
154*7f296bb3SBarry Smith  SNESGetLagPreconditioner()
155*7f296bb3SBarry Smith- Added SNESSetLagJacobian(), -snes_lag_jacobian,
156*7f296bb3SBarry Smith  SNESGetLagJacobian()
157*7f296bb3SBarry Smith
158*7f296bb3SBarry Smith```{rubric} TS:
159*7f296bb3SBarry Smith```
160*7f296bb3SBarry Smith
161*7f296bb3SBarry Smith```{rubric} DA:
162*7f296bb3SBarry Smith```
163*7f296bb3SBarry Smith
164*7f296bb3SBarry Smith- Added DAGetNeighbors()
165*7f296bb3SBarry Smith- Added DAGetOwnershipRanges()
166*7f296bb3SBarry Smith
167*7f296bb3SBarry Smith```{rubric} DMMG:
168*7f296bb3SBarry Smith```
169*7f296bb3SBarry Smith
170*7f296bb3SBarry Smith- Added DMMGSetFromOptions(), this can only be used in conjunction
171*7f296bb3SBarry Smith  with DMMGSetSNES(). You should call this sometime after
172*7f296bb3SBarry Smith  DMMGSetSNES() is called, otherwise the SNES/KSPSetFromOptions()
173*7f296bb3SBarry Smith  does not get called.
174*7f296bb3SBarry Smith- Removed -dmmg_snes_monitor since now -snes_monitor and
175*7f296bb3SBarry Smith  -snes_monitor_short will now do the proper indenting so this is no
176*7f296bb3SBarry Smith  longer needed
177*7f296bb3SBarry Smith- Removed -dmmg_ksp_monitor since now -ksp_monitor\[\_short) and
178*7f296bb3SBarry Smith  -mg_levels_ksp_monitor\[\_short) etc will handle the proper
179*7f296bb3SBarry Smith  indenting.
180*7f296bb3SBarry Smith- Removed -dmmg_jacobian_period since you can use -snes_lag_jacobian
181*7f296bb3SBarry Smith
182*7f296bb3SBarry Smith```{rubric} PetscViewer:
183*7f296bb3SBarry Smith```
184*7f296bb3SBarry Smith
185*7f296bb3SBarry Smith- added PETSC_VIEWER_STDOUT\_(comm) for Fortran
186*7f296bb3SBarry Smith- binary viewer now supports MPI IO for Vec loading and storing, use
187*7f296bb3SBarry Smith  -viewer_binary_mpiio or PetscViewerBinarySetMPIIO() to enable it.
188*7f296bb3SBarry Smith- Reworked the MATLAB objects sreader and freader to be called
189*7f296bb3SBarry Smith  PetscOpenSocket and PetscOpenFile, now PetscBinaryWrite and
190*7f296bb3SBarry Smith  PetscBinaryRead can be used on the same socket connection to send
191*7f296bb3SBarry Smith  matrix/vectors in both directions. See
192*7f296bb3SBarry Smith  src/ksp/ksp/examples/tutorials/ex41.c and ex41.m
193*7f296bb3SBarry Smith
194*7f296bb3SBarry Smith```{rubric} SYS:
195*7f296bb3SBarry Smith```
196*7f296bb3SBarry Smith
197*7f296bb3SBarry Smith- PetscLogFlopsNoCheck() no longer exists; you can simply call
198*7f296bb3SBarry Smith  PetscLogFlops() it no longer has a return in it.
199*7f296bb3SBarry Smith
200*7f296bb3SBarry Smith```{rubric} ExternalPackages:
201*7f296bb3SBarry Smith```
202