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

Method initialize

SRC/recorder/ElementRecorder.cpp:773–951  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

771}
772
773int
774ElementRecorder::initialize(void)
775{
776 if (theDomain == 0)
777 return 0;
778
779 if (theResponses != 0) {
780 for (int i = 0; i < numEle; i++)
781 delete theResponses[i];
782 delete [] theResponses;
783 }
784
785 int numDbColumns = 0;
786
787 // Set the response objects:
788 // 1. create an array of pointers for them
789 // 2. iterate over the elements invoking setResponse() to get the new objects & determine size of data
790 //
791
792 int i =0;
793 ID xmlOrder(0,64);
794 ID responseOrder(0,64);
795
796 if (eleID != 0) {
797
798 //
799 // if we have an eleID we know Response size so allocate Response holder & loop over & ask each element
800 //
801
802 int eleCount = 0;
803 int responseCount = 0;
804
805 if (echoTimeFlag == true && addColumnInfo == 1) {
806 xmlOrder[0] = 0;
807 responseOrder[0] = 0;
808 eleCount = 1;
809 responseCount =1;
810 }
811
812 // loop over ele & set Responses
813 for (i=0; i<numEle; i++) {
814 Element *theEle = theDomain->getElement((*eleID)(i));
815 if (theEle != 0) {
816 xmlOrder[eleCount] = i+1;
817 eleCount++;
818 }
819 }
820
821 theOutputHandler->setOrder(xmlOrder);
822
823 //
824 // do time
825 //
826
827 if (echoTimeFlag == true) {
828 theOutputHandler->tag("TimeOutput");
829 theOutputHandler->tag("ResponseType", "time");
830 theOutputHandler->endTag(); // TimeOutput

Callers 1

recordMethod · 0.95

Calls 8

getElementMethod · 0.45
setOrderMethod · 0.45
tagMethod · 0.45
endTagMethod · 0.45
setResponseMethod · 0.45
getDataMethod · 0.45
SizeMethod · 0.45
getElementsMethod · 0.45

Tested by

no test coverage detected