[petsc-dev] strangness in Chebyshev estimate of eigenvalues

Barry Smith bsmith at mcs.anl.gov
Tue May 17 20:13:31 CDT 2016


> On May 17, 2016, at 7:29 PM, Jed Brown <jed at jedbrown.org> wrote:
> 
> That is my suggestion and I think you should use it so it's easier to debug.
> 

   As Jed already noted this approach only works if the ordering remains the same when you change the number of processes which  I submit is almost never true in the "real world". Both with DMDA (except 1d) and DMPLEX and virtually anybodies homegrown mesh system and presumably libMesh and Deal.ii the ordering will change so this goofy little hack won't apply. Just use the damn random number generator.

  Barry





> On May 17, 2016 5:11:42 PM PDT, Mark Adams <mfadams at lbl.gov> wrote:
> OK, I thought you were suggesting that:
> 
> unsigned int hash(unsigned int x) {
> 
>     x 
> = ((x >> 16) ^ x) * 0x45d9f3b;
> 
>     x 
> = ((x >> 16) ^ x) * 0x45d9f3b;
> 
>     x 
> = ((x >> 16) ^ x);
> 
>     
> return x;
> }
> But, Barry is vetoing this.
> 
> On Tue, May 17, 2016 at 4:18 PM, Jed Brown <jed at jedbrown.org> wrote:
> Mark Adams <mfadams at lbl.gov> writes:
> 
> > Why not just set each index with hash(i) = (i >> 32)^i and forget
> > VecSetRandom in here?
> 
> Because if your vertices are numbered lexicographically on a Cartesian
> grid, this gives you a plane.  But just put in the legit hash (the one I
> linked is pretty good) and then you don't have to worry about
> accidentally stumbling upon pathological cases.
> 




More information about the petsc-dev mailing list