#include "petscksp.h" PetscErrorCode MatCreateLMVMDiagBrdn(MPI_Comm comm, PetscInt n, PetscInt N, Mat *B)There are two ways of approximating the diagonal: using the forward (B) update schemes for BFGS and DFP and then taking the inverse, or directly working with the inverse (H) update schemes for the BFGS and DFP updates, derived using the Sherman-Morrison-Woodbury formula. We have implemented both, controlled by a parameter below.
In order to use the DiagBrdn matrix with other vector types, i.e. doing MatMults and MatSolves, the matrix must first be created using MatCreate() and MatSetType(), followed by MatLMVMAllocate(). Then it will be available for updating (via MatLMVMUpdate) in one's favored solver implementation. This allows for MPI compatibility.
Collective
comm | - MPI communicator, set to PETSC_COMM_SELF | |
n | - number of local rows for storage vectors | |
N | - global size of the storage vectors |
It is recommended that one use the MatCreate(), MatSetType() and/or MatSetFromOptions() paradigm instead of this routine directly.
-mat_lmvm_theta | - (developer) convex ratio between BFGS and DFP components of the diagonal J0 scaling | |
-mat_lmvm_rho | - (developer) update limiter for the J0 scaling | |
-mat_lmvm_alpha | - (developer) coefficient factor for the quadratic subproblem in J0 scaling | |
-mat_lmvm_beta | - (developer) exponential factor for the diagonal J0 scaling | |
-mat_lmvm_sigma_hist | - (developer) number of past updates to use in J0 scaling. | |
-mat_lmvm_tol | - (developer) tolerance for bounding the denominator of the rescaling away from 0. | |
-mat_lmvm_forward | - (developer) whether or not to use the forward or backward Broyden update to the diagonal |