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

Method newStep

SRC/analysis/integrator/ExplicitDifference.cpp:75–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73
74
75int ExplicitDifference::newStep(double _deltaT)
76{
77 updateCount = 0;
78
79 deltaT = _deltaT;
80
81 if (deltaT <= 0.0) {
82 opserr << "ExplicitDifference::newStep() - error in variable\n";
83 opserr << "dT = " << deltaT << endln;
84 return -1;
85 }
86
87 // get a pointer to the AnalysisModel
88 AnalysisModel *theModel = this->getAnalysisModel();
89
90 //calculate vel at t+0.5deltaT and U at t+delatT
91 Utdot->addVector(1.0, *Utdotdot, deltaT);
92 Ut->addVector(1.0, *Utdot, deltaT);
93
94 int size = Utdotdot->Size();
95
96 if (Ut == 0) {
97 opserr << "ExplicitDifference::newStep() - domainChange() failed or hasn't been called\n";
98 return -2;
99 }
100
101 // for leap-frog method Ma=f-ku-cv, on the right side there is no Ma
102 (*Utdotdot) *= 0;
103
104 // set the garbage response quantities for the nodes
105 theModel->setVel(*Utdot);
106 theModel->setAccel(*Utdotdot);
107 theModel->setDisp(*Ut);
108
109 // increment the time to t and apply the load
110 double time = theModel->getCurrentDomainTime();
111 time += deltaT;
112 if (theModel->updateDomain(time, deltaT) < 0) {
113 opserr << "ExplicitDifference::newStep() - failed to update the domain\n";
114 return -3;
115 }
116
117 // set response at t to be that at t+deltaT of previous step
118 (*Utdotdot) = (*Utdotdot1);
119
120 return 0;
121}
122
123
124int ExplicitDifference::formEleTangent(FE_Element *theEle)

Callers

nothing calls this directly

Calls 8

getAnalysisModelMethod · 0.45
addVectorMethod · 0.45
SizeMethod · 0.45
setVelMethod · 0.45
setAccelMethod · 0.45
setDispMethod · 0.45
getCurrentDomainTimeMethod · 0.45
updateDomainMethod · 0.45

Tested by

no test coverage detected