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

Method formTangent

SRC/analysis/integrator/KRAlphaExplicit.cpp:287–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285
286
287int KRAlphaExplicit::formTangent(int statFlag)
288{
289 statusFlag = statFlag;
290
291 // only update tangent if domain has changed
292 if (initAlphaMatrices) {
293 LinearSOE *theLinSOE = this->getLinearSOE();
294 AnalysisModel *theModel = this->getAnalysisModel();
295 if (theLinSOE == 0 || theModel == 0) {
296 opserr << "WARNING KRAlphaExplicit::formTangent() - ";
297 opserr << "no LinearSOE or AnalysisModel has been set\n";
298 return -1;
299 }
300
301 theLinSOE->zeroA();
302
303 int size = theLinSOE->getNumEqn();
304 ID id(size);
305 for (int i=1; i<size; i++) {
306 id(i) = id(i-1) + 1;
307 }
308 if (theLinSOE->addA(*Mhat, id) < 0) {
309 opserr << "WARNING KRAlphaExplicit::formTangent() - ";
310 opserr << "failed to add Mhat to A\n";
311 return -2;
312 }
313 }
314 return 0;
315}
316
317
318int KRAlphaExplicit::formEleTangent(FE_Element *theEle)

Callers

nothing calls this directly

Calls 5

getLinearSOEMethod · 0.45
getAnalysisModelMethod · 0.45
zeroAMethod · 0.45
getNumEqnMethod · 0.45
addAMethod · 0.45

Tested by

no test coverage detected