| 124 | |
| 125 | |
| 126 | int |
| 127 | StaticAnalysis::analyze(int numSteps, bool flush) |
| 128 | { |
| 129 | int result = 0; |
| 130 | Domain *the_Domain = this->getDomainPtr(); |
| 131 | |
| 132 | for (int i=0; i<numSteps; i++) { |
| 133 | |
| 134 | result = theAnalysisModel->analysisStep(); |
| 135 | |
| 136 | if (result < 0) { |
| 137 | opserr << "StaticAnalysis::analyze() - the AnalysisModel failed"; |
| 138 | opserr << " at step: " << i << " with domain at load factor "; |
| 139 | opserr << the_Domain->getCurrentTime() << endln; |
| 140 | the_Domain->revertToLastCommit(); |
| 141 | return -2; |
| 142 | } |
| 143 | |
| 144 | // check for change in Domain since last step. As a change can |
| 145 | // occur in a commit() in a domaindecomp with load balancing |
| 146 | // this must now be inside the loop |
| 147 | |
| 148 | int stamp = the_Domain->hasDomainChanged(); |
| 149 | |
| 150 | |
| 151 | if (stamp != domainStamp) { |
| 152 | domainStamp = stamp; |
| 153 | |
| 154 | result = this->domainChanged(); |
| 155 | |
| 156 | if (result < 0) { |
| 157 | opserr << "StaticAnalysis::analyze() - domainChanged failed"; |
| 158 | opserr << " at step " << i << " of " << numSteps << endln; |
| 159 | return -1; |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | result = theIntegrator->newStep(); |
| 164 | if (result < 0) { |
| 165 | opserr << "StaticAnalysis::analyze() - the Integrator failed"; |
| 166 | opserr << " at step: " << i << " with domain at load factor "; |
| 167 | opserr << the_Domain->getCurrentTime() << endln; |
| 168 | the_Domain->revertToLastCommit(); |
| 169 | theIntegrator->revertToLastStep(); |
| 170 | |
| 171 | |
| 172 | return -2; |
| 173 | } |
| 174 | |
| 175 | result = theAlgorithm->solveCurrentStep(); |
| 176 | if (result < 0) { |
| 177 | opserr << "StaticAnalysis::analyze() - the Algorithm failed"; |
| 178 | opserr << " at step: " << i << " with domain at load factor "; |
| 179 | opserr << the_Domain->getCurrentTime() << endln; |
| 180 | the_Domain->revertToLastCommit(); |
| 181 | theIntegrator->revertToLastStep(); |
| 182 | |
| 183 | return -3; |
nothing calls this directly
no test coverage detected