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

Method getMassSensitivity

SRC/domain/node/Node.cpp:1893–1920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1891// AddingSensitivity:BEGIN ///////////////////////////////////////
1892
1893Matrix
1894Node::getMassSensitivity(void)
1895{
1896 if (index == -1) {
1897 setGlobalMatrices();
1898 }
1899
1900 if (mass == 0) {
1901 theMatrices[index]->Zero();
1902 return *theMatrices[index];
1903 }
1904 else {
1905 Matrix massSens(mass->noRows(),mass->noCols());
1906 if ( (parameterID == 1) || (parameterID == 2) || (parameterID == 3) ) {
1907 massSens(parameterID-1,parameterID-1) = 1.0;
1908 }
1909 if (parameterID == 7) {
1910 massSens(0,0) = 1.0;
1911 massSens(1,1) = 1.0;
1912 }
1913 if (parameterID == 8) {
1914 massSens(0,0) = 1.0;
1915 massSens(1,1) = 1.0;
1916 massSens(2,2) = 1.0;
1917 }
1918 return massSens;
1919 }
1920}
1921
1922
1923int

Callers 5

Element.cppFile · 0.45
addM_ForceSensitivityMethod · 0.45
addM_ForceSensitivityMethod · 0.45

Calls 3

ZeroMethod · 0.45
noRowsMethod · 0.45
noColsMethod · 0.45

Tested by

no test coverage detected