freepooma-devel
[Top][All Lists]
Advanced

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

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


From: Jeffrey D. Oldham
Subject: Re: [PATCH] Fix some of Particle - Field interaction
Date: Tue, 13 Jul 2004 16:21:55 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3

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.

@@ -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.

--
Jeffrey D. Oldham
address@hidden


reply via email to

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