Under what conditions does this occur? I'm surprised if you're seeing it for 2D meshes (where IIRC we build quadtrees instead of octrees) and I'm surprised that I've never seen it for 1D meshes...
Sounds like a straightforward solution, though; someone want to glance over and commit it? --- Roy On Fri, 17 Dec 2010, Boyce Griffith wrote: > Hi, Folks -- > > We recently ran into a floating point exception coming from location_maps.C. > The problem is that when LIBMESH_DIM is 3 but the mesh has DIM < 3, > _lower_bound[i] == _upper_bound[i] for some dimensions. Because > LocationMap<T>::key() computes, e.g., > > zscaled = (p(2) - _lower_bound[2])/ > (_upper_bound[2] - _lower_bound[2]); > > if this happens, LocationMap<T>::key() results in a floating point exception > for some choices of compiler/compiler flags. > > An easy fix appears to be to offset the bounding box by machine epsilon when > computing the extents, e.g., in LocationMap<T>::init(). It looks like these > values are only used in LocationMap<T>::key(), so this change appears to be > otherwise innocuous. Patch attached. > > -- Boyce > > ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ Libmesh-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-devel
