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

Function eigenAnalysis

SRC/runtime/commands/analysis/analysis.cpp:249–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247
248
249static int
250eigenAnalysis(ClientData clientData, Tcl_Interp *interp, Tcl_Size argc,
251 TCL_Char ** const argv)
252{
253
254 BasicAnalysisBuilder *builder = (BasicAnalysisBuilder*)clientData;
255
256 Domain *domain = builder->getDomain();
257
258
259 // make sure at least one other argument to contain type of system
260 if (argc < 2) {
261 opserr << OpenSees::PromptValueError << "eigen <type> numModes?\n";
262 return TCL_ERROR;
263 }
264
265 bool generalizedAlgo = true;
266 // 0 - frequency/generalized (default),
267 // 1 - standard,
268 // 2 - buckling
269 int typeSolver = EigenSOE_TAGS_ArpackSOE;
270 int loc = 1;
271 double shift = 0.0;
272 bool findSmallest = true;
273 int numEigen = 0;
274
275 // Check type of eigenvalue analysis
276 while (loc < (argc - 1)) {
277 if ((strcmp(argv[loc], "frequency") == 0) ||
278 (strcmp(argv[loc], "-frequency") == 0) ||
279 (strcmp(argv[loc], "generalized") == 0) ||
280 (strcmp(argv[loc], "-generalized") == 0))
281 generalizedAlgo = true;
282
283 else if ((strcmp(argv[loc], "standard") == 0) ||
284 (strcmp(argv[loc], "-standard") == 0)) {
285 generalizedAlgo = false;
286 typeSolver = EigenSOE_TAGS_SymBandEigenSOE;
287 }
288
289 else if ((strcmp(argv[loc], "-findLargest") == 0))
290 findSmallest = false;
291
292 else if ((strcmp(argv[loc], "genBandArpack") == 0) ||
293 (strcmp(argv[loc], "-genBandArpack") == 0) ||
294 (strcmp(argv[loc], "genBandArpackEigen") == 0) ||
295 (strcmp(argv[loc], "-genBandArpackEigen") == 0))
296 typeSolver = EigenSOE_TAGS_ArpackSOE;
297
298 else if ((strcmp(argv[loc], "symmBandLapack") == 0) ||
299 (strcmp(argv[loc], "-symmBandLapack") == 0) ||
300 (strcmp(argv[loc], "symmBandLapackEigen") == 0) ||
301 (strcmp(argv[loc], "-symmBandLapackEigen") == 0))
302 typeSolver = EigenSOE_TAGS_SymBandEigenSOE;
303
304 else if ((strcmp(argv[loc], "fullGenLapack") == 0) ||
305 (strcmp(argv[loc], "-fullGenLapack") == 0) ||
306 (strcmp(argv[loc], "fullGenLapackEigen") == 0) ||

Callers

nothing calls this directly

Calls 3

getDomainMethod · 0.45
newEigenAnalysisMethod · 0.45
eigenMethod · 0.45

Tested by

no test coverage detected