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

Function OPS_InitialStateAnalysis

SRC/interpreter/OpenSeesMiscCommands.cpp:1288–1334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1286}
1287
1288int OPS_InitialStateAnalysis()
1289{
1290 if (OPS_GetNumRemainingInputArgs() < 1) {
1291 opserr << "WARNING: Incorrect number of arguments for InitialStateAnalysis command" << endln;
1292 return -1;
1293 }
1294
1295 Domain* theDomain = OPS_GetDomain();
1296 if (theDomain == 0) return -1;
1297
1298 const char* flag = OPS_GetString();
1299 if (strcmp(flag,"on") == 0) {
1300 opserr << "InitialStateAnalysis ON" << endln;
1301
1302 // set global variable to true
1303 // FMK changes for parallel:
1304 // ops_InitialStateAnalysis = true;
1305
1306 Parameter *theP = new InitialStateParameter(true);
1307 theDomain->addParameter(theP);
1308 delete theP;
1309
1310 return 0;
1311
1312 } else if (strcmp(flag,"off") == 0) {
1313 opserr << "InitialStateAnalysis OFF" <<endln;
1314
1315 // call revert to start to zero the displacements
1316 theDomain->revertToStart();
1317
1318 // set global variable to false
1319 // FMK changes for parallel
1320 // ops_InitialStateAnalysis = false;
1321 Parameter *theP = new InitialStateParameter(false);
1322 theDomain->addParameter(theP);
1323 delete theP;
1324
1325 return 0;
1326
1327 } else {
1328 opserr << "WARNING: Incorrect arguments - want InitialStateAnalysis on, or InitialStateAnalysis off" << endln;
1329
1330 return -1;
1331 }
1332
1333 return 0;
1334}
1335
1336int OPS_maxOpenFiles()
1337{

Callers 2

Calls 5

OPS_GetDomainFunction · 0.70
OPS_GetStringFunction · 0.70
addParameterMethod · 0.45
revertToStartMethod · 0.45

Tested by

no test coverage detected