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

Method newStep

SRC/analysis/integrator/DisplacementControl.cpp:191–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191 int
192DisplacementControl::newStep(void)
193{
194
195 if (theDofID == -1) {
196 opserr << "DisplacementControl::newStep() - dof is fixed or constrained (or domainChanged has not been called!)\n";
197 return -1;
198 }
199
200 // get pointers to AnalysisModel and LinearSOE
201 AnalysisModel *theModel = this->getAnalysisModel();
202 LinearSOE *theLinSOE = this->getLinearSOE();
203 if (theModel == 0 || theLinSOE == 0) {
204 opserr << "WARNING DisplacementControl::newStep() ";
205 opserr << "No AnalysisModel or LinearSOE has been set\n";
206 return -1;
207 }
208
209 if (theDomain == 0)
210 theDomain = theModel->getDomainPtr();
211
212 // determine increment for this iteration
213 double factor = double(specNumIncrStep)/numIncrLastStep;
214 theIncrement *=factor;
215
216 if (theIncrement < minIncrement)
217 theIncrement = minIncrement;
218 else if (theIncrement > maxIncrement)
219 theIncrement = maxIncrement;
220
221
222 // get the current load factor
223 currentLambda = theModel->getCurrentDomainTime();
224
225 // determine dUhat
226 this->formTangent(tangFlag);
227 theLinSOE->setB(*phat);
228 if (theLinSOE->solve() < 0) {
229 opserr << "DisplacementControl::newStep(void) - failed in solver\n";
230 return -1;
231 }
232
233 (*deltaUhat) = theLinSOE->getX();
234 Vector &dUhat = *deltaUhat;// this is the Uft in the nonlinear lecture notes
235 double dUahat = dUhat(theDofID);// this is the component of the Uft in our nonlinear lecture notes
236
237 if (dUahat == 0.0) {
238 opserr << "WARNING DisplacementControl::newStep() ";
239 opserr << "dUahat is zero -- zero reference displacement at control node DOF\n";
240 return -1;
241 }
242
243 // determine delta lambda(1) == dlambda
244 double dlambda = theIncrement/dUahat; // this is the dlambda of the 1st step
245
246 // calldLambda1dh=theIncrement;
247 deltaLambdaStep = dlambda;
248 currentLambda += dlambda;

Callers

nothing calls this directly

Calls 15

formdLambdaDhMethod · 0.95
getParametersMethod · 0.80
getAnalysisModelMethod · 0.45
getLinearSOEMethod · 0.45
getDomainPtrMethod · 0.45
getCurrentDomainTimeMethod · 0.45
formTangentMethod · 0.45
setBMethod · 0.45
solveMethod · 0.45
getXMethod · 0.45
activateSensitivityMethod · 0.45

Tested by

no test coverage detected