[petsc-dev] should plexgeometry.c check for divide by zero?

Barry Smith bsmith at petsc.dev
Sun May 9 11:06:45 CDT 2021


  Matt,


  if (centroid) for (d = 0; d < dim; ++d) centroid[d] /= (vsum*4);
   csum[d] /= (tdim+1)*vsum;

  Also 

  for (d = 0; d < dim; d++) n[d] /= norm;
  etc

  Would adding (some/all) tests detect errors in the geometry information earlier then later strange behavior that happens because of the infinities in the arrays?

  


More information about the petsc-dev mailing list