| 159 | |
| 160 | |
| 161 | int |
| 162 | TransientDomainDecompositionAnalysis::analyze(double dT) |
| 163 | { |
| 164 | int result = 0; |
| 165 | Domain *the_Domain = this->getDomainPtr(); |
| 166 | |
| 167 | // check for change in Domain since last step. As a change can |
| 168 | // occur in a commit() in a domaindecomp with load balancing |
| 169 | // this must now be inside the loop |
| 170 | |
| 171 | //opserr << "TransientDomainDecomp - hasDomainChanged\n"; |
| 172 | int stamp = the_Domain->hasDomainChanged(); |
| 173 | |
| 174 | if (stamp != domainStamp) { |
| 175 | domainStamp = stamp; |
| 176 | result = this->domainChanged(); |
| 177 | if (result < 0) { |
| 178 | opserr << "TransientDomainDecompositionAnalysis::analyze() - domainChanged failed"; |
| 179 | return -1; |
| 180 | } |
| 181 | } |
| 182 | // opserr << "TransientDomainDecomp - newStep\n"; |
| 183 | // result = theAnalysisModel->newStepDomain(); |
| 184 | if (result < 0) { |
| 185 | opserr << "TransientDomainDecompositionAnalysis::analyze() - the AnalysisModel failed"; |
| 186 | opserr << " with domain at load factor "; |
| 187 | opserr << the_Domain->getCurrentTime() << endln; |
| 188 | the_Domain->revertToLastCommit(); |
| 189 | |
| 190 | return -2; |
| 191 | } |
| 192 | |
| 193 | // opserr << "TransientDomainDecomp - integrator newStep\n"; |
| 194 | result = theIntegrator->newStep(dT); |
| 195 | |
| 196 | // barrierCheck in PartitionedDomain |
| 197 | // result = this->checkAllResult(result); |
| 198 | |
| 199 | if (result < 0) { |
| 200 | opserr << "TransientDomainDecompositionAnalysis::analyze() - the Integrator failed"; |
| 201 | opserr << " with domain at load factor "; |
| 202 | opserr << the_Domain->getCurrentTime() << endln; |
| 203 | the_Domain->revertToLastCommit(); |
| 204 | theIntegrator->revertToLastStep(); |
| 205 | return -2; |
| 206 | } |
| 207 | // opserr << "TransientDomainDecomp - solveCurrentStep\n"; |
| 208 | result = theAlgorithm->solveCurrentStep(); |
| 209 | if (result < 0) { |
| 210 | opserr << "TransientDomainDecompositionAnalysis::analyze() - the Algorithm failed"; |
| 211 | opserr << " with domain at load factor "; |
| 212 | opserr << the_Domain->getCurrentTime() << endln; |
| 213 | the_Domain->revertToLastCommit(); |
| 214 | theIntegrator->revertToLastStep(); |
| 215 | |
| 216 | return -3; |
| 217 | } |
| 218 |
no test coverage detected