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

Method newStep

SRC/analysis/integrator/DistributedDisplacementControl.cpp:103–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103int
104DistributedDisplacementControl::newStep(void)
105{
106 // get pointers to AnalysisModel and LinearSOE
107 AnalysisModel *theModel = this->getAnalysisModel();
108 LinearSOE *theLinSOE = this->getLinearSOE();
109 if (theModel == 0 || theLinSOE == 0) {
110 opserr << "WARNING DistributedDisplacementControl::newStep() ";
111 opserr << "No AnalysisModel or LinearSOE has been set\n";
112 return -1;
113 }
114
115
116 // determine increment for this iteration
117 double factor = specNumIncrStep/numIncrLastStep;
118 theIncrement *=factor;
119
120 if (theIncrement < minIncrement)
121 theIncrement = minIncrement;
122 else if (theIncrement > maxIncrement)
123 theIncrement = maxIncrement;
124
125 // get the current load factor
126 currentLambda = theModel->getCurrentDomainTime();
127
128 // determine dUhat
129 this->formTangent();
130
131
132
133 if (processID == 0)
134 theLinSOE->setB(*phat);
135 else
136 theLinSOE->zeroB();
137
138 theLinSOE->solve();
139 (*deltaUhat) = theLinSOE->getX();
140 Vector &dUhat = *deltaUhat;
141
142 double dUahat = dUhat(theDofID);
143 if (dUahat == 0.0) {
144 opserr << "WARNING DistributedDisplacementControl::newStep() ";
145 opserr << "dUahat is zero -- zero reference displacement at control node DOF\n";
146 return -1;
147 }
148
149
150 // determine delta lambda(1) == dlambda
151 double dLambda = theIncrement/dUahat;
152
153 deltaLambdaStep = dLambda;
154 currentLambda += dLambda;
155 // opserr << "DistributedDisplacementControl:newStep " << dUahat << " " << theDofID << endln;
156 //opserr << "DistributedDisplacementControl:newStep " << *phat << endln;
157 // opserr << "DistributedDisplacementControl::newStep() : " << deltaLambdaStep << endln;
158 // determine delta U(1) == dU
159 (*deltaU) = dUhat;
160 (*deltaU) *= dLambda;

Callers

nothing calls this directly

Calls 11

getAnalysisModelMethod · 0.45
getLinearSOEMethod · 0.45
getCurrentDomainTimeMethod · 0.45
formTangentMethod · 0.45
setBMethod · 0.45
zeroBMethod · 0.45
solveMethod · 0.45
getXMethod · 0.45
incrDispMethod · 0.45
applyLoadDomainMethod · 0.45
updateDomainMethod · 0.45

Tested by

no test coverage detected