freepooma-devel
[Top][All Lists]
Advanced

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

Re: [pooma-dev] Re: [PATCH] Finish/clean Div.UR.h


From: Richard Guenther
Subject: Re: [pooma-dev] Re: [PATCH] Finish/clean Div.UR.h
Date: Fri, 16 Jul 2004 10:11:13 +0200 (CEST)

On Thu, 15 Jul 2004, Jeffrey D. Oldham wrote:

> Richard Guenther wrote:
>
> > 2004Jul15  Richard Guenther <address@hidden>
> >
> >     * src/Field/DiffOps/Div.h: adjust documentation.
> >     src/Field/DiffOps/Div.UR.h: implement DivCellToVert,
> >     clean implementation.
> >
> >
> >   template<class F>
> >   inline OutputElement_t
> >   operator()(const F &f, int i1, int i2) const
> >   {
> >-    return 0.5 *
> >-      (fact_m(0) *
> >-       (f(i1 + 1, i2    )(0) - f(i1    , i2    )(0) +
> >-    f(i1 + 1, i2 + 1)(0) - f(i1    , i2 + 1)(0)
> >-    ) +
> >-       fact_m(1) *
> >-       (f(i1    , i2 + 1)(1) - f(i1    , i2    )(1) +
> >-    f(i1 + 1, i2 + 1)(1) - f(i1 + 1, i2    )(1)
> >-    )
> >-       );
> >+    return OutputElement_t
> >+      (fact_m(0) * (f.read(i1+1, i2)(0) - f.read(i1, i2)(0))
> >+       + fact_m(1) * (f.read(i1, i2+1)(1) - f.read(i1, i2)(1)));
> >   }
> >
> >
> Yes, this is a good patch.  For the operator()s, I suggest placing the +
> at the end of lines rather than at the beginning of the next line.
> Doing so will vertically align the addends, easing reading.

Uh, but the patch is wrong I noticed.  I was implementing
FaceToCell/CellToFace stuff, not VertexToCell/CellToVertex.  I'll fixup
and resubmit.

Richard.

--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]