69 |
|
public: |
70 |
|
|
71 |
|
Snapshot(int nAtoms, int nRigidbodies) : atomData(nAtoms), rigidbodyData(nRigidbodies), |
72 |
< |
currentTime_(0), orthoRhombic_(0), chi_(0.0), integralOfChiDt_(0.0), eta_(0.0), id_(-1) { |
72 |
> |
currentTime_(0), orthoTolerance_(1e-6), orthoRhombic_(0), chi_(0.0), integralOfChiDt_(0.0), eta_(0.0), id_(-1) { |
73 |
|
|
74 |
|
} |
75 |
|
|
76 |
|
Snapshot(int nAtoms, int nRigidbodies, int storageLayout) |
77 |
|
: atomData(nAtoms, storageLayout), rigidbodyData(nRigidbodies, storageLayout), |
78 |
< |
currentTime_(0), orthoRhombic_(0), chi_(0.0), integralOfChiDt_(0.0), eta_(0.0), id_(-1) { |
78 |
> |
currentTime_(0), orthoTolerance_(1e-6), orthoRhombic_(0), chi_(0.0), integralOfChiDt_(0.0), eta_(0.0), id_(-1) { |
79 |
|
|
80 |
|
} |
81 |
|
|
111 |
|
/** Sets the H-Matrix */ |
112 |
|
void setHmat(const Mat3x3d& m); |
113 |
|
|
114 |
< |
double getVolume() { |
114 |
> |
RealType getVolume() { |
115 |
|
return hmat_.determinant(); |
116 |
|
} |
117 |
|
|
122 |
|
|
123 |
|
/** Wrapping the vector according to periodic boundary condition*/ |
124 |
|
void wrapVector(Vector3d& v); |
125 |
< |
|
125 |
> |
Vector3d getCOM(); |
126 |
> |
Vector3d getCOMvel(); |
127 |
> |
Vector3d getCOMw(); |
128 |
|
|
129 |
< |
double getTime() { |
129 |
> |
RealType getTime() { |
130 |
|
return currentTime_; |
131 |
|
} |
132 |
|
|
133 |
< |
void increaseTime(double dt) { |
133 |
> |
void increaseTime(RealType dt) { |
134 |
|
setTime(getTime() + dt); |
135 |
|
} |
136 |
|
|
137 |
< |
void setTime(double time) { |
137 |
> |
void setTime(RealType time) { |
138 |
|
currentTime_ =time; |
139 |
|
//time at statData is redundant |
140 |
|
statData[Stats::TIME] = currentTime_; |
141 |
|
} |
142 |
|
|
143 |
< |
double getChi() { |
143 |
> |
RealType getChi() { |
144 |
|
return chi_; |
145 |
|
} |
146 |
|
|
147 |
< |
void setChi(double chi) { |
147 |
> |
void setChi(RealType chi) { |
148 |
|
chi_ = chi; |
149 |
|
} |
150 |
|
|
151 |
< |
double getIntegralOfChiDt() { |
151 |
> |
RealType getIntegralOfChiDt() { |
152 |
|
return integralOfChiDt_; |
153 |
|
} |
154 |
|
|
155 |
< |
void setIntegralOfChiDt(double integralOfChiDt) { |
155 |
> |
void setIntegralOfChiDt(RealType integralOfChiDt) { |
156 |
|
integralOfChiDt_ = integralOfChiDt; |
157 |
|
} |
158 |
|
|
159 |
+ |
|
160 |
+ |
void setOrthoTolerance(RealType orthoTolerance) { |
161 |
+ |
orthoTolerance_ = orthoTolerance; |
162 |
+ |
} |
163 |
+ |
|
164 |
|
Mat3x3d getEta() { |
165 |
|
return eta_; |
166 |
|
} |
168 |
|
void setEta(const Mat3x3d& eta) { |
169 |
|
eta_ = eta; |
170 |
|
} |
171 |
< |
|
171 |
> |
|
172 |
> |
bool hasCOM() { |
173 |
> |
return hasCOM_; |
174 |
> |
} |
175 |
> |
|
176 |
> |
void setCOMprops(const Vector3d& COM, const Vector3d& COMvel, const Vector3d& COMw) { |
177 |
> |
COM_ = COM; |
178 |
> |
COMvel_ = COMvel; |
179 |
> |
COMw_ = COMw; |
180 |
> |
hasCOM_ = true; |
181 |
> |
} |
182 |
> |
|
183 |
|
DataStorage atomData; |
184 |
|
DataStorage rigidbodyData; |
185 |
|
Stats statData; |
186 |
|
|
187 |
|
private: |
188 |
< |
double currentTime_; |
188 |
> |
RealType currentTime_; |
189 |
|
|
190 |
|
Mat3x3d hmat_; |
191 |
|
Mat3x3d invHmat_; |
192 |
+ |
RealType orthoTolerance_; |
193 |
|
int orthoRhombic_; |
194 |
|
|
195 |
< |
double chi_; |
196 |
< |
double integralOfChiDt_; |
195 |
> |
RealType chi_; |
196 |
> |
RealType integralOfChiDt_; |
197 |
|
Mat3x3d eta_; |
198 |
+ |
Vector3d COM_; |
199 |
+ |
Vector3d COMvel_; |
200 |
+ |
Vector3d COMw_; |
201 |
+ |
bool hasCOM_; |
202 |
|
|
203 |
|
int id_; /**< identification number of the snapshot */ |
204 |
|
}; |