ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/brains/Snapshot.cpp
(Generate patch)

Comparing trunk/src/brains/Snapshot.cpp (file contents):
Revision 1021 by gezelter, Wed Aug 2 19:40:39 2006 UTC vs.
Revision 1104 by gezelter, Fri Dec 29 21:43:18 2006 UTC

# Line 155 | Line 155 | namespace oopse {
155  
156    }
157  
158 +  Vector3d Snapshot::getCOM() {
159 +    if( !hasCOM_ ) {
160 +      sprintf( painCave.errMsg, "COM was requested before COM was computed!\n");
161 +      painCave.severity = OOPSE_ERROR;
162 +      simError();
163 +    }
164 +    return COM_;
165 +  }
166 +  
167 +  Vector3d Snapshot::getCOMvel() {
168 +    if( !hasCOM_ ) {
169 +      sprintf( painCave.errMsg, "COMvel was requested before COM was computed!\n");
170 +      painCave.severity = OOPSE_ERROR;
171 +      simError();
172 +    }
173 +    return COMvel_;
174 +  }
175 +  
176 +  Vector3d Snapshot::getCOMw() {
177 +    if( !hasCOM_ ) {
178 +      sprintf( painCave.errMsg, "COMw was requested before COM was computed!\n");
179 +      painCave.severity = OOPSE_ERROR;
180 +      simError();
181 +    }
182 +    return COMw_;
183 +  }
184 +
185   }
186    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines