| 53 | |
| 54 | |
| 55 | void * |
| 56 | OPS_StagedNewmark(void) |
| 57 | { |
| 58 | // Pointer to a uniaxial material that will be returned |
| 59 | TransientIntegrator *theIntegrator = 0; |
| 60 | |
| 61 | int argc = OPS_GetNumRemainingInputArgs(); |
| 62 | if (argc != 2 && argc != 4) { |
| 63 | opserr << "WARNING - incorrect number of args want StagedNewmark $gamma $beta <-form $typeUnknown>\n"; |
| 64 | return 0; |
| 65 | } |
| 66 | |
| 67 | bool dispFlag = true; |
| 68 | double dData[2]; |
| 69 | int numData = 2; |
| 70 | if (OPS_GetDouble(&numData, dData) != 0) { |
| 71 | opserr << "WARNING - invalid args want StagedNewmark $gamma $beta <-form $typeUnknown>\n"; |
| 72 | return 0; |
| 73 | } |
| 74 | |
| 75 | if (argc == 2) |
| 76 | theIntegrator = new StagedNewmark(dData[0], dData[1]); |
| 77 | else { |
| 78 | // char nextString[10]; |
| 79 | const char *nextString = OPS_GetString(); |
| 80 | // OPS_GetString(nextString, 10); |
| 81 | if (strcmp(nextString,"-form") == 0) { |
| 82 | // OPS_GetString(nextString, 10); |
| 83 | nextString = OPS_GetString(); |
| 84 | if ((nextString[0] == 'D') || (nextString[0] == 'd')) |
| 85 | dispFlag = true; |
| 86 | else if ((nextString[0] == 'A') || (nextString[0] == 'a')) |
| 87 | dispFlag = false; |
| 88 | } |
| 89 | theIntegrator = new StagedNewmark(dData[0], dData[1], dispFlag); |
| 90 | } |
| 91 | |
| 92 | if (theIntegrator == 0) |
| 93 | opserr << "WARNING - out of memory creating StagedNewmark integrator\n"; |
| 94 | |
| 95 | return theIntegrator; |
| 96 | } |
| 97 | |
| 98 | |
| 99 |
no test coverage detected