ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/SimInfo.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/SimInfo.cpp (file contents):
Revision 1108 by tim, Wed Apr 14 15:37:41 2004 UTC vs.
Revision 1125 by gezelter, Mon Apr 19 22:13:01 2004 UTC

# Line 322 | Line 322 | int SimInfo::getNDF(){
322   int SimInfo::getNDF(){
323    int ndf_local;
324  
325 +  ndf_local = 0;
326 +  
327    for(int i = 0; i < integrableObjects.size(); i++){
328      ndf_local += 3;
329 <    if (integrableObjects[i]->isDirectional())
330 <      ndf_local += 3;
329 >    if (integrableObjects[i]->isDirectional()) {
330 >      if (integrableObjects[i]->isLinear())
331 >        ndf_local += 2;
332 >      else
333 >        ndf_local += 3;
334 >    }
335    }
336  
337    // n_constraints is local, so subtract them on each processor:
# Line 343 | Line 349 | int SimInfo::getNDF(){
349  
350    ndf = ndf - 3 - nZconstraints;
351  
352 +  std::cerr << "ndf = " << ndf;
353 +
354    return ndf;
355   }
356  
# Line 350 | Line 358 | int SimInfo::getNDFraw() {
358    int ndfRaw_local;
359  
360    // Raw degrees of freedom that we have to set
361 +  ndfRaw_local = 0;
362  
363    for(int i = 0; i < integrableObjects.size(); i++){
364      ndfRaw_local += 3;
365 <    if (integrableObjects[i]->isDirectional())
366 <      ndfRaw_local += 3;
365 >    if (integrableObjects[i]->isDirectional()) {
366 >       if (integrableObjects[i]->isLinear())
367 >        ndfRaw_local += 2;
368 >      else
369 >        ndfRaw_local += 3;
370 >    }
371    }
372      
373   #ifdef IS_MPI
# Line 578 | Line 591 | vector<GenericData*> SimInfo::getProperties(){
591      return NULL;  
592   }
593  
581 vector<GenericData*> SimInfo::getProperties(){
582
583  vector<GenericData*> result;
584  map<string, GenericData*>::iterator i;
585  
586  for(i = properties.begin(); i != properties.end(); i++)
587    result.push_back((*i).second);
588    
589  return result;
590 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines