MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / setR

Method setR

DEVELOPER/core/Node.cpp:1362–1398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1360}
1361
1362int
1363Node::setR(int row, int col, double Value)
1364{
1365 // ensure R had been set
1366 if (R == 0) {
1367 opserr << "Node:setR() - R has not been initialised\n";
1368 return -1;
1369 }
1370
1371 // ensure row, col in range (matrix assignment will catch this - extra work)
1372 if (row < 0 || row > numberDOF || col < 0 || col > R->noCols()) {
1373 opserr << "Node:setR() - row, col index out of range\n";
1374 return -1;
1375 }
1376
1377 // do the assignment
1378 (*R)(row,col) = Value;
1379
1380 /*
1381 // to test uniform excitation pattern with consistent mass matrices:
1382 // found that the static application of a unit ground displacement
1383 // needs to also be applied to the constrained DOFs
1384 Domain *theDomain = this->getDomain();
1385 SP_ConstraintIter &theSPs = theDomain->getSPs();
1386 SP_Constraint *theSP;
1387 // assign zero if there is a homogeneous SP
1388 while ((theSP = theSPs()) != 0) {
1389 if (theSP->getNodeTag() == this->getTag() &&
1390 theSP->getDOF_Number() == row &&
1391 theSP->isHomogeneous()) {
1392 (*R)(row,col) = 0.0;
1393 }
1394 }
1395 */
1396
1397 return 0;
1398}
1399
1400
1401

Callers

nothing calls this directly

Calls 1

noColsMethod · 0.45

Tested by

no test coverage detected