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

Method update

SRC/analysis/integrator/DistributedDisplacementControl.cpp:176–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176int
177DistributedDisplacementControl::update(const Vector &dU)
178{
179
180 AnalysisModel *theModel = this->getAnalysisModel();
181 LinearSOE *theLinSOE = this->getLinearSOE();
182 if (theModel == 0 || theLinSOE == 0) {
183 opserr << "WARNING DistributedDisplacementControl::update() ";
184 opserr << "No AnalysisModel or LinearSOE has been set\n";
185 return -1;
186 }
187
188 (*deltaUbar) = dU; // have to do this as the SOE is gonna change
189 double dUabar = (*deltaUbar)(theDofID);
190
191 // determine dUhat
192 if (processID == 0)
193 theLinSOE->setB(*phat);
194 else
195 theLinSOE->zeroB();
196
197 theLinSOE->solve();
198 (*deltaUhat) = theLinSOE->getX();
199
200 double dUahat = (*deltaUhat)(theDofID);
201
202 if (dUahat == 0.0) {
203 opserr << "WARNING DistributedDisplacementControl::update() ";
204 opserr << "dUahat is zero -- zero reference displacement at control node DOF\n";
205 return -1;
206 }
207
208 // determine delta lambda(1) == dlambda
209 double dLambda = -dUabar/dUahat;
210
211 // determine delta U(i)
212 (*deltaU) = (*deltaUbar);
213 deltaU->addVector(1.0, *deltaUhat,dLambda);
214
215 // update dU and dlambda
216 (*deltaUstep) += *deltaU;
217 deltaLambdaStep += dLambda;
218 currentLambda += dLambda;
219
220 // update the model
221 theModel->incrDisp(*deltaU);
222
223 theModel->applyLoadDomain(currentLambda);
224 if (theModel->updateDomain() < 0) {
225 opserr << "DistributedDisplacementControl::update - model failed to update for new dU\n";
226 return -1;
227 }
228
229
230 // set the X soln in linearSOE to be deltaU for convergence Test
231 theLinSOE->setX(*deltaU);
232
233 numIncrLastStep++;

Callers

nothing calls this directly

Calls 11

getAnalysisModelMethod · 0.45
getLinearSOEMethod · 0.45
setBMethod · 0.45
zeroBMethod · 0.45
solveMethod · 0.45
getXMethod · 0.45
addVectorMethod · 0.45
incrDispMethod · 0.45
applyLoadDomainMethod · 0.45
updateDomainMethod · 0.45
setXMethod · 0.45

Tested by

no test coverage detected