[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

# Re: Correct way to build .deb with -mieee

```Robert Funnell wrote:

```
```Adam C Powell IV wrote:

```
```Note that it is possible to have one of
these three divisions by zero and still produce a triangle or two; one
can even have C1=C2<q and C0=C3>q and get two triangles, so we can't
just test for any zeroes and skip the whole thing. ...

```
```
But you could test for any zeroes (maybe by precomputing the 4
denominators and checking whether their product is 0?) and then handle
that special case (presumably relatively rare and therefore causing
little performance penalty) with explicit checks for each denominator.
With floating-points the checks against 0 should probably involve a
finite tolerance, to avoid underflows and overflows.

```
Hmm, that's a good bit of additional code, especially since a good tolerance will depend on the scale of the mesh, and I don't think with much benefit (see below). Also, for the phase field calculations I do, where there's a lot of action right at the interfaces and zero gradients everywhere else, this special case is all over the place; though not everyone is doing phase field. :-)
```
```
```...  It just seems easier
to do it this way, and because it's just for graphics, I don't really
care about the divide by zero.

```
```
I'm not sure what happens to the graphics (might it cause a visual
artefact at some point?) but someone might try to use the programme's
output for some further analysis (e.g., volume calculations) rather
than just visualization.

```
I really don't think so. The edge intercept is inf (or NaN?), which is not between zero and one, so no intercept, no triangle intersecting that edge. I don't think that will have any effect on the resulting triangulation, or its utility for volume calculations... I think -mieee is the way to go.
```
```
Stefan, regarding trying out PETScGraphics, I recommend "apt-get install petscgraphics1-demo", which should drag in all the dependencies (including rsh-server!), then just run chts, or on an SMP box, "mpirun -np X /usr/bin/chts". Oh- except I haven't uploaded alpha yet (will try Chris' "\$ARCH==alpha*-*-linux-*" test).
```
Thanks all for the feedback.

Zeen,
--

```