OpenAtom  Version1.5a
PIBeadAtoms.h
1 /*
2 ** PIBeadAtoms.h
3 **
4 ** Made by Eric Bohm
5 ** Login <bohm@alacrity>
6 **
7 ** Started on Mon Mar 1 10:35:54 2010 Eric Bohm
8 ** Last update Mon Mar 1 10:35:54 2010 Eric Bohm
9 *
10 * PIBeadAtoms is the helper array which accepts the transpose of bead-wise
11 * atomic positions and forces into atom-wise form. Atom-wise
12 * operations are then performed and the result is returned to the
13 * usual bead-wise atom structures.
14 
15 * Notionally this is the F_x -> F_u -> F_x process where F_u is
16 * constructed in PIBeadAtoms
17 
18 * PIBeadAtoms is triggered during Atom force integration when path
19 * integrals (UberIMax > 0) are in use.
20 
21 * PIBeadAtoms is initialized with atom positions during startup
22 
23 * PIBeadAtoms receives and sends force contributions each step
24 
25 * PIBeadAtoms doesn't really have persistent state. Its purpose is as
26 * a temporary space for the F_u operations. As such, it is entirely
27 * data driven and could theoretically be created and destroyed every
28 * step, or even computed in the atoms group using some arbitrary
29 * partioning scheme. In practice we don't do that because the
30 * initialization isn't free of cost and it is easier to debug things
31 * when they have an explicit decomposition.
32 *
33 * PIBeadAtoms has no internal synchronization.
34 */
35 
36 #ifndef PIBEAD_H_
37 # define PIBEAD_H_
38 
39 
40 
41 #include "PIBeadAtoms.decl.h"
42 #include "uber/Uber.h"
43 
45 {
46  public:
47  PIBeadAtoms(CkMigrateMessage *m) {}
48  PIBeadAtoms(UberCollection _thisInstance, int _numBeads, int _natm);
49  PIBeadAtoms(int );
50  void accept_PIMD_Fx(AtomXYZMsg *msg);
52  void accept_PIMD_x(double _x, double _y, double _z, int PIBeadIndex);
53  void accept_PIMD_u(double _xu, double _yu, double _zu, int PIBeadIndex);
54  ~PIBeadAtoms(){}
55  private:
56  const UberCollection thisInstance;
57  int numBeads;
58  int natm;
59  void compute_PIMD_Fu();
60  void compute_PIMD_u();
61  void compute_PIMD_x();
62  void output_PIMD_u();
63  void output_PIMD_x();
64  void zero_PIMD_u();
65  void zero_PIMD_x();
66  void zero_PIMD_fu();
67  void energy_PIMD_u();
68  void energy_PIMD_x();
69  void modelpot_PIMD_x(double *);
70  void checkUforce();
71  // each of these arrays is of length numBeads
72  double *x,*y,*z;
73  double *xu,*yu,*zu;
74  double *fx,*fy,*fz;
75  double *fxu,*fyu,*fzu;
76  double *rat1,*rat2,*veig;
77  int acceptCount_Fx;
78  int acceptCount_u;
79  int acceptCount_x;
80 };
81 #endif /* !PIBEAD_H_ */
82 
holds the UberIndex and the offset for proxies
Definition: Uber.h:68
void output_PIMD_x()
useful for debugging /////////////////////////////////////////////////////////////////////////// ////...
Definition: PIBeadAtoms.C:343
void zero_PIMD_u()
useful for debugging /////////////////////////////////////////////////////////////////////////// ////...
Definition: PIBeadAtoms.C:385
void zero_PIMD_x()
useful for debugging /////////////////////////////////////////////////////////////////////////// ////...
Definition: PIBeadAtoms.C:422
void output_PIMD_u()
useful for debugging /////////////////////////////////////////////////////////////////////////// ////...
Definition: PIBeadAtoms.C:364
void energy_PIMD_x()
useful for debugging /////////////////////////////////////////////////////////////////////////// ////...
Definition: PIBeadAtoms.C:441
void accept_PIMD_Fx_and_x(AtomXYZMsg *msg)
Definition: PIBeadAtoms.C:110
void energy_PIMD_u()
useful for debugging /////////////////////////////////////////////////////////////////////////// ////...
Definition: PIBeadAtoms.C:474
void checkUforce()
useful for debugging /////////////////////////////////////////////////////////////////////////// ////...
Definition: PIBeadAtoms.C:502
void zero_PIMD_fu()
useful for debugging /////////////////////////////////////////////////////////////////////////// ////...
Definition: PIBeadAtoms.C:403
void modelpot_PIMD_x(double *)
useful for debugging /////////////////////////////////////////////////////////////////////////// ////...
Definition: PIBeadAtoms.C:556