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

Method newStep

SRC/analysis/integrator/HHTGeneralized_TP.cpp:135–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133
134
135int HHTGeneralized_TP::newStep(double _deltaT)
136{
137 if (beta == 0 || gamma == 0 ) {
138 opserr << "HHTGeneralized_TP::newStep() - error in variable\n";
139 opserr << "gamma = " << gamma << " beta = " << beta << endln;
140 return -1;
141 }
142
143 deltaT = _deltaT;
144 if (deltaT <= 0.0) {
145 opserr << "HHTGeneralized_TP::newStep() - error in variable\n";
146 opserr << "dT = " << deltaT << endln;
147 return -2;
148 }
149
150 // get a pointer to the LinearSOE and the AnalysisModel
151 LinearSOE *theLinSOE = this->getLinearSOE();
152 AnalysisModel *theModel = this->getAnalysisModel();
153 if (theLinSOE == 0 || theModel == 0) {
154 opserr << "WARNING HHT_TP::newStep() - ";
155 opserr << "no LinearSOE or AnalysisModel has been set\n";
156 return -3;
157 }
158
159 // set the constants
160 c1 = 1.0;
161 c2 = gamma/(beta*deltaT);
162 c3 = 1.0/(beta*deltaT*deltaT);
163
164 if (U == 0) {
165 opserr << "HHTGeneralized_TP::newStep() - domainChange() failed or hasn't been called\n";
166 return -4;
167 }
168
169 // set weighting factors for subsequent iterations
170 alphaM = alphaI;
171 alphaD = alphaR = alphaP = alphaF;
172
173 // determine new velocities and accelerations at t+deltaT
174 double a1 = (1.0 - gamma/beta);
175 double a2 = deltaT*(1.0 - 0.5*gamma/beta);
176 Udot->addVector(a1, *Utdotdot, a2);
177
178 double a3 = -1.0/(beta*deltaT);
179 double a4 = 1.0 - 0.5/beta;
180 Udotdot->addVector(a4, *Utdot, a3);
181
182 // set the trial response quantities
183 theModel->setVel(*Udot);
184 theModel->setAccel(*Udotdot);
185
186 // increment the time to t+deltaT and apply the load
187 double time = theModel->getCurrentDomainTime();
188 time += deltaT;
189 if (theModel->updateDomain(time, deltaT) < 0) {
190 opserr << "HHTGeneralized_TP::newStep() - failed to update the domain\n";
191 return -5;
192 }

Callers

nothing calls this directly

Calls 7

getLinearSOEMethod · 0.45
getAnalysisModelMethod · 0.45
addVectorMethod · 0.45
setVelMethod · 0.45
setAccelMethod · 0.45
getCurrentDomainTimeMethod · 0.45
updateDomainMethod · 0.45

Tested by

no test coverage detected