Lines Matching refs:Pmat
275 static PetscErrorCode FormDiffusionJacobian(TS ts, PetscReal t, Vec X, Mat Amat, Mat Pmat, void *pt… in FormDiffusionJacobian() argument
302 PetscCall(MatSetValuesStencil(Pmat, 1, &row, 3, col, values, ADD_VALUES)); in FormDiffusionJacobian()
305 PetscCall(MatAssemblyBegin(Pmat, MAT_FINAL_ASSEMBLY)); in FormDiffusionJacobian()
306 PetscCall(MatAssemblyEnd(Pmat, MAT_FINAL_ASSEMBLY)); in FormDiffusionJacobian()
341 static PetscErrorCode FormRHSJacobian(TS ts, PetscReal t, Vec X, Mat Amat, Mat Pmat, void *ptr) in FormRHSJacobian() argument
351 PetscCall(MatZeroEntries(Pmat)); in FormRHSJacobian()
352 PetscCall(MatSetOption(Pmat, MAT_ROW_ORIENTED, PETSC_FALSE)); in FormRHSJacobian()
353 PetscCall(MatSetOption(Pmat, MAT_IGNORE_ZERO_ENTRIES, PETSC_TRUE)); in FormRHSJacobian()
365 PetscCall(MatSetValues(Pmat, M, user->rows, M, user->rows, user->Jdense, INSERT_VALUES)); in FormRHSJacobian()
368 PetscCall(MatAssemblyBegin(Pmat, MAT_FINAL_ASSEMBLY)); in FormRHSJacobian()
369 PetscCall(MatAssemblyEnd(Pmat, MAT_FINAL_ASSEMBLY)); in FormRHSJacobian()
371 PetscCall(MatZeroEntries(Pmat)); in FormRHSJacobian()
373 if (user->diffusion) PetscCall(FormDiffusionJacobian(ts, t, X, Amat, Pmat, ptr)); in FormRHSJacobian()
374 if (Amat != Pmat) { in FormRHSJacobian()