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

Method solveCurrentStep

SRC/analysis/algorithm/equiSolnAlgo/Linear.cpp:91–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89// Performs the linear solution algorithm.
90
91int
92Linear::solveCurrentStep(void)
93{
94 // set up some pointers and check they are valid
95 // NOTE this could be taken away if we set Ptrs as protecetd in superclass
96
97 AnalysisModel *theAnalysisModel = this->getAnalysisModelPtr();
98 LinearSOE *theSOE = this->getLinearSOEptr();
99 IncrementalIntegrator *theIncIntegrator =
100 this->getIncrementalIntegratorPtr();
101
102 if ((theAnalysisModel == 0) || (theIncIntegrator ==0 ) || (theSOE == 0)){
103 opserr << "WARNING Linear::solveCurrentStep() -";
104 opserr << "setLinks() has not been called.\n";
105 return -5;
106 }
107
108 if (factorOnce != 2) {
109 if (theIncIntegrator->formTangent(incrTangent) < 0) {
110 opserr << "WARNING Linear::solveCurrentStep() -";
111 opserr << "the Integrator failed in formTangent()\n";
112 return -1;
113 }
114 if (factorOnce == 1)
115 factorOnce = 2;
116 }
117
118
119 if (theIncIntegrator->formUnbalance() < 0) {
120 opserr << "WARNING Linear::solveCurrentStep() -";
121 opserr << "the Integrator failed in formUnbalance()\n";
122 return -2;
123 }
124
125 if (theSOE->solve() < 0) {
126 opserr << "WARNING Linear::solveCurrentStep() -";
127 opserr << "the LinearSOE failed in solve()\n";
128 return -3;
129 }
130
131 const Vector &deltaU = theSOE->getX();
132
133 if (theIncIntegrator->update(deltaU) < 0) {
134 opserr << "WARNING Linear::solveCurrentStep() -";
135 opserr << "the Integrator failed in update()\n";
136 return -4;
137 }
138
139 return 0;
140}
141
142int
143Linear::setConvergenceTest(ConvergenceTest *theNewTest)

Callers

nothing calls this directly

Calls 8

getLinearSOEptrMethod · 0.80
getAnalysisModelPtrMethod · 0.45
formTangentMethod · 0.45
formUnbalanceMethod · 0.45
solveMethod · 0.45
getXMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected