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

Function save

SRC/database/TclDatabaseCommands.cpp:181–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181int
182save(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)
183{
184
185 if (theDatabase == 0) {
186 opserr << "WARNING: save - no database has been constructed\n";
187 return TCL_OK;
188 }
189
190 // make sure at least one other argument to contain type of system
191 if (argc < 2) {
192 opserr << "WARNING save no commit tag - want save commitTag?";
193 return TCL_OK;
194 }
195
196 // check argv[1] for commitTag
197 int commitTag;
198 if (Tcl_GetInt(interp, argv[1], &commitTag) != TCL_OK) {
199 opserr << "WARNING - save could not read commitTag " << argv[1] << endln;
200 return TCL_OK;
201 }
202
203 if (theDatabase->commitState(commitTag) < 0) {
204 opserr << "WARNING - database failed to commitState \n";
205 return TCL_ERROR;
206 }
207
208 return TCL_OK;
209}
210
211
212int

Callers

nothing calls this directly

Calls 1

commitStateMethod · 0.45

Tested by

no test coverage detected