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

Function InitialStateAnalysis

SRC/tcl/commands.cpp:8628–8669  ·  view source on GitHub ↗

added by C.McGann, U.Washington

Source from the content-addressed store, hash-verified

8626
8627// added by C.McGann, U.Washington
8628int
8629InitialStateAnalysis(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)
8630{
8631 if (argc < 2) {
8632 opserr << "WARNING: Incorrect number of arguments for InitialStateAnalysis command" << endln;
8633 return TCL_ERROR;
8634 }
8635
8636 if (strcmp(argv[1],"on") == 0) {
8637 opserr << "InitialStateAnalysis ON" << endln;
8638
8639 // set global variable to true
8640 // FMK changes for parallel:
8641 // ops_InitialStateAnalysis = true;
8642
8643 Parameter *theP = new InitialStateParameter(true);
8644 theDomain.addParameter(theP);
8645 delete theP;
8646
8647 return TCL_OK;
8648
8649 } else if (strcmp(argv[1],"off") == 0) {
8650 opserr << "InitialStateAnalysis OFF" <<endln;
8651
8652 // call revert to start to zero the displacements
8653 theDomain.revertToStart();
8654
8655 // set global variable to false
8656 // FMK changes for parallel
8657 // ops_InitialStateAnalysis = false;
8658 Parameter *theP = new InitialStateParameter(false);
8659 theDomain.addParameter(theP);
8660 delete theP;
8661
8662 return TCL_OK;
8663
8664 } else {
8665 opserr << "WARNING: Incorrect arguments - want InitialStateAnalysis on, or InitialStateAnalysis off" << endln;
8666
8667 return TCL_ERROR;
8668 }
8669}
8670
8671int
8672computeGradients(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)

Callers

nothing calls this directly

Calls 2

addParameterMethod · 0.45
revertToStartMethod · 0.45

Tested by

no test coverage detected