| 71 | } |
| 72 | |
| 73 | int |
| 74 | LoadPath::newStep(void) |
| 75 | { |
| 76 | AnalysisModel *theModel = this->getAnalysisModel(); |
| 77 | if (theModel == 0) { |
| 78 | opserr << "LoadPath::newStep() - no associated AnalysisModel\n"; |
| 79 | return -1; |
| 80 | } |
| 81 | |
| 82 | if (loadPath == 0) { |
| 83 | opserr << "LoadPath::newStep() - no load path associated with object\n"; |
| 84 | return -2; |
| 85 | } |
| 86 | |
| 87 | |
| 88 | double modelLambda = theModel->getCurrentDomainTime(); |
| 89 | |
| 90 | double currentLambda; |
| 91 | if (currentStep < loadPath->Size()) { |
| 92 | |
| 93 | if (currentStep > 0) { |
| 94 | if (modelLambda == (*loadPath)(currentStep-1)) |
| 95 | currentLambda = (*loadPath)(currentStep); |
| 96 | else |
| 97 | currentLambda = (*loadPath)(currentStep-1); |
| 98 | } else |
| 99 | currentLambda = (*loadPath)(currentStep); |
| 100 | } |
| 101 | else { |
| 102 | currentLambda = 0.0; |
| 103 | opserr << "LoadPath::newStep() - reached end of specified load path"; |
| 104 | opserr << " - setting lambda = 0.0 \n"; |
| 105 | } |
| 106 | |
| 107 | currentStep++; |
| 108 | theModel->applyLoadDomain(currentLambda); |
| 109 | |
| 110 | return 0; |
| 111 | } |
| 112 | |
| 113 | int |
| 114 | LoadPath::update(const Vector &deltaU) |
nothing calls this directly
no test coverage detected