[petsc-dev] strangness in Chebyshev estimate of eigenvalues
Mark Adams
mfadams at lbl.gov
Thu Aug 27 13:31:27 CDT 2015
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.;
I thought drand48 has been taken off the table because of Windows. If it's
not I can use that.
Mark
On Thu, Aug 27, 2015 at 12:48 PM, Jed Brown <jed at jedbrown.org> wrote:
> Mark Adams <mfadams at lbl.gov> writes:
>
> > My hash function is:
> >
> > PetscScalar v = ((PetscScalar)((PETSC_HASH_FACT*idx)%100) -
> > 49.5)/50.0;
> > ierr = VecSetValues(bb, 1, &idx, &v,
> > INSERT_VALUES);CHKERRQ(ierr);
> >
> >
> > include/petscctable.h:#define PETSC_HASH_FACT 79943
>
> Still grid-aligned stripes on a 100xN grid. Please stop it with these
> bullshit ad-hoc hash functions. Either use a decent hash function or
> drand48.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150827/b50d0476/attachment.html>
More information about the petsc-dev
mailing list