[petsc-dev] strangness in Chebyshev estimate of eigenvalues

Mark Adams mfadams at lbl.gov
Thu Aug 27 16:35:52 CDT 2015


On Thu, Aug 27, 2015 at 3:11 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
> > On Aug 27, 2015, at 1:58 PM, Jed Brown <jed at jedbrown.org> wrote:
> >
> > Mark Adams <mfadams at lbl.gov> writes:
> >
> >> Ah, you're right.
> >>
> >> Would you consider this a decent hash?
> >>
> >> PetscScalar v = ((PetscScalar)((79943*idx)%6871) - 3435.)/3435. +
> >> ((PetscScalar)((7919*idx)%829) - 415.)/415.;
> >
> > Still bullshit.  Plot this and you'll see that there are lots of
> > patterns and it's just not very rough at all.  Try grid sizes of 48, 59,
> > 64, 74, 75, 80, 85 to name a few.  (I looped over some grids in Octave.)
>

And orthogonal to the high modes of say the Laplacian I assume,



> > This is a fools errand.

>
> >> I thought drand48 has been taken off the table because of Windows.  If
> it's
> >> not I can use that.
> >
> > Use drand48,
>
>    Don't use drand48 directly; use PetscRandom. Matt promised to fix up
> PetscRandom to use it by default and work on all systems so all you need to
> do is use PetscRandom everywhere.
>

>   Barry
>
> > it's very simple.
> >
> > http://pubs.opengroup.org/onlinepubs/007908799/xsh/drand48.html
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150827/0f68bb82/attachment.html>


More information about the petsc-dev mailing list