command invoked to build the model, i.e. to invoke analyze() on the Analysis object
| 1929 | // on the Analysis object |
| 1930 | // |
| 1931 | int |
| 1932 | analyzeModel(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv) |
| 1933 | { |
| 1934 | int result = 0; |
| 1935 | |
| 1936 | #ifdef _PARALLEL_PROCESSING |
| 1937 | if (OPS_PARTITIONED == false && OPS_NUM_SUBDOMAINS > 1) { |
| 1938 | if (partitionModel(0) < 0) { |
| 1939 | opserr << "WARNING before analysis; partition failed - too few elements\n"; |
| 1940 | OpenSeesExit(clientData, interp, argc, argv); |
| 1941 | return TCL_ERROR; |
| 1942 | } |
| 1943 | } |
| 1944 | #endif |
| 1945 | |
| 1946 | if (theStaticAnalysis != 0) { |
| 1947 | if (argc < 2) { |
| 1948 | opserr << "WARNING static analysis: analysis numIncr? <-noFlush>\n"; |
| 1949 | return TCL_ERROR; |
| 1950 | } |
| 1951 | int numIncr; |
| 1952 | |
| 1953 | if (Tcl_GetInt(interp, argv[1], &numIncr) != TCL_OK) |
| 1954 | return TCL_ERROR; |
| 1955 | |
| 1956 | bool flush = true; |
| 1957 | if (argc > 2) { |
| 1958 | if (strcmp(argv[2], "-noFlush") == 0) { |
| 1959 | flush = false; |
| 1960 | } |
| 1961 | } |
| 1962 | |
| 1963 | result = theStaticAnalysis->analyze(numIncr, flush); |
| 1964 | } else if(thePFEMAnalysis != 0) { |
| 1965 | bool flush = true; |
| 1966 | if (argc > 1) { |
| 1967 | if (strcmp(argv[1], "-noFlush") == 0) { |
| 1968 | flush = false; |
| 1969 | } |
| 1970 | } |
| 1971 | result = thePFEMAnalysis->analyze(flush); |
| 1972 | } else if (theTransientAnalysis != 0) { |
| 1973 | if (argc < 3) { |
| 1974 | opserr << "WARNING transient analysis: analysis numIncr? deltaT? <-noFlush>\n"; |
| 1975 | return TCL_ERROR; |
| 1976 | } |
| 1977 | int numIncr; |
| 1978 | if (Tcl_GetInt(interp, argv[1], &numIncr) != TCL_OK) |
| 1979 | return TCL_ERROR; |
| 1980 | double dT; |
| 1981 | if (Tcl_GetDouble(interp, argv[2], &dT) != TCL_OK) |
| 1982 | return TCL_ERROR; |
| 1983 | |
| 1984 | // Set global timestep variable |
| 1985 | ops_Dt = dT; |
| 1986 | |
| 1987 | bool flush = true; |
| 1988 | if (argc == 4) { |
nothing calls this directly
no test coverage detected