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.
Revision 1450 by gezelter, Thu Jun 17 19:11:37 2010 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 357 | Line 357 | namespace OpenMD {
357      }
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]) {

Comparing trunk/src/io/DumpReader.cpp (property svn:keywords):
Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
Revision 1450 by gezelter, Thu Jun 17 19:11:37 2010 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines