| 54 | #include <math.h> |
| 55 | |
| 56 | void* |
| 57 | OPS_ElementRecorderRMS() |
| 58 | { |
| 59 | if (OPS_GetNumRemainingInputArgs() < 5) { |
| 60 | opserr << "WARNING: recorder Element "; |
| 61 | opserr << "-ele <list elements> -file <fileName> -dT <dT> response"; |
| 62 | return 0; |
| 63 | } |
| 64 | |
| 65 | const char** data = 0; |
| 66 | int nargrem = 0; |
| 67 | OPS_Stream *theOutputStream = 0; |
| 68 | const char* filename = 0; |
| 69 | |
| 70 | const int STANDARD_STREAM = 0; |
| 71 | const int DATA_STREAM = 1; |
| 72 | const int XML_STREAM = 2; |
| 73 | const int DATABASE_STREAM = 3; |
| 74 | const int BINARY_STREAM = 4; |
| 75 | const int DATA_STREAM_CSV = 5; |
| 76 | const int TCP_STREAM = 6; |
| 77 | const int DATA_STREAM_ADD = 7; |
| 78 | |
| 79 | int eMode = STANDARD_STREAM; |
| 80 | |
| 81 | bool echoTimeFlag = false; |
| 82 | double dT = 0.0; |
| 83 | double rTolDt = 0.00001; |
| 84 | bool doScientific = false; |
| 85 | |
| 86 | int precision = 6; |
| 87 | |
| 88 | bool closeOnWrite = false; |
| 89 | |
| 90 | const char *inetAddr = 0; |
| 91 | int inetPort; |
| 92 | |
| 93 | ID elements(0, 6); |
| 94 | ID dofs(0, 6); |
| 95 | |
| 96 | while (OPS_GetNumRemainingInputArgs() > 0) { |
| 97 | |
| 98 | const char* option = OPS_GetString(); |
| 99 | |
| 100 | if (strcmp(option, "-time") == 0) { |
| 101 | echoTimeFlag = true; |
| 102 | } |
| 103 | else if (strcmp(option, "-load") == 0) { |
| 104 | echoTimeFlag = true; |
| 105 | } |
| 106 | else if (strcmp(option, "-scientific") == 0) { |
| 107 | doScientific = true; |
| 108 | } |
| 109 | else if (strcmp(option, "-file") == 0) { |
| 110 | if (OPS_GetNumRemainingInputArgs() > 0) { |
| 111 | filename = OPS_GetString(); |
| 112 | } |
| 113 | eMode = DATA_STREAM; |
no test coverage detected