MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / analyzeStep

Method analyzeStep

SRC/analysis/analysis/DirectIntegrationAnalysis.cpp:190–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190int
191DirectIntegrationAnalysis::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

Callers 2

analyzeMethod · 0.95
analyzeSubLevelMethod · 0.95

Calls 12

domainChangedMethod · 0.95
getDomainPtrMethod · 0.45
analysisStepMethod · 0.45
getCurrentTimeMethod · 0.45
revertToLastCommitMethod · 0.45
hasDomainChangedMethod · 0.45
newStepMethod · 0.45
revertToLastStepMethod · 0.45
solveCurrentStepMethod · 0.45
computeSensitivitiesMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected