ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/primitives/Molecule.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-4/src/primitives/Molecule.cpp (file contents):
Revision 1900 by tim, Fri Dec 3 22:36:06 2004 UTC vs.
Revision 1901 by tim, Tue Jan 4 22:18:36 2005 UTC

# Line 94 | Line 94 | void Molecule::complete() {
94  
95   }
96  
97 + void Molecule::addConstraintPair(ConstraintPair* cp) {
98 +    if (std::find(constraintPairs_.begin(), constraintPairs_.end(), cp) == constraintPairs_.end()) {
99 +        constraintPairs_.push_back(cp);
100 +    }
101 +
102 + }
103 +
104 +
105   void Molecule::complete() {
106      
107      std::set<Atom*> rigidAtoms;
# Line 203 | Line 211 | CutoffGroup* Molecule::nextCutoffGroup(std::vector<Cut
211   CutoffGroup* Molecule::nextCutoffGroup(std::vector<CutoffGroup*>::iterator& i) {            
212      ++i;
213      return (i == cutoffGroups_.end()) ? NULL : *i;    
214 + }
215 +
216 + ConstraintPair* Molecule::beginConstraintPair(std::vector<ConstraintPair*>::iterator& i) {
217 +    i = constraintPairs_.begin();
218 +    return (i == constraintPairs_.end()) ? NULL : *i;
219 + }
220 +
221 + ConstraintPair* Molecule::nextConstraintPair(std::vector<ConstraintPair*>::iterator& i) {            
222 +    ++i;
223 +    return (i == constraintPairs_.end()) ? NULL : *i;    
224   }
225  
226   double Molecule::getMass() {
# Line 301 | Line 319 | std::ostream& operator <<(std::ostream& o, Molecule& m
319      o << mol.getNRigidBodies() << " rigid bodies" << std::endl;
320      o << mol.getNIntegrableObjects() << "integrable objects" << std::endl;
321      o << mol.getNCutoffGroups() << "cutoff groups" << std::endl;
322 <
322 >    o << mol.getNConstraintPairs() << "constraint pairs" << std::endl;
323      return o;
324   }
325  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines