#include "petscmat.h" PetscErrorCode MatSetRandom(Mat x,PetscRandom rctx)Logically Collective on Vec
x | - the vector | |
rctx | - the random number context, formed by PetscRandomCreate(), or NULL and it will create one internally. |
PetscRandomCreate(PETSC_COMM_WORLD,&rctx); VecSetRandom(x,rctx); PetscRandomDestroy(rctx);
Level:intermediate
Location:src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages