petsc-3.11.4 2019-09-28
Report Typos and Errors


Creates a limited-memory Symmetric-Rank-1 approximation matrix used for a Jacobian. L-SR1 is symmetric by construction, but is not guaranteed to be positive-definite.


#include "petscksp.h" 
PetscErrorCode MatCreateLMVMSR1(MPI_Comm comm, PetscInt n, PetscInt N, Mat *B)
The provided local and global sizes must match the solution and function vectors used with MatLMVMUpdate() and MatSolve(). The resulting L-SR1 matrix will have storage vectors allocated with VecCreateSeq() in serial and VecCreateMPI() in parallel. To use the L-SR1 matrix with other vector types, the matrix must be created using MatCreate() and MatSetType(), followed by MatLMVMAllocate(). This ensures that the internal storage and work vectors are duplicated from the correct type of vector.

Collective on MPI_Comm

Input Parameters

comm - MPI communicator, set to PETSC_COMM_SELF
n - number of local rows for storage vectors
N - global size of the storage vectors

Output Parameter

B -the matrix

It is recommended that one use the MatCreate(), MatSetType() and/or MatSetFromOptions() paradigm instead of this routine directly.

Options Database Keys

-mat_lmvm_num_vecs -maximum number of correction vectors (i.e.: updates) stored

See Also

MatCreate(), MATLMVM, MATLMVMSR1, MatCreateLMVMBFGS(), MatCreateLMVMDFP(),
MatCreateLMVMBrdn(), MatCreateLMVMBadBrdn(), MatCreateLMVMSymBrdn()




Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages