| 44 | |
| 45 | |
| 46 | void * OPS_NewmarkHSIncrLimit(void) |
| 47 | { |
| 48 | // pointer to an integrator that will be returned |
| 49 | TransientIntegrator *theIntegrator = 0; |
| 50 | |
| 51 | int argc = OPS_GetNumRemainingInputArgs(); |
| 52 | if (argc != 3 && argc != 5) { |
| 53 | opserr << "WARNING - incorrect number of args want NewmarkHSIncrLimit $gamma $beta $limit <-normType $T>\n"; |
| 54 | return 0; |
| 55 | } |
| 56 | |
| 57 | double dData[3]; |
| 58 | int normType = 2; |
| 59 | int numData = 3; |
| 60 | |
| 61 | if (OPS_GetDouble(&numData, dData) != 0) { |
| 62 | opserr << "WARNING - invalid args want NewmarkHSIncrLimit $gamma $beta $limit <-normType $T>\n"; |
| 63 | return 0; |
| 64 | } |
| 65 | |
| 66 | if (argc == 5) { |
| 67 | const char *argvLoc = OPS_GetString(); |
| 68 | if (strcmp(argvLoc, "-normType") == 0) { |
| 69 | numData = 1; |
| 70 | if (OPS_GetInt(&numData, &normType) != 0) { |
| 71 | opserr << "WARNING - invalid normType want NewmarkHSIncrLimit $gamma $beta $limit <-normType $T>\n"; |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | theIntegrator = new NewmarkHSIncrLimit(dData[0], dData[1], dData[2], normType); |
| 77 | |
| 78 | if (theIntegrator == 0) |
| 79 | opserr << "WARNING - out of memory creating NewmarkHSIncrLimit integrator\n"; |
| 80 | |
| 81 | return theIntegrator; |
| 82 | } |
| 83 | |
| 84 | |
| 85 | NewmarkHSIncrLimit::NewmarkHSIncrLimit() |
no test coverage detected