29 |
|
#include <vector> |
30 |
|
#include "brains/ForceManager.hpp" |
31 |
|
#include "constraints/ZconsStruct.hpp" |
32 |
+ |
#include "io/ZConsWriter.hpp" |
33 |
|
namespace oopse { |
34 |
|
|
35 |
|
class ZconstraintForceManager : public ForceManager { |
36 |
|
public: |
37 |
|
ZconstraintForceManager(SimInfo* info); |
38 |
+ |
~ZconstraintForceManager(); |
39 |
|
|
40 |
|
virtual void calcForces(bool needPotential, bool needStress); |
41 |
|
|
43 |
|
std::string getZConsOutput() { return zconsOutput_; } |
44 |
|
|
45 |
|
void update(); |
46 |
< |
|
46 |
> |
virtual void init(); |
47 |
|
private: |
48 |
|
|
49 |
|
bool isZMol(Molecule* mol); |
53 |
|
void doZconstraintForce(); |
54 |
|
void doHarmonic(); |
55 |
|
bool checkZConsState(); |
54 |
– |
bool haveFixedZMols(); |
55 |
– |
bool haveMovingMols(); |
56 |
|
void updateZPos(); |
57 |
|
void updateCantPos(); |
58 |
|
void calcTotalMassMovingZMols(); |
59 |
+ |
bool haveMovingZMols(); |
60 |
+ |
bool haveFixedZMols(); |
61 |
|
double getZTargetPos(int index); |
62 |
|
double getZFOfFixedZMols(Molecule* mol, StuntDouble* sd, double totalForce) ; |
63 |
< |
double getZFOfMovingMols(StuntDouble* sd, double totalForce) ; |
63 |
> |
double getZFOfMovingMols(Molecule* mol, double totalForce) ; |
64 |
|
double getHFOfFixedZMols(Molecule* mol, StuntDouble* sd, double totalForce); |
65 |
< |
double getHFOfUnconsMols(StuntDouble* sd, double totalForce); |
65 |
> |
double getHFOfUnconsMols(Molecule* mol, double totalForce); |
66 |
|
|
67 |
|
std::list<ZconstraintMol> movingZMols_; /**< moving zconstraint molecules*/ |
68 |
|
std::list<ZconstraintMol> fixedZMols_; /**< fixed zconstraint molecules*/ |