[petsc-users] GAMG PC dependence on right-hand side

Jed Brown jedbrown at mcs.anl.gov
Fri Jul 12 00:14:13 CDT 2013


"Mark F. Adams" <mark.adams at columbia.edu> writes:

> And I'm a bit puzzled because I don't know how '-random_seed 1' could
> be used in GAMG to compute eigen estimates...

Look at PetscRandomSetFromOptions.

  ierr = PetscOptionsInt("-random_seed","Seed to use to generate random numbers","PetscRandomSetSeed",0,&seed,&set);CHKERRQ(ierr);
  if (set) {
    ierr = PetscRandomSetSeed(rnd,(unsigned long int)seed);CHKERRQ(ierr);
    ierr = PetscRandomSeed(rnd);CHKERRQ(ierr);
  }

Otherwise the default seed is used, but that changes for repeat solves.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130712/a37254c5/attachment.pgp>


More information about the petsc-users mailing list