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

Richard Guenther rguenth at tat.physik.uni-tuebingen.de
Fri Jul 16 08:11:13 UTC 2004


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

> Richard Guenther wrote:
>
> > 2004Jul15  Richard Guenther <richard.guenther at uni-tuebingen.de>
> >
> >     * 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/



More information about the pooma-dev mailing list