| 1313 | } |
| 1314 | |
| 1315 | int |
| 1316 | Node::setR(int row, int col, double Value) |
| 1317 | { |
| 1318 | // ensure R had been set |
| 1319 | if (R == 0) { |
| 1320 | opserr << "Node:setR() - R has not been initialised\n"; |
| 1321 | return -1; |
| 1322 | } |
| 1323 | |
| 1324 | // ensure row, col in range (matrix assignment will catch this - extra work) |
| 1325 | if (row < 0 || row >= numberDOF || col < 0 || col >= R->noCols()) { |
| 1326 | opserr << "Node:setR() - row, col index out of range\n"; |
| 1327 | return -1; |
| 1328 | } |
| 1329 | |
| 1330 | // do the assignment |
| 1331 | (*R)(row,col) = Value; |
| 1332 | |
| 1333 | /* |
| 1334 | // to test uniform excitation pattern with consistent mass matrices: |
| 1335 | // found that the static application of a unit ground displacement |
| 1336 | // needs to also be applied to the constrained DOFs |
| 1337 | Domain *theDomain = this->getDomain(); |
| 1338 | SP_ConstraintIter &theSPs = theDomain->getSPs(); |
| 1339 | SP_Constraint *theSP; |
| 1340 | // assign zero if there is a homogeneous SP |
| 1341 | while ((theSP = theSPs()) != 0) { |
| 1342 | if (theSP->getNodeTag() == this->getTag() && |
| 1343 | theSP->getDOF_Number() == row && |
| 1344 | theSP->isHomogeneous()) { |
| 1345 | (*R)(row,col) = 0.0; |
| 1346 | } |
| 1347 | } |
| 1348 | */ |
| 1349 | |
| 1350 | return 0; |
| 1351 | } |
| 1352 | |
| 1353 | |
| 1354 |
no test coverage detected