#include "vec.h" int VecSetRandom(PetscRandom rctx,Vec x)Collective on Vec
rctx | - the random number context, formed by PetscRandomCreate() | |
x | - the vector |
PetscRandomCreate(PETSC_COMM_WORLD,RANDOM_DEFAULT,&rctx); VecSetRandom(rctx,x); PetscRandomDestroy(rctx);
Level:intermediate
Location:src/vec/interface/vector.c
Vector Index
Table of Contents