PatchSwapLayout.h File Reference

These classes define storage and functors for use in implementing particle layout classes that manage particles by swapping them from one patch to another. More...

#include "Pooma/Configuration.h"
#include "Pooma/Pooma.h"
#include "Engine/BrickEngine.h"
#include "Array/Array.h"
#include "Layout/DynamicEvents.h"
#include "Utilities/Inform.h"
#include "Utilities/PAssert.h"
#include "Particles/PatchSwapLayout.cpp"

Include dependency graph for PatchSwapLayout.h:

This graph shows which files directly or indirectly include this file:


Classes

class  PatchSwapInfo
class  PatchSwapFunctor< P >
class  PatchSwapLayout< L >

Detailed Description

These classes define storage and functors for use in implementing particle layout classes that manage particles by swapping them from one patch to another.

They work with multi-patch attributes by computing on what patch each particle should be, and moving them around when asked. PatchSwapInfo stores per-patch info for use in the swapping operation, while PatchSwapFunctor's are the patch-functor invoked to do the swapping for a single patch in a multi-threaded environment for a particles object of type P. PatchSwapLayout is a base class for all swapping particle layouts, and defines the main "swap" routine. It is templated on the type of derived class that it works with, so that it can provide that particular type to the swap functor. Derived classes should implement any specialized behavior and storage type type require, plus provide an implementation of a method

Size_t findPatchNumber(lid, gid, posarray, patcharray, amountarray)

to calculate the global patch ID of all particles in a given array at the present time. This is used by the swap functor to determine where things should go. The different particle layout classes just provide the algorithm that determines where things go.

PSwapPack is a structure used to store the items needed to exchange particle data between patches on different contexts.


Generated on Wed Mar 16 06:18:24 2011 for FreePOOMA by  doxygen 1.5.9