freepooma-devel
[Top][All Lists]
Advanced

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

Re: [pooma-dev] Re: [PATCH] Fix some of Particle - Field interaction


From: Richard Guenther
Subject: Re: [pooma-dev] Re: [PATCH] Fix some of Particle - Field interaction
Date: Wed, 14 Jul 2004 09:15:55 +0200 (CEST)

On Tue, 13 Jul 2004, Jeffrey D. Oldham wrote:

> Richard Guenther wrote:
>
> > Inspired by the simplicity of some of the fixes by Roman Krylov I ran
> > over the interpolate.cpp particle test and tried to make it compile.
> > The following patch makes that and also makes it pass (by pure luck).
> > The only transformation I'm not sure about is
> >   Geometry::indexPoint() -> Mesh::vertexPosition()
> > Maybe one of the former developers can comment.
> >
> > I also needed to introduce setExternalGuards() which implementation
> > may not be optimal.  But well, better than before.
> >
> > Tested particles with no regressions, interpolation now passing.
> >
> > Ok?
>
> Yes, it's good progress.  I appreciate Krylov's and your work on this.
> Please see the questions below.
> There's no need to send replies before committing.
>
> Somewhere in the patch, an 'Interpolater' template parameter was added,
> but I did not see its use within the structure.

Hm.  This may be a misreading of the patch by you.  Can you point at the
context?

> >@@ -328,8 +317,8 @@
> >                << sum(chargeDensity)
> >            << std::endl;
> >   tester.check("chargeDensity(NGP,attrib) == numparticles",
> >-               abs(sum(chargeDensity) -
> >-                   static_cast<double>(createnum))<1.0e-5);
> >+               fabs(sum(chargeDensity) -
> >+                static_cast<double>(createnum))<1.0e-5);
> >
> >
> >
> In C++, std::abs is overloaded to mean std::fabs.  In other words, the
> language designers finally get it right.

Of course, but it used ::abs which causes compile-time warnings of
implicitly casting from double -> int, so I changed it to fabs - but I'll
happily change it to std::abs if anyone cares.

Thanks,
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]