-
Notifications
You must be signed in to change notification settings - Fork 1
/
ComputeHomePatches.C
48 lines (39 loc) · 1 KB
/
ComputeHomePatches.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
*** Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by
*** The Board of Trustees of the University of Illinois.
*** All rights reserved.
**/
#include "InfoStream.h"
#include "Node.h"
#include "PatchMap.h"
#include "ComputeHomePatches.h"
#include "PatchMgr.h"
#include "HomePatchList.h"
#include "Molecule.h"
#include "ReductionMgr.h"
#define MIN_DEBUG_LEVEL 3
#include "Debug.h"
ComputeHomePatches::ComputeHomePatches(ComputeID c) : Compute(c) {
patchMap = PatchMap::Object();
useAvgPositions = 0;
hasPatchZero = 0;
}
ComputeHomePatches::~ComputeHomePatches()
{
;
}
void ComputeHomePatches::initialize()
{
HomePatchList *a = patchMap->homePatchList();
ResizeArrayIter<HomePatchElem> ai(*a);
patchList.resize(0);
for ( ai = ai.begin(); ai != ai.end(); ai++ ) {
patchList.add(PatchElem((*ai).patch, this, useAvgPositions));
if ( (*ai).patch->getPatchID() == 0 ) hasPatchZero = 1;
}
setNumPatches(patchList.size());
}
void ComputeHomePatches::atomUpdate()
{
Compute::atomUpdate();
}