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

Method domainChanged

SRC/analysis/integrator/KRAlphaExplicit.cpp:345–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343
344
345int KRAlphaExplicit::domainChanged()
346{
347 AnalysisModel *theModel = this->getAnalysisModel();
348 LinearSOE *theLinSOE = this->getLinearSOE();
349 const Vector &x = theLinSOE->getX();
350 int size = x.Size();
351
352 // create the new Matrix and Vector objects
353 if (Ut == 0 || Ut->Size() != size) {
354
355 // delete the old
356 if (alpha1 != 0)
357 delete alpha1;
358 if (alpha3 != 0)
359 delete alpha3;
360 if (Mhat != 0)
361 delete Mhat;
362 if (Ut != 0)
363 delete Ut;
364 if (Utdot != 0)
365 delete Utdot;
366 if (Utdotdot != 0)
367 delete Utdotdot;
368 if (U != 0)
369 delete U;
370 if (Udot != 0)
371 delete Udot;
372 if (Udotdot != 0)
373 delete Udotdot;
374 if (Ualpha != 0)
375 delete Ualpha;
376 if (Ualphadot != 0)
377 delete Ualphadot;
378 if (Ualphadotdot != 0)
379 delete Ualphadotdot;
380 if (Utdothat != 0)
381 delete Utdothat;
382
383 // create the new
384 alpha1 = new Matrix(size,size);
385 alpha3 = new Matrix(size,size);
386 Mhat = new Matrix(size,size);
387 Ut = new Vector(size);
388 Utdot = new Vector(size);
389 Utdotdot = new Vector(size);
390 U = new Vector(size);
391 Udot = new Vector(size);
392 Udotdot = new Vector(size);
393 Ualpha = new Vector(size);
394 Ualphadot = new Vector(size);
395 Ualphadotdot = new Vector(size);
396 Utdothat = new Vector(size);
397
398 // check we obtained the new
399 if (alpha1 == 0 || alpha1->noRows() != size || alpha1->noCols() != size ||
400 alpha3 == 0 || alpha3->noRows() != size || alpha3->noCols() != size ||
401 Mhat == 0 || Mhat->noRows() != size || Mhat->noCols() != size ||
402 Ut == 0 || Ut->Size() != size ||

Callers

nothing calls this directly

Calls 7

getIDMethod · 0.80
getAnalysisModelMethod · 0.45
getLinearSOEMethod · 0.45
getXMethod · 0.45
SizeMethod · 0.45
noRowsMethod · 0.45
noColsMethod · 0.45

Tested by

no test coverage detected