| 1924 | } |
| 1925 | |
| 1926 | int OPS_Analysis() { |
| 1927 | if (OPS_GetNumRemainingInputArgs() < 1) { |
| 1928 | opserr << "WARNING insufficient args: analysis type ...\n"; |
| 1929 | return -1; |
| 1930 | } |
| 1931 | |
| 1932 | const char* type = OPS_GetString(); |
| 1933 | bool suppressWarnings = false; |
| 1934 | if (OPS_GetNumRemainingInputArgs() > 0) { |
| 1935 | const char* opt = OPS_GetString(); |
| 1936 | if (strcmp(opt, "-noWarnings") == 0) { |
| 1937 | suppressWarnings = true; |
| 1938 | } else { |
| 1939 | OPS_ResetCurrentInputArg(-1); |
| 1940 | } |
| 1941 | } |
| 1942 | |
| 1943 | // create analysis |
| 1944 | if (strcmp(type, "Static") == 0) { |
| 1945 | if (cmds != 0) { |
| 1946 | cmds->setStaticAnalysis(suppressWarnings); |
| 1947 | } |
| 1948 | } else if (strcmp(type, "Transient") == 0) { |
| 1949 | if (cmds != 0) { |
| 1950 | cmds->setTransientAnalysis(suppressWarnings); |
| 1951 | } |
| 1952 | } else if (strcmp(type, "PFEM") == 0) { |
| 1953 | if (cmds != 0) { |
| 1954 | if (cmds->setPFEMAnalysis(suppressWarnings) < 0) { |
| 1955 | return -1; |
| 1956 | } |
| 1957 | } |
| 1958 | } else if (strcmp(type, "VariableTimeStepTransient") == 0 || |
| 1959 | (strcmp(type, "TransientWithVariableTimeStep") == |
| 1960 | 0) || |
| 1961 | (strcmp(type, "VariableTransient") == 0)) { |
| 1962 | if (cmds != 0) { |
| 1963 | cmds->setVariableAnalysis(suppressWarnings); |
| 1964 | } |
| 1965 | |
| 1966 | } else { |
| 1967 | opserr << "WARNING unknown analysis type " << type << "\n"; |
| 1968 | } |
| 1969 | |
| 1970 | return 0; |
| 1971 | } |
| 1972 | |
| 1973 | int OPS_analyze() { |
| 1974 | if (cmds == 0) return 0; |
no test coverage detected