37 |
|
//register the creator to IntegratorFactory |
38 |
|
REGISTER_CREATOR(IntegratorFactory, "NVE", NVE); |
39 |
|
|
40 |
< |
NVE::NVE(SimInfo* info) { |
40 |
> |
NVE::NVE(SimInfo* info) : VelocityVerletIntegrator(info){ |
41 |
|
|
42 |
|
} |
43 |
|
|
44 |
< |
NVE::moveA(){ |
45 |
< |
std::vector<Molecule*>::iterator i; |
44 |
> |
void NVE::moveA(){ |
45 |
> |
typename SimInfo::MoleculeIterator i; |
46 |
|
std::vector<StuntDouble*>::iterator j; |
47 |
|
Molecule* mol; |
48 |
|
StuntDouble* integrableObject; |
52 |
|
Vector3d Tb; |
53 |
|
Vector3d ji; |
54 |
|
double mass; |
55 |
– |
|
56 |
– |
// Raw degrees of freedom that we have to set |
55 |
|
|
56 |
< |
for (mol = info->beginMolecule(i); mol != NULL; mol = info->nextMolecule(i)) { |
56 |
> |
for (mol = info_->beginMolecule(i); mol != NULL; mol = info_->nextMolecule(i)) { |
57 |
|
for (integrableObject = mol->beginIntegrableObject(j); integrableObject != NULL; |
58 |
|
integrableObject = mol->nextIntegrableObject(j)) { |
59 |
|
|
90 |
|
|
91 |
|
|
92 |
|
} |
93 |
< |
} //end for(mol = info->beginMolecule(i)) |
93 |
> |
} //end for(mol = info_->beginMolecule(i)) |
94 |
|
|
95 |
|
constraintAlgorithm->doConstrainA(); |
96 |
|
|
97 |
|
} |
98 |
|
|
99 |
< |
NVE::moveB(){ |
100 |
< |
std::vector<Molecule*>::iterator i; |
99 |
> |
void NVE::moveB(){ |
100 |
> |
typename SimInfo::MoleculeIterator i; |
101 |
|
std::vector<StuntDouble*>::iterator j; |
102 |
|
Molecule* mol; |
103 |
|
StuntDouble* integrableObject; |
107 |
|
Vector3d ji; |
108 |
|
double mass; |
109 |
|
|
110 |
< |
for (mol = info->beginMolecule(i); mol != NULL; mol = info->nextMolecule(i)) { |
110 |
> |
for (mol = info_->beginMolecule(i); mol != NULL; mol = info_->nextMolecule(i)) { |
111 |
|
for (integrableObject = mol->beginIntegrableObject(j); integrableObject != NULL; |
112 |
|
integrableObject = mol->nextIntegrableObject(j)) { |
113 |
|
|
137 |
|
|
138 |
|
|
139 |
|
} |
140 |
< |
} //end for(mol = info->beginMolecule(i)) |
140 |
> |
} //end for(mol = info_->beginMolecule(i)) |
141 |
|
|
142 |
|
|
143 |
|
constraintAlgorithm->doConstrainB(); |
144 |
|
|
145 |
|
} |
146 |
|
|
147 |
+ |
|
148 |
+ |
void NVE::calcConservedQuantity() { |
149 |
+ |
|
150 |
+ |
} |
151 |
+ |
|
152 |
|
} //end namespace oopse |