1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<link rel="stylesheet" href="/slepc/slepc.css" type="text/css">
<TITLE>SlepcVecSetRandom</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<H1>SlepcVecSetRandom</H1>
Sets all components of a vector to random numbers.
<H3><FONT COLOR="#883300">Synopsis</FONT></H3>
<PRE>
#include "slepcvec.h"
PetscErrorCode SlepcVecSetRandom(Vec x,PetscRandom rctx)
</PRE>
Logically Collective on Vec
<P>
<H3><FONT COLOR="#883300">Input/Output Parameter</FONT></H3>
<DT><B>x </B> - the vector
<br>
<P>
<H3><FONT COLOR="#883300">Input Parameter</FONT></H3>
<DT><B>rctx </B> - the random number context, formed by PetscRandomCreate(), or NULL and
it will create one internally.
<br>
</TABLE>
<P>
<H3><FONT COLOR="#883300">Note</FONT></H3>
This operation is equivalent to VecSetRandom - the difference is that the
vector generated by <A HREF="../sys/SlepcVecSetRandom.html#SlepcVecSetRandom">SlepcVecSetRandom</A> is the same irrespective of the size
of the communicator (if all processes pass a PetscRandom context initialized
with the same seed).
<P>
<P><B><FONT COLOR="#883300">Location: </FONT></B><A HREF="../../../src/vec/vecutil.c.html#SlepcVecSetRandom">src/vec/vecutil.c</A>
<BR><A HREF="./index.html">Index of all sys routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>
|