[PATCH] Fix some of Particle - Field interaction
Jeffrey D. Oldham
oldham at codesourcery.com
Tue Jul 13 23:21:55 UTC 2004
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
oldham at codesourcery.com
More information about the pooma-dev
mailing list