| 447 | |
| 448 | |
| 449 | int |
| 450 | printIntegrator(ClientData clientData, Tcl_Interp *interp, Tcl_Size argc, |
| 451 | TCL_Char ** const argv, OPS_Stream &output) |
| 452 | { |
| 453 | assert(clientData != nullptr); |
| 454 | BasicAnalysisBuilder *builder = (BasicAnalysisBuilder*)clientData; |
| 455 | |
| 456 | TransientIntegrator *theTransientIntegrator = builder->getTransientIntegrator(); |
| 457 | StaticIntegrator *the_static_integrator = builder->getStaticIntegrator(); |
| 458 | |
| 459 | int eleArg = 0; |
| 460 | if (the_static_integrator == nullptr && theTransientIntegrator == nullptr) |
| 461 | return TCL_OK; |
| 462 | |
| 463 | // if 'print <filename> Algorithm flag' get the flag |
| 464 | int flag = 0; |
| 465 | if (argc > 2) { |
| 466 | if (Tcl_GetInt(interp, argv[eleArg], &flag) != TCL_OK) { |
| 467 | opserr << OpenSees::PromptValueError << "print algorithm failed to get integer flag: \n"; |
| 468 | opserr << argv[eleArg] << endln; |
| 469 | return TCL_ERROR; |
| 470 | } |
| 471 | } |
| 472 | |
| 473 | if (the_static_integrator != 0) |
| 474 | the_static_integrator->Print(output, flag); |
| 475 | else |
| 476 | theTransientIntegrator->Print(output, flag); |
| 477 | return TCL_OK; |
| 478 | } |
| 479 | |
| 480 | static int |
| 481 | printA(ClientData clientData, Tcl_Interp *interp, Tcl_Size argc, TCL_Char ** const argv) |
no test coverage detected