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

Comparing:
trunk/src/io/DumpReader.cpp (file contents), Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
branches/development/src/io/DumpReader.cpp (file contents), Revision 1629 by gezelter, Wed Sep 14 21:15:17 2011 UTC

# Line 341 | Line 341 | namespace OpenMD {
341      
342      nTokens = tokenizer.countTokens();
343      
344 <    if (nTokens < 2) {
344 >    if (nTokens < 2) {  
345        sprintf(painCave.errMsg,
346                "DumpReader Error: Not enough Tokens.\n%s\n", line.c_str());
347        painCave.isFatal = 1;
# Line 358 | Line 358 | namespace OpenMD {
358      std::string type = tokenizer.nextToken();
359      int size = type.size();
360  
361 +    size_t found;
362 +    
363 +    if (needPos_) {
364 +      found = type.find("p");      
365 +      if (found == std::string::npos) {
366 +        sprintf(painCave.errMsg,
367 +                "DumpReader Error: StuntDouble %d has no Position\n"
368 +                "\tField (\"p\") specified.\n%s\n", index,
369 +                line.c_str());  
370 +        painCave.isFatal = 1;
371 +        simError();
372 +      }
373 +    }
374 +    
375 +    if (integrableObject->isDirectional()) {
376 +      if (needQuaternion_) {
377 +        found = type.find("q");      
378 +        if (found == std::string::npos) {
379 +          sprintf(painCave.errMsg,
380 +                  "DumpReader Error: Directional StuntDouble %d has no\n"
381 +                  "\tQuaternion Field (\"q\") specified.\n%s\n", index,
382 +                  line.c_str());  
383 +          painCave.isFatal = 1;
384 +          simError();
385 +        }
386 +      }      
387 +    }
388 +
389      for(int i = 0; i < size; ++i) {
390        switch(type[i]) {
391          
# Line 438 | Line 466 | namespace OpenMD {
466             integrableObject->setTrq(torque);          
467             break;
468          }
469 +        case 'u' : {
470 +
471 +           RealType particlePot;
472 +           particlePot = tokenizer.nextTokenAsDouble();
473 +           integrableObject->setParticlePot(particlePot);          
474 +           break;
475 +        }
476          default: {
477                 sprintf(painCave.errMsg,
478                         "DumpReader Error: %s is an unrecognized type\n", type.c_str());

Comparing:
trunk/src/io/DumpReader.cpp (property svn:keywords), Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
branches/development/src/io/DumpReader.cpp (property svn:keywords), Revision 1629 by gezelter, Wed Sep 14 21:15:17 2011 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines