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

Comparing branches/development/src/io/RestReader.cpp (file contents):
Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC vs.
Revision 1769 by gezelter, Mon Jul 9 14:15:52 2012 UTC

# Line 280 | Line 280 | namespace OpenMD {
280  
281      int index = tokenizer.nextTokenAsInt();
282  
283 <    StuntDouble* integrableObject = info_->getIOIndexToIntegrableObject(index);
283 >    StuntDouble* sd = info_->getIOIndexToIntegrableObject(index);
284  
285 <    if (integrableObject == NULL) {
285 >    if (sd == NULL) {
286        return;
287      }
288    
# Line 310 | Line 310 | namespace OpenMD {
310        }
311  
312        case 'q' : {
313 <        if (integrableObject->isDirectional()) {
313 >        if (sd->isDirectional()) {
314            
315            q[0] = tokenizer.nextTokenAsDouble();
316            q[1] = tokenizer.nextTokenAsDouble();
# Line 332 | Line 332 | namespace OpenMD {
332        }  
333        case 'j' : {
334          Vector3d ji;
335 <        if (integrableObject->isDirectional()) {
335 >        if (sd->isDirectional()) {
336            ji[0] = tokenizer.nextTokenAsDouble();
337            ji[1] = tokenizer.nextTokenAsDouble();
338            ji[2] = tokenizer.nextTokenAsDouble();
# Line 366 | Line 366 | namespace OpenMD {
366        all_pos_[index] = pos;      
367          
368        // is this io restrained?
369 <      GenericData* data = integrableObject->getPropertyByName("Restraint");
369 >      GenericData* data = sd->getPropertyByName("Restraint");
370        ObjectRestraint* oRest;
371        
372        if (data != NULL) {
# Line 377 | Line 377 | namespace OpenMD {
377              // an ObjectRestraint:
378            oRest = dynamic_cast<ObjectRestraint*>(restData->getData());
379            if (oRest != NULL) {          
380 <            if (integrableObject->isDirectional()) {
380 >            if (sd->isDirectional()) {
381                oRest->setReferenceStructure(pos, q.toRotationMatrix3());
382              } else {                          
383                oRest->setReferenceStructure(pos);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines