| 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: | 
| 348 | 
  | 
  // entire system: | 
| 349 | 
  | 
 | 
| 350 | 
  | 
  ndf = ndf - 3 - nZconstraints; | 
| 351 | 
+ | 
 | 
| 352 | 
+ | 
  std::cerr << "ndf = " << ndf; | 
| 353 | 
  | 
 | 
| 354 | 
  | 
  return ndf; | 
| 355 | 
  | 
} | 
| 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 | 
| 394 | 
  | 
  ndfTrans = ndfTrans - 3 - nZconstraints; | 
| 395 | 
  | 
 | 
| 396 | 
  | 
  return ndfTrans; | 
| 397 | 
+ | 
} | 
| 398 | 
+ | 
 | 
| 399 | 
+ | 
int SimInfo::getTotIntegrableObjects() { | 
| 400 | 
+ | 
  int nObjs_local; | 
| 401 | 
+ | 
  int nObjs; | 
| 402 | 
+ | 
 | 
| 403 | 
+ | 
  nObjs_local =  integrableObjects.size(); | 
| 404 | 
+ | 
 | 
| 405 | 
+ | 
 | 
| 406 | 
+ | 
#ifdef IS_MPI | 
| 407 | 
+ | 
  MPI_Allreduce(&nObjs_local,&nObjs,1,MPI_INT,MPI_SUM, MPI_COMM_WORLD); | 
| 408 | 
+ | 
#else | 
| 409 | 
+ | 
  nObjs = nObjs_local; | 
| 410 | 
+ | 
#endif | 
| 411 | 
+ | 
 | 
| 412 | 
+ | 
 | 
| 413 | 
+ | 
  return nObjs; | 
| 414 | 
  | 
} | 
| 415 | 
  | 
 | 
| 416 | 
  | 
void SimInfo::refreshSim(){ | 
| 591 | 
  | 
    return NULL;   | 
| 592 | 
  | 
} | 
| 593 | 
  | 
 | 
| 564 | 
– | 
vector<GenericData*> SimInfo::getProperties(){ | 
| 565 | 
– | 
 | 
| 566 | 
– | 
  vector<GenericData*> result; | 
| 567 | 
– | 
  map<string, GenericData*>::iterator i; | 
| 568 | 
– | 
   | 
| 569 | 
– | 
  for(i = properties.begin(); i != properties.end(); i++) | 
| 570 | 
– | 
    result.push_back((*i).second); | 
| 571 | 
– | 
     | 
| 572 | 
– | 
  return result; | 
| 573 | 
– | 
} |