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

Method commitSensitivity

SRC/element/zeroLength/CoupledZeroLength.cpp:958–978  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

956}
957
958int
959CoupledZeroLength::commitSensitivity(int gradIndex, int numGrads)
960{
961 // Get nodal displacement sensitivity
962 Vector diff(numDOF/2);
963 for (int i = 0; i < numDOF/2; i++) {
964 diff(i) = theNodes[1]->getDispSensitivity(i+1,gradIndex) - theNodes[0]->getDispSensitivity(i+1,gradIndex);
965 }
966
967 dX = diff(dirn1);
968 dY = diff(dirn2);
969 double depsdh = sqrt(dX*dX + dY*dY);
970
971 // strain neg if to left of X+Y = 0 line
972 if (dX < 0.0 || dY < 0.0) {
973 if (dX + dY < 0.0)
974 depsdh *= -1.0;
975 }
976
977 return theMaterial->commitSensitivity(depsdh, gradIndex, numGrads);
978}

Callers

nothing calls this directly

Calls 1

getDispSensitivityMethod · 0.45

Tested by

no test coverage detected