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

Method eigen

SRC/analysis/analysis/StaticDomainDecompositionAnalysis.cpp:240–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238
239
240int
241StaticDomainDecompositionAnalysis::eigen(int numMode, bool generalized, bool findSmallest)
242{
243 int result = 0;
244 Domain *the_Domain = this->getDomainPtr();
245
246 if (theEigenSOE == 0) {
247 opserr << "StaticDomainDecompositionAnalysis::eigen() - no eigen solver has been set\n";
248 return -1;
249 }
250
251 // check for change in Domain since last step. As a change can
252 // occur in a commit() in a domaindecomp with load balancing
253 // this must now be inside the loop
254
255 int stamp = the_Domain->hasDomainChanged();
256 if (stamp != domainStamp) {
257 domainStamp = stamp;
258 result = this->domainChanged();
259 if (result < 0) {
260 opserr << "StaticDomainDecompositionAnalysis::eigen() - domainChanged failed";
261 return -1;
262 }
263 }
264
265 //
266 // zero A and M
267 //
268
269 theEigenSOE->zeroA();
270 theEigenSOE->zeroM();
271
272 //
273 // form K
274 //
275
276 FE_EleIter &theEles = theAnalysisModel->getFEs();
277 FE_Element *elePtr;
278
279 while((elePtr = theEles()) != 0) {
280 elePtr->zeroTangent();
281 elePtr->addKtToTang(1.0);
282 if (theEigenSOE->addA(elePtr->getTangent(0), elePtr->getID()) < 0) {
283 opserr << "WARNING StaticAnalysis::eigen() -";
284 opserr << " failed in addA for ID " << elePtr->getID();
285 result = -2;
286 }
287 }
288
289 //
290 // if generalized is true, form M
291 //
292
293 if (generalized == true) {
294 int result = 0;
295 FE_EleIter &theEles2 = theAnalysisModel->getFEs();
296 while((elePtr = theEles2()) != 0) {
297 elePtr->zeroTangent();

Callers 1

eigenAnalysisMethod · 0.95

Calls 15

domainChangedMethod · 0.95
getIDMethod · 0.80
getDomainPtrMethod · 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
addMMethod · 0.45

Tested by

no test coverage detected