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