-
Notifications
You must be signed in to change notification settings - Fork 1
/
ComputeGlobal.h
63 lines (49 loc) · 1.58 KB
/
ComputeGlobal.h
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/**
*** Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by
*** The Board of Trustees of the University of Illinois.
*** All rights reserved.
**/
/*
Forwards atoms to master node for force evaluation.
*/
#ifndef COMPUTEGLOBAL_H
#define COMPUTEGLOBAL_H
#include "ComputeHomePatches.h"
#include "NamdTypes.h"
class ComputeGlobalConfigMsg;
class ComputeGlobalDataMsg;
class ComputeGlobalResultsMsg;
class ComputeMgr;
class SubmitReduction;
class ComputeGlobal : public ComputeHomePatches {
public:
ComputeGlobal(ComputeID, ComputeMgr*);
virtual ~ComputeGlobal();
void doWork();
// void recvConfig(ComputeGlobalConfigMsg *);
void recvResults(ComputeGlobalResultsMsg *);
// For "loadtotalforces" TCL command
void saveTotalForces(HomePatch *);
private:
ComputeMgr *comm;
void sendData();
void configure(AtomIDList &newaid, AtomIDList &newgdef);
AtomIDList aid;
AtomIDList gdef; // definitions of groups
// (For "loadtotalforces" TCL command)
// The atom IDs and forces of the requested atoms on the node
// after force evaluation. "fid" could be slightly different
// from "aid", since the latter is after atom migration.
AtomIDList fid;
ForceList totalForce;
Force **forcePtrs;
FullAtom **atomPtrs;
int forceSendEnabled; // are total forces received?
char *isRequested; // whether this atom is requested by the TCL script
int isRequestedAllocSize; // size of array
int endRequested; // starting at this point assume not requested
int dofull; // whether "Results::slow" force will exist
int firsttime;
SubmitReduction *reduction;
};
#endif