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

Method analyze

SRC/analysis/analysis/StaticAnalysis.cpp:126–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124
125
126int
127StaticAnalysis::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;

Callers

nothing calls this directly

Calls 13

domainChangedMethod · 0.95
flushRecordersMethod · 0.80
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

Tested by

no test coverage detected