38 |
|
virtual void constrainA( void ); |
39 |
|
virtual void constrainB( void ); |
40 |
|
virtual int readyCheck( void ) { return 1; } |
41 |
+ |
|
42 |
+ |
virtual void calcForce( int calcPot, int calcStress ); |
43 |
+ |
virtual void thermalize(); |
44 |
|
|
45 |
|
void checkConstraints( void ); |
46 |
|
void rotate( int axes1, int axes2, double angle, double j[3], |
47 |
|
double A[3][3] ); |
48 |
< |
|
46 |
< |
|
48 |
> |
|
49 |
|
ForceFields* myFF; |
50 |
|
|
51 |
|
SimInfo *info; // all the info we'll ever need |
304 |
|
|
305 |
|
ZConstraint( SimInfo *theInfo, ForceFields* the_ff); |
306 |
|
~ZConstraint(); |
307 |
< |
|
306 |
< |
virtual void integrateStep( int calcPot, int calcStress ); |
307 |
< |
|
308 |
< |
|
307 |
> |
|
308 |
|
void setZConsTime(double time) {this->zconsTime = time;} |
309 |
|
void getZConsTime() {return zconsTime;} |
310 |
|
|
313 |
|
|
314 |
|
void setZConsOutput(const char * fileName) {zconsOutput = fileName;} |
315 |
|
string getZConsOutput() {return zconsOutput;} |
316 |
+ |
|
317 |
+ |
virtual void integrate(); |
318 |
+ |
|
319 |
|
|
320 |
|
#ifdef IS_MPI |
321 |
|
virtual void update(); //which is called to indicate the molecules' migration |
323 |
|
|
324 |
|
protected: |
325 |
|
|
326 |
< |
double zconsTime; |
326 |
> |
enum ZConsState {zcsMoving, zcsFixed}; |
327 |
> |
|
328 |
> |
|
329 |
> |
|
330 |
> |
virtual void calcForce( int calcPot, int calcStress ); |
331 |
> |
virtual void thermalize(void); |
332 |
|
|
333 |
< |
void resetZ(void); |
333 |
> |
void zeroOutVel(); |
334 |
> |
void doZconstraintForce(); |
335 |
> |
bool checkZConsState(); |
336 |
> |
|
337 |
> |
bool haveFixedZMols(); |
338 |
> |
bool haveMovingZMols(); |
339 |
> |
|
340 |
> |
double calcZSys(); |
341 |
> |
|
342 |
> |
int isZConstraintMol(Molecule* mol); |
343 |
> |
|
344 |
> |
|
345 |
> |
double zconsTime; |
346 |
> |
double ztol; |
347 |
|
|
348 |
|
vector<Molecule*> zconsMols; |
349 |
|
vector<double> massOfZConsMols; |
350 |
+ |
vector<double> zconsPos; |
351 |
+ |
vector<double> kz; |
352 |
+ |
vector<ZConsState> states; |
353 |
+ |
vector<double> ZPos; |
354 |
|
|
355 |
+ |
|
356 |
|
vector<Molecule*> unconsMols; |
357 |
|
vector<double> massOfUnconsMols; |
358 |
|
double totalMassOfUncons; |
334 |
– |
|
335 |
– |
vector<double> allRefZ; |
336 |
– |
vector<double> refZ; |
359 |
|
|
360 |
|
vector<int> indexOfAllZConsMols; //index of All Z-Constraint Molecuels |
361 |
< |
int* indexOfZConsMols; //index of local Z-Constraint Molecules |
362 |
< |
|
361 |
> |
|
362 |
> |
int* indexOfZConsMols; //index of local Z-Constraint Molecules |
363 |
|
double* fz; |
364 |
|
|
365 |
< |
private: |
365 |
> |
int totNumOfUnconsAtoms; |
366 |
|
|
367 |
< |
int isZConstraintMol(Molecule* mol); |
367 |
> |
int whichDirection; //constraint direction |
368 |
> |
|
369 |
> |
private: |
370 |
> |
|
371 |
|
string zconsOutput; |
372 |
|
ZConsWriter* fzOut; |
373 |
+ |
|
374 |
+ |
|
375 |
|
}; |
376 |
|
|
377 |
|
#endif |