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

Method eigen

SRC/analysis/analysis/StaticAnalysis.cpp:228–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226
227
228int
229StaticAnalysis::eigen(int numMode, bool generalized, bool findSmallest)
230{
231
232 if (theAnalysisModel == 0 || theEigenSOE == 0) {
233 opserr << "WARNING StaticAnalysis::eigen() - no EigenSOE has been set\n";
234 return -1;
235 }
236
237 int result = 0;
238 Domain *the_Domain = this->getDomainPtr();
239
240 // for parallel processing, want all analysis doing an eigenvalue analysis
241 result = theAnalysisModel->eigenAnalysis(numMode, generalized, findSmallest);
242
243 int stamp = the_Domain->hasDomainChanged();
244
245 if (stamp != domainStamp) {
246 domainStamp = stamp;
247
248 result = this->domainChanged();
249
250 if (result < 0) {
251 opserr << "StaticAnalysis::eigen() - domainChanged failed";
252 return -1;
253 }
254 }
255
256 //
257 // zero A and M
258 //
259
260 theEigenSOE->zeroA();
261 theEigenSOE->zeroM();
262
263 //
264 // form K
265 //
266
267 FE_EleIter &theEles = theAnalysisModel->getFEs();
268 FE_Element *elePtr;
269
270 while((elePtr = theEles()) != 0) {
271 elePtr->zeroTangent();
272 elePtr->addKtToTang(1.0);
273 if (theEigenSOE->addA(elePtr->getTangent(0), elePtr->getID()) < 0) {
274 opserr << "WARNING StaticAnalysis::eigen() -";
275 opserr << " failed in addA for ID " << elePtr->getID();
276 result = -2;
277 }
278 }
279
280
281
282 // if generalized is true, form M
283 //
284
285 if (generalized == true) {

Callers

nothing calls this directly

Calls 15

domainChangedMethod · 0.95
getIDMethod · 0.80
getDomainPtrMethod · 0.45
eigenAnalysisMethod · 0.45
hasDomainChangedMethod · 0.45
zeroAMethod · 0.45
zeroMMethod · 0.45
zeroTangentMethod · 0.45
addKtToTangMethod · 0.45
addAMethod · 0.45
getTangentMethod · 0.45
addMtoTangMethod · 0.45

Tested by

no test coverage detected