00001 00007 #include "InfoStream.h" 00008 #include "Node.h" 00009 #include "PatchMap.h" 00010 #include "ComputeHomePatches.h" 00011 #include "PatchMgr.h" 00012 #include "HomePatchList.h" 00013 #include "Molecule.h" 00014 #include "ReductionMgr.h" 00015 #define MIN_DEBUG_LEVEL 3 00016 #include "Debug.h" 00017 00018 ComputeHomePatches::ComputeHomePatches(ComputeID c) : Compute(c) { 00019 patchMap = PatchMap::Object(); 00020 useAvgPositions = 0; 00021 hasPatchZero = 0; 00022 } 00023 00024 ComputeHomePatches::~ComputeHomePatches() 00025 { 00026 ; 00027 } 00028 00029 void ComputeHomePatches::initialize() 00030 { 00031 HomePatchList *a = patchMap->homePatchList(); 00032 ResizeArrayIter<HomePatchElem> ai(*a); 00033 00034 patchList.resize(0); 00035 00036 for ( ai = ai.begin(); ai != ai.end(); ai++ ) { 00037 patchList.add(PatchElem((*ai).patch, this, useAvgPositions)); 00038 if ( (*ai).patch->getPatchID() == 0 ) hasPatchZero = 1; 00039 } 00040 00041 setNumPatches(patchList.size()); 00042 } 00043 00044 void ComputeHomePatches::atomUpdate() 00045 { 00046 Compute::atomUpdate(); 00047 } 00048