00001 // -*- C++ -*- 00002 /*************************************************************************** 00003 * 00004 * The IPPL Framework 00005 * 00006 * 00007 * Visit http://people.web.psi.ch/adelmann/ for more details 00008 * 00009 ***************************************************************************/ 00010 00011 #ifndef PARTICLE_BALANCER_H 00012 #define PARTICLE_BALANCER_H 00013 00014 /*************************************************************************** 00015 * 00016 * ParticleBalancer - functions for performing load balancing for 00017 * particles using a particle density field. 00018 * 00019 * Load balancing for particles is performed by constructing a BareField 00020 * object over the domain occupied by the particles, and filling this field 00021 * with the density of the particles. The Field is then repartitioned by 00022 * using one of the Field repartitioning algorithms, and the resulting 00023 * Field layout is given to the Particle object, which then redistributes 00024 * the particles. 00025 * 00026 ***************************************************************************/ 00027 00028 // forward declarations 00029 template<class T, unsigned Dim, class Mesh> class ParticleSpatialLayout; 00030 template<class T, unsigned Dim> class ParticleUniformLayout; 00031 template<class PLayout> class ParticleBase; 00032 00033 00034 // calculate a new RegionLayout for a given ParticleBase, and distribute the 00035 // new RegionLayout to all the nodes. This uses a Field BinaryBalancer. 00036 template<class T, unsigned Dim, class Mesh> 00037 void 00038 BinaryRepartition(ParticleBase<ParticleSpatialLayout<T,Dim,Mesh> >&); 00039 00040 // the same, but taking a uniform layout (this will not actually do anything) 00041 template<class T, unsigned Dim> 00042 void 00043 BinaryRepartition(ParticleBase<ParticleUniformLayout<T,Dim> >&); 00044 00045 #include "Particle/ParticleBalancer.cpp" 00046 00047 #endif // PARTICLE_BALANCER_H 00048 00049 /*************************************************************************** 00050 * $RCSfile: ParticleBalancer.h,v $ $Author: adelmann $ 00051 * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:28 $ 00052 * IPPL_VERSION_ID: $Id: ParticleBalancer.h,v 1.1.1.1 2003/01/23 07:40:28 adelmann Exp $ 00053 ***************************************************************************/ 00054 00055