| 104 | } |
| 105 | |
| 106 | void |
| 107 | EarthquakePattern::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 | |
| 147 | int |
| 148 | EarthquakePattern::addMotion(GroundMotion &theMotion) |
nothing calls this directly
no test coverage detected