Skip to content

Commit

Permalink
Display the warning for the fullGenLapackEigen only once
Browse files Browse the repository at this point in the history
  • Loading branch information
sewkokot committed May 29, 2022
1 parent 0034ee0 commit 4e38e98
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion SRC/interpreter/OpenSeesCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1788,6 +1788,8 @@ int OPS_analyze()

int OPS_eigenAnalysis()
{
static bool warning_displayed = false;

// make sure at least one other argument to contain type of system
if (OPS_GetNumRemainingInputArgs() < 1) {
opserr << "WARNING want - eigen <type> numModes?\n";
Expand Down Expand Up @@ -1836,7 +1838,10 @@ int OPS_eigenAnalysis()
(strcmp(type, "-fullGenLapack") == 0) ||
(strcmp(type, "fullGenLapackEigen") == 0) ||
(strcmp(type, "-fullGenLapackEigen") == 0)) {
opserr << "WARNING - the 'fullGenLapack' eigen solver is VERY SLOW. Consider using the default eigen solver.";
if (!warning_displayed) {
opserr << "WARNING - the 'fullGenLapack' eigen solver is VERY SLOW. Consider using the default eigen solver.";
warning_displayed = true;
}
typeSolver = EigenSOE_TAGS_FullGenEigenSOE;
}

Expand Down

0 comments on commit 4e38e98

Please sign in to comment.