| 56 | #include <iostream> |
| 57 | |
| 58 | void* OPS_LoadControlIntegrator() |
| 59 | { |
| 60 | if(OPS_GetNumRemainingInputArgs() < 1) { |
| 61 | opserr<<"LoadControl - insufficient arguments\n"; |
| 62 | return 0; |
| 63 | } |
| 64 | |
| 65 | double lambda; |
| 66 | int numData = 1; |
| 67 | if(OPS_GetDoubleInput(&numData,&lambda) < 0) { |
| 68 | opserr<<"WARNING LoadControl - failed to read double lambda\n"; |
| 69 | return 0; |
| 70 | } |
| 71 | |
| 72 | int numIter = 1; |
| 73 | double mLambda[2] = {lambda,lambda}; |
| 74 | if(OPS_GetNumRemainingInputArgs() > 2) { |
| 75 | if(OPS_GetIntInput(&numData,&numIter) < 0) { |
| 76 | opserr<<"WARNING LoadControl - failed to read int numIter\n"; |
| 77 | return 0; |
| 78 | } |
| 79 | numData = 2; |
| 80 | if(OPS_GetDoubleInput(&numData,&mLambda[0]) < 0) { |
| 81 | opserr<<"WARNING LoadControl - failed to read double min and max\n"; |
| 82 | return 0; |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | return new LoadControl(lambda,numIter,mLambda[0],mLambda[1]); |
| 87 | } |
| 88 | |
| 89 | LoadControl::LoadControl(double dLambda, int numIncr, double min, double max, int classtag) |
| 90 | : StaticIntegrator(classtag), |
no test coverage detected