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

Method newStep

SRC/analysis/integrator/HHTHSFixedNumIter.cpp:169–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167
168
169int HHTHSFixedNumIter::newStep(double _deltaT)
170{
171 deltaT = _deltaT;
172 if (beta == 0 || gamma == 0 ) {
173 opserr << "HHTHSFixedNumIter::newStep() - error in variable\n";
174 opserr << "gamma = " << gamma << " beta = " << beta << endln;
175 return -1;
176 }
177
178 if (deltaT <= 0.0) {
179 opserr << "HHTHSFixedNumIter::newStep() - error in variable\n";
180 opserr << "dT = " << deltaT << endln;
181 return -2;
182 }
183
184 // get a pointer to the AnalysisModel
185 AnalysisModel *theModel = this->getAnalysisModel();
186
187 // set the constants
188 c1 = 1.0;
189 c2 = gamma/(beta*deltaT);
190 c3 = 1.0/(beta*deltaT*deltaT);
191
192 if (U == 0) {
193 opserr << "HHTHSFixedNumIter::newStep() - domainChange() failed or hasn't been called\n";
194 return -3;
195 }
196
197 // set response at t to be that at t+deltaT of previous step
198 (*Utm2) = *Utm1;
199 (*Utm1) = *Ut;
200 (*Ut) = *U;
201 (*Utdot) = *Udot;
202 (*Utdotdot) = *Udotdot;
203
204 // determine new velocities and accelerations at t+deltaT
205 double a1 = (1.0 - gamma/beta);
206 double a2 = deltaT*(1.0 - 0.5*gamma/beta);
207 Udot->addVector(a1, *Utdotdot, a2);
208
209 double a3 = -1.0/(beta*deltaT);
210 double a4 = 1.0 - 0.5/beta;
211 Udotdot->addVector(a4, *Utdot, a3);
212
213 // determine the velocities and accelerations at t+alpha*deltaT
214 (*Ualphadot) = *Utdot;
215 Ualphadot->addVector((1.0-alphaF), *Udot, alphaF);
216
217 (*Ualphadotdot) = *Utdotdot;
218 Ualphadotdot->addVector((1.0-alphaI), *Udotdot, alphaI);
219
220 // set the trial response quantities
221 theModel->setVel(*Ualphadot);
222 theModel->setAccel(*Ualphadotdot);
223
224 // increment the time to t+alpha*deltaT and apply the load
225 double time = theModel->getCurrentDomainTime();
226 time += alphaF*deltaT;

Callers

nothing calls this directly

Calls 6

getAnalysisModelMethod · 0.45
addVectorMethod · 0.45
setVelMethod · 0.45
setAccelMethod · 0.45
getCurrentDomainTimeMethod · 0.45
applyLoadDomainMethod · 0.45

Tested by

no test coverage detected