freepooma-devel
[Top][All Lists]
Advanced

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

Re: [Freepooma-devel] <pooma>/src/Particles/InterpolatorCIC.h


From: Richard Guenther
Subject: Re: [Freepooma-devel] <pooma>/src/Particles/InterpolatorCIC.h
Date: Thu, 31 Mar 2005 19:08:01 +0200
User-agent: Debian Thunderbird 1.0 (X11/20050117)

Roman Krylov wrote:
The problem I encountered was: when there is only one patch, CIC don't really need any internalGuards, but, in such a situation it's complaining that internalGuard's width is less than 1.

The situation could be reproduced when changing
"NGP" to "CIC" and
"Loc<PDim> blocks(4,4)" to "Loc<PDim> blocks(1,1)"
in /examples/Particles/PIC2d/PIC2d.cpp.

I suggest, it would be wise to adorn all fragments like

      for (int d=0; d<Dim; ++d)
        {
          PInsist(gl.lower(d)>=1 && gl.upper(d)>=1,
                  "Minimum GuardLayer width of 1 required for CIC!");
        }


with something like:

/*--->>*/      if(layout.sizeGlobal()>1)    //<<---
      for (int d=0; d<Dim; ++d)
        {
          PInsist(gl.lower(d)>=1 && gl.upper(d)>=1,
                  "Minimum GuardLayer width of 1 required for CIC!");
        }


Sorry if talking nonsense.

But if you only have one patch, you can as well use 1 internal guard, no? I only can imagine DomainLayout being special here, but would need
to check that.  I don't think specializing like above for layout global
size is a good idea from a SW engineering position.

Richard.




reply via email to

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