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

Function sensitivityAlgorithm

SRC/tcl/commands.cpp:1324–1417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1322}
1323
1324int
1325sensitivityAlgorithm(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)
1326{
1327 bool withRespectToRVs = true;
1328 bool newalgorithm = false;
1329 int analysisTypeTag = 1;
1330 if(theStaticIntegrator != 0) {
1331 theSensitivityIntegrator = theStaticIntegrator;
1332 } else if(theTransientIntegrator != 0) {
1333 theSensitivityIntegrator = theTransientIntegrator;
1334 }
1335 // 1: compute at each step (default); 2: compute by command
1336
1337 if (argc < 2) {
1338 opserr << "ERROR: Wrong number of parameters to sensitivity algorithm." << endln;
1339 return TCL_ERROR;
1340 }
1341 if (theReliabilityBuilder == 0) {
1342 opserr << "The command 'reliability' needs to be issued before " << endln
1343 << " the sensitivity algorithm can be created." << endln;
1344 return TCL_ERROR;
1345 }
1346 else if (theSensitivityIntegrator == 0) {
1347 opserr << "The sensitivity integrator needs to be instantiated before " << endln
1348 << " the sensitivity algorithm can be created." << endln;
1349 return TCL_ERROR;
1350 }
1351
1352 if (strcmp(argv[1],"-computeAtEachStep") == 0)
1353 analysisTypeTag = 1;
1354 else if (strcmp(argv[1],"-computeByCommand") == 0)
1355 analysisTypeTag = 2;
1356 else {
1357 opserr << "Unknown sensitivity algorithm option: " << argv[1] << endln;
1358 return TCL_ERROR;
1359 }
1360
1361 ReliabilityDomain *theReliabilityDomain;
1362 theReliabilityDomain = theReliabilityBuilder->getReliabilityDomain();
1363 if(newalgorithm){
1364 // theSensitivityAlgorithm = new
1365 // NewSensitivityAlgorithm(theReliabilityDomain,
1366 // &theDomain,
1367 // theAlgorithm,
1368 // theSensitivityIntegrator,
1369 // analysisTypeTag);
1370 } else {
1371 // theSensitivityAlgorithm = new
1372 // SensitivityAlgorithm(&theDomain,
1373 // theAlgorithm,
1374 // theSensitivityIntegrator,
1375 // analysisTypeTag);
1376
1377
1378 IncrementalIntegrator *theIntegrator = 0;
1379
1380 if (theStaticAnalysis != 0 && theStaticIntegrator != 0) {
1381 theIntegrator = theStaticIntegrator;

Callers

nothing calls this directly

Calls 4

getReliabilityDomainMethod · 0.45
setComputeTypeMethod · 0.45

Tested by

no test coverage detected