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