--- trunk/OOPSE/libmdtools/SimInfo.cpp 2004/04/14 15:37:41 1108 +++ trunk/OOPSE/libmdtools/SimInfo.cpp 2004/04/19 22:13:01 1125 @@ -322,10 +322,16 @@ int SimInfo::getNDF(){ int SimInfo::getNDF(){ int ndf_local; + ndf_local = 0; + for(int i = 0; i < integrableObjects.size(); i++){ ndf_local += 3; - if (integrableObjects[i]->isDirectional()) - ndf_local += 3; + if (integrableObjects[i]->isDirectional()) { + if (integrableObjects[i]->isLinear()) + ndf_local += 2; + else + ndf_local += 3; + } } // n_constraints is local, so subtract them on each processor: @@ -343,6 +349,8 @@ int SimInfo::getNDF(){ ndf = ndf - 3 - nZconstraints; + std::cerr << "ndf = " << ndf; + return ndf; } @@ -350,11 +358,16 @@ int SimInfo::getNDFraw() { int ndfRaw_local; // Raw degrees of freedom that we have to set + ndfRaw_local = 0; for(int i = 0; i < integrableObjects.size(); i++){ ndfRaw_local += 3; - if (integrableObjects[i]->isDirectional()) - ndfRaw_local += 3; + if (integrableObjects[i]->isDirectional()) { + if (integrableObjects[i]->isLinear()) + ndfRaw_local += 2; + else + ndfRaw_local += 3; + } } #ifdef IS_MPI @@ -578,13 +591,3 @@ GenericData* SimInfo::getProperty(const string& propNa return NULL; } -vector SimInfo::getProperties(){ - - vector result; - map::iterator i; - - for(i = properties.begin(); i != properties.end(); i++) - result.push_back((*i).second); - - return result; -}