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

Method record

SRC/recorder/GSA_Recorder.cpp:183–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183int
184GSA_Recorder::record(int commitTag, double timeStamp)
185{
186
187 // where relDeltaTTol is the maximum reliable ratio between analysis time step and deltaT
188 // and provides tolerance for floating point precision (see floating-point-tolerance-for-recorder-time-step.md)
189 if (deltaT == 0.0 || timeStamp - nextTimeStampToRecord >= -deltaT * relDeltaTTol) {
190
191 if (deltaT != 0.0)
192 nextTimeStampToRecord = timeStamp + deltaT;
193
194 counter++;
195
196 theFile << "ANAL_CASE\t" << counter << "\tStep" << counter << "\tL" << counter <<
197 "\tGSS\tSTATIC\tPOST\t" << counter << "\topensees\t" << "20030204165318 0" << endln;
198
199 theFile << "!\n!RESULTS FOR ANALYSIS CASE\t" << counter << "\n!\n";
200
201 // spit out nodal displacements
202 NodeIter &theNodes = theDomain->getNodes();
203 Node *theNode;
204 while ((theNode=theNodes()) != 0) {
205 int nodeTag = theNode->getTag();
206 const Vector &disp = theNode->getTrialDisp();
207 if (ndm == 3 && ndf == 6) {
208 theFile << "DISP\t" << nodeTag << "\t" << counter;
209 for (int i=0; i<ndm; i++)
210 theFile << "\t" << disp(i);
211 theFile << endln;
212 theFile << "ROTN\t" << nodeTag << "\t" << counter;
213 for (int j=0; j<ndm; j++)
214 theFile << "\t" << disp(ndm+j);
215 theFile << endln;
216 }
217 }
218
219 ElementIter &theElements = theDomain->getElements();
220 Element *theElement;
221 while ((theElement=theElements()) != 0) {
222 theElement->Print(theFile, (counter+1)*-1); // starts at -2, as already using -1
223
224 }
225 }
226
227 return 0;
228}
229
230int
231GSA_Recorder::playback(int commitTag)

Callers

nothing calls this directly

Calls 4

getNodesMethod · 0.80
getTagMethod · 0.45
getElementsMethod · 0.45
PrintMethod · 0.45

Tested by

no test coverage detected