MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / TclCreateRecorder

Function TclCreateRecorder

SRC/recorder/TclRecorderCommands.cpp:141–2098  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139 extern FEM_ObjectBroker theBroker;
140
141 int
142 TclCreateRecorder(ClientData clientData, Tcl_Interp *interp, int argc,
143 TCL_Char **argv, Domain &theDomain, Recorder **theRecorder)
144 {
145 // make sure at least one other argument to contain integrator
146 if (argc < 2) {
147 opserr << "WARNING need to specify a Recorder type\n";
148 return TCL_ERROR;
149 }
150
151 //
152 // check argv[1] for type of Recorder, parse in rest of arguments
153 // needed for the type of Recorder, create the object and add to Domain
154 //
155 FE_Datastore *theRecorderDatabase = 0;
156 OPS_Stream *theOutputStream = 0;
157
158 TCL_Char *fileName = 0;
159 TCL_Char *tableName = 0;
160
161 // an Element Recorder or ElementEnvelope Recorder
162 if ((strcmp(argv[1],"Element") == 0) || (strcmp(argv[1],"EnvelopeElement") == 0)
163 || (strcmp(argv[1],"NormElement") == 0) || (strcmp(argv[1],"NormEnvelopeElement") == 0)) {
164
165
166 int numEle = 0;
167 int endEleIDs = 2;
168 double dT = 0.0;
169 double rTolDt = 0.00001;
170 bool echoTime = false;
171 int loc = endEleIDs;
172 int flags = 0;
173 int eleData = 0;
174 outputMode eMode = STANDARD_STREAM;
175 ID *eleIDs = 0;
176 int precision = 6;
177 const char *inetAddr = 0;
178 int inetPort;
179 bool closeOnWrite = false;
180 int writeBufferSize = 0;
181 bool doScientific = false;
182
183 ID *specificIndices = 0;
184
185 while (flags == 0 && loc < argc) {
186
187 if ((strcmp(argv[loc],"-ele") == 0) ||
188 (strcmp(argv[loc],"-eles") == 0) ||
189 (strcmp(argv[loc],"-element") == 0)) {
190
191 // ensure no segmentation fault if user messes up
192 if (argc < loc+2) {
193 opserr << "WARNING recorder Element .. -ele tag1? .. - no ele tags specified\n";
194 return TCL_ERROR;
195 }
196
197 //
198 // read in a list of ele until end of command or other flag

Callers 2

TclAddRecorderFunction · 0.70
TclAddAlgorithmRecorderFunction · 0.70

Calls 15

OPS_getDamageModelFunction · 0.85
OPS_getTimeSeriesFunction · 0.85
OPS_PVDRecorderFunction · 0.85
OPS_VTK_RecorderFunction · 0.85
OPS_ElementRecorderRMSFunction · 0.85
OPS_NodeRecorderRMSFunction · 0.85
OPS_MPCORecorderFunction · 0.85
OPS_VTKHDF_RecorderFunction · 0.85
OPS_GmshRecorderFunction · 0.85
getNodesMethod · 0.80
setColMethod · 0.80
IDClass · 0.70

Tested by

no test coverage detected