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

Function OPS_DomainModalProperties

SRC/domain/domain/DomainModalProperties.cpp:370–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370int
371OPS_DomainModalProperties(void)
372{
373 // modalProperties <-print> <-file $fileName> <-unorm>
374
375 // some kudos
376 static bool first_done = false;
377 if (!first_done) {
378 opserr << "Using DomainModalProperties - Developed by: Massimo Petracca, Guido Camata, ASDEA Software Technology\n";
379 first_done = true;
380 }
381
382 // get analysis model
383 AnalysisModel* theAnalysisModel = *OPS_GetAnalysisModel();
384 if (theAnalysisModel == nullptr) {
385 opserr << "modalProperties Error: no AnalysisModel available.\n";
386 return -1;
387 }
388
389 // init default values
390 bool unorm = false; // by default do not displacement-normalize eigenvectors
391 bool print_on_console = false; // by default do not print on console
392 bool print_on_file = false; // by default do no print on file
393 bool print_to_dict = false;
394 std::string fname;
395
396 // check options
397 int numArgs = OPS_GetNumRemainingInputArgs();
398 int loc = 0;
399 while (loc < numArgs) {
400 const char* iarg = OPS_GetString();
401 if (strcmp(iarg, "-unorm") == 0) {
402 unorm = true;
403 }
404 else if (strcmp(iarg, "-print") == 0) {
405 print_on_console = true;
406 }
407 else if (strcmp(iarg, "-return") == 0) {
408 print_to_dict = true;
409 }
410 else if (strcmp(iarg, "-file") == 0) {
411 print_on_file = true;
412 if (loc < numArgs - 1) {
413 ++loc;
414 fname = OPS_GetString();
415 }
416 else {
417 opserr << "Error in modalProperties <-print> <-file $fileName> <-unorm>.\n"
418 "After the keyword -file you should specify the file name.\n";
419 exit(-1);
420 }
421 }
422 ++loc;
423 }
424
425 // create the modal properties, compute them,
426 // and add them to the domain
427 DomainModalProperties modal_props(unorm);

Callers 2

Py_ops_modalPropertiesFunction · 0.85
modalPropertiesFunction · 0.85

Calls 9

exitFunction · 0.85
setModalPropertiesMethod · 0.80
printDictMethod · 0.80
OPS_GetAnalysisModelFunction · 0.50
OPS_GetStringFunction · 0.50
computeMethod · 0.45
getDomainPtrMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected