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

Method applyLoadSensitivity

SRC/domain/pattern/EarthquakePattern.cpp:106–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void
107EarthquakePattern::applyLoadSensitivity(double time)
108{
109 // see if quick return, i.e. no Ground Motions or domain set
110 if (numMotions == 0)
111 return;
112
113 Domain *theDomain = this->getDomain();
114 if (theDomain == 0)
115 return;
116
117
118 // set the vel and accel vector
119 for (int i=0; i<numMotions; i++) {
120 (*uDotG)(i) = theMotions[i]->getVel(time);
121 if (parameterID != 0) { // Something is random in the motions
122 (*uDotDotG)(i) = theMotions[i]->getAccelSensitivity(time);
123 }
124 else {
125 (*uDotDotG)(i) = theMotions[i]->getAccel(time);
126 }
127 }
128
129 bool somethingRandomInMotions = false;
130 if (parameterID != 0) {
131 somethingRandomInMotions = true;
132 }
133
134
135 NodeIter &theNodes = theDomain->getNodes();
136 Node *theNode;
137 while ((theNode = theNodes()) != 0)
138 theNode->addInertiaLoadSensitivityToUnbalance(*uDotDotG, 1.0, somethingRandomInMotions);
139
140
141 ElementIter &theElements = theDomain->getElements();
142 Element *theElement;
143 while ((theElement = theElements()) != 0)
144 theElement->addInertiaLoadSensitivityToUnbalance(*uDotDotG, somethingRandomInMotions);
145}
146
147int
148EarthquakePattern::addMotion(GroundMotion &theMotion)

Callers

nothing calls this directly

Calls 7

getAccelSensitivityMethod · 0.80
getNodesMethod · 0.80
getDomainMethod · 0.45
getVelMethod · 0.45
getAccelMethod · 0.45
getElementsMethod · 0.45

Tested by

no test coverage detected