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

Function OPS_setTime

SRC/interpreter/OpenSeesMiscCommands.cpp:206–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206int OPS_setTime()
207{
208 if (OPS_GetNumRemainingInputArgs() < 1) {
209 opserr << "WARNING illegal command - time pseudoTime? \n";
210 return -1;
211 }
212
213 Domain* theDomain = OPS_GetDomain();
214 if (theDomain == 0) return -1;
215
216 double newTime;
217 int numdata = 1;
218 if (OPS_GetDoubleInput(&numdata, &newTime) < 0) {
219 opserr << "WARNING reading time value - time pseudoTime? \n";
220 return -1;
221 } else {
222 theDomain->setCurrentTime(newTime);
223 theDomain->setCommittedTime(newTime);
224 }
225 return 0;
226}
227
228int OPS_removeObject()
229{

Callers 2

Tcl_ops_setTimeFunction · 0.85
Py_ops_setTimeFunction · 0.85

Calls 5

OPS_GetDomainFunction · 0.70
OPS_GetDoubleInputFunction · 0.70
setCurrentTimeMethod · 0.45
setCommittedTimeMethod · 0.45

Tested by

no test coverage detected