| 327 | } |
| 328 | |
| 329 | double |
| 330 | GroundMotion::getAccelSensitivity(double time) |
| 331 | { |
| 332 | if (time < 0.0) |
| 333 | return 0.0; |
| 334 | |
| 335 | if (theAccelSeries != 0) |
| 336 | return fact*(theAccelSeries->getFactorSensitivity(time)); |
| 337 | |
| 338 | // if theVel is not 0, differentiate vel series to get accel series |
| 339 | else if (theVelSeries != 0) { |
| 340 | theAccelSeries = this->differentiate(theVelSeries, delta); |
| 341 | if (theAccelSeries != 0) |
| 342 | return fact*(theAccelSeries->getFactorSensitivity(time)); |
| 343 | else |
| 344 | return 0.0; |
| 345 | } |
| 346 | |
| 347 | // if theDisp is not 0, differentiate vel series to get accel series |
| 348 | else if (theDispSeries != 0) { |
| 349 | theVelSeries = this->differentiate(theDispSeries, delta); |
| 350 | if (theVelSeries != 0) { |
| 351 | theAccelSeries = this->differentiate(theVelSeries, delta); |
| 352 | if (theAccelSeries != 0) |
| 353 | return fact*(theAccelSeries->getFactorSensitivity(time)); |
| 354 | else |
| 355 | return 0.0; |
| 356 | } else |
| 357 | return 0.0; |
| 358 | } |
| 359 | |
| 360 | return 0.0; |
| 361 | } |
| 362 | |
| 363 | double |
| 364 | GroundMotion::getVel(double time) |
no test coverage detected