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

Method commitSensitivity

SRC/element/zeroLength/ZeroLengthSection.cpp:968–989  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

966}
967
968int
969ZeroLengthSection::commitSensitivity(int gradIndex, int numGrads)
970{
971 // Get nodal displacement sensitivity
972 Vector diff(numDOF/2);
973 for (int i = 0; i < numDOF/2; i++) {
974 diff(i) = theNodes[1]->getDispSensitivity(i+1,gradIndex) - theNodes[0]->getDispSensitivity(i+1,gradIndex);
975 }
976
977 // Set some references to make the syntax nicer
978 Vector &dedh = *v;
979 const Matrix &tran = *A;
980
981 dedh.Zero();
982
983 // Compute element basic deformations ... v = A*(u2-u1)
984 for (int i = 0; i < order; i++)
985 for (int j = 0; j < numDOF/2; j++)
986 dedh(i) += -diff(j)*tran(i,j);
987
988 return theSection->commitSensitivity(dedh, gradIndex, numGrads);
989}

Callers

nothing calls this directly

Calls 2

getDispSensitivityMethod · 0.45
ZeroMethod · 0.45

Tested by

no test coverage detected