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

Method applyLoad

SRC/domain/pattern/EarthquakePattern.cpp:72–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70
71
72void
73EarthquakePattern::applyLoad(double time)
74{
75 // see if quick return, i.e. no Ground Motions or domain set
76 if (numMotions == 0)
77 return;
78
79 // check if setLoadConstant() has been called
80 if (isConstant != 0)
81 currentTime = time;
82
83 Domain *theDomain = this->getDomain();
84 if (theDomain == 0)
85 return;
86
87
88 // set the vel and accel vector
89 for (int i=0; i<numMotions; i++) {
90 // (*uDotG)(i) = theMotions[i]->getVel(currentTime);
91 (*uDotDotG)(i) = theMotions[i]->getAccel(currentTime);
92 }
93
94 NodeIter &theNodes = theDomain->getNodes();
95 Node *theNode;
96 while ((theNode = theNodes()) != 0)
97 theNode->addInertiaLoadToUnbalance(*uDotDotG, 1.0);
98
99
100 ElementIter &theElements = theDomain->getElements();
101 Element *theElement;
102 while ((theElement = theElements()) != 0)
103 theElement->addInertiaLoadToUnbalance(*uDotDotG);
104}
105
106void
107EarthquakePattern::applyLoadSensitivity(double time)

Callers

nothing calls this directly

Calls 5

getNodesMethod · 0.80
getDomainMethod · 0.45
getAccelMethod · 0.45
getElementsMethod · 0.45

Tested by

no test coverage detected