| 188 | } |
| 189 | |
| 190 | int |
| 191 | DirectIntegrationAnalysis::analyzeStep(double dT) |
| 192 | { |
| 193 | int result = 0; |
| 194 | Domain *the_Domain = this->getDomainPtr(); |
| 195 | |
| 196 | if (theAnalysisModel->analysisStep(dT) < 0) { |
| 197 | opserr << "DirectIntegrationAnalysis::analyze() - the AnalysisModel failed"; |
| 198 | opserr << " at time " << the_Domain->getCurrentTime() << endln; |
| 199 | the_Domain->revertToLastCommit(); |
| 200 | return -2; |
| 201 | } |
| 202 | |
| 203 | // check if domain has undergone change |
| 204 | int stamp = the_Domain->hasDomainChanged(); |
| 205 | if (stamp != domainStamp) { |
| 206 | domainStamp = stamp; |
| 207 | if (this->domainChanged() < 0) { |
| 208 | opserr << "DirectIntegrationAnalysis::analyze() - domainChanged() failed\n"; |
| 209 | return -1; |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | if (theIntegrator->newStep(dT) < 0) { |
| 214 | opserr << "DirectIntegrationAnalysis::analyze() - the Integrator failed"; |
| 215 | opserr << " at time " << the_Domain->getCurrentTime() << endln; |
| 216 | the_Domain->revertToLastCommit(); |
| 217 | theIntegrator->revertToLastStep(); |
| 218 | return -2; |
| 219 | } |
| 220 | |
| 221 | result = theAlgorithm->solveCurrentStep(); |
| 222 | if (result < 0) { |
| 223 | opserr << "DirectIntegrationAnalysis::analyze() - the Algorithm failed"; |
| 224 | opserr << " at time " << the_Domain->getCurrentTime() << endln; |
| 225 | the_Domain->revertToLastCommit(); |
| 226 | theIntegrator->revertToLastStep(); |
| 227 | return -3; |
| 228 | } |
| 229 | |
| 230 | // AddingSensitivity:BEGIN //////////////////////////////////// |
| 231 | #ifdef _RELIABILITY |
| 232 | |
| 233 | if (theIntegrator->shouldComputeAtEachStep()) { |
| 234 | |
| 235 | result = theIntegrator->computeSensitivities(); |
| 236 | if (result < 0) { |
| 237 | opserr << "DirectIntegrationAnalysis::analyze() - the SensitivityAlgorithm failed"; |
| 238 | opserr << " at time "; |
| 239 | opserr << the_Domain->getCurrentTime() << endln; |
| 240 | the_Domain->revertToLastCommit(); |
| 241 | theIntegrator->revertToLastStep(); |
| 242 | return -5; |
| 243 | } |
| 244 | } |
| 245 | #endif |
| 246 | // AddingSensitivity:END ////////////////////////////////////// |
| 247 |
no test coverage detected