1 |
< |
/** |
2 |
< |
* @file ForceDecomposition.cpp |
3 |
< |
* @author Charles Vardeman <cvardema.at.nd.edu> |
4 |
< |
* @date 08/18/2010 |
5 |
< |
* @time 11:56am |
6 |
< |
* @version 1.0 |
1 |
> |
/* |
2 |
> |
* Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. |
3 |
|
* |
8 |
– |
* @section LICENSE |
9 |
– |
* Copyright (c) 2010 The University of Notre Dame. All Rights Reserved. |
10 |
– |
* |
4 |
|
* The University of Notre Dame grants you ("Licensee") a |
5 |
|
* non-exclusive, royalty free, license to use, modify and |
6 |
|
* redistribute this software in source and binary code form, provided |
38 |
|
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
39 |
|
* [4] Vardeman & Gezelter, in progress (2009). |
40 |
|
*/ |
41 |
+ |
|
42 |
+ |
#ifndef PARALLEL_FORCEDECOMPOSITION_HPP |
43 |
+ |
#define PARALLEL_FORCEDECOMPOSITION_HPP |
44 |
|
|
45 |
+ |
#include "Parallel/Decomposition.hpp" |
46 |
+ |
#include "Parallel/Communicator.hpp" |
47 |
+ |
#include "math/SquareMatrix3.hpp" |
48 |
|
|
49 |
< |
/* -*- c++ -*- */ |
51 |
< |
#ifndef FORCEDECOMPOSITION_PARALLEL_HPP |
52 |
< |
#define FORCEDECOMPOSITION_PARALLEL_HPP |
53 |
< |
|
54 |
< |
|
55 |
< |
namespace OpenMD{ |
56 |
< |
|
57 |
< |
class ForceDecomposition |
58 |
< |
{ |
59 |
< |
public: |
60 |
< |
ForceDecomposition(); |
61 |
< |
virtual ~ForceDecomposition(); |
62 |
< |
void gather(); |
63 |
< |
void scatter(); |
49 |
> |
namespace OpenMD { |
50 |
|
|
51 |
< |
protected: |
52 |
< |
private: |
53 |
< |
int myRank_; |
54 |
< |
static bool isColumn_; |
55 |
< |
static int myIndex_: |
56 |
< |
}; |
51 |
> |
class ForceDecomposition : public Decomposition { |
52 |
> |
public: |
53 |
> |
ForceDecomposition(Snapshot* sman); |
54 |
> |
void distributeInitialData(); |
55 |
> |
void distributeData(); |
56 |
> |
void collectIntermediateData(); |
57 |
> |
void distributeIntermediateData(); |
58 |
> |
void collectData(); |
59 |
|
|
60 |
+ |
unsigned int getNcutoffGroupsI(); |
61 |
+ |
unsigned int getNcutoffGroupsJ(); |
62 |
|
|
63 |
+ |
vector<int> getAtomsInGroupI(int whichCGI); |
64 |
+ |
vector<int> getAtomsInGroupJ(int whichCGJ); |
65 |
|
|
66 |
< |
} |
66 |
> |
AtomType* getAtomTypeI(int whichAtomI); |
67 |
> |
AtomType* getAtomTypeJ(int whichAtomJ); |
68 |
|
|
69 |
+ |
#ifdef IS_MPI |
70 |
+ |
|
71 |
+ |
Comm<I, RealType>* AtomCommRealI; |
72 |
+ |
Comm<I, Vector3d>* AtomCommVectorI; |
73 |
+ |
Comm<I, Mat3x3d>* AtomCommMatrixI; |
74 |
|
|
75 |
+ |
Comm<J, RealType>* AtomCommRealJ; |
76 |
+ |
Comm<J, Vector3d>* AtomCommVectorJ; |
77 |
+ |
Comm<J, Mat3x3d>* AtomCommMatrixJ; |
78 |
|
|
79 |
+ |
Comm<I, Vector3d>* cgCommVectorI; |
80 |
+ |
Comm<J, Vector3d>* cgCommVectorJ; |
81 |
+ |
|
82 |
+ |
#endif |
83 |
+ |
}; |
84 |
|
|
85 |
< |
|
80 |
< |
|
81 |
< |
|
82 |
< |
|
85 |
> |
} |
86 |
|
#endif |
87 |
|
|
85 |
– |
|