| 70 | |
| 71 | |
| 72 | void |
| 73 | EarthquakePattern::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 | |
| 106 | void |
| 107 | EarthquakePattern::applyLoadSensitivity(double time) |
nothing calls this directly
no test coverage detected