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

Method initialize

SRC/recorder/NormElementRecorder.cpp:511–682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509}
510
511int
512NormElementRecorder::initialize(void)
513{
514 if (theDomain == 0)
515 return 0;
516
517 if (theResponses != 0) {
518 for (int i = 0; i < numEle; i++)
519 delete theResponses[i];
520 delete [] theResponses;
521 }
522
523 int numDbColumns = 0;
524
525 // Set the response objects:
526 // 1. create an array of pointers for them
527 // 2. iterate over the elements invoking setResponse() to get the new objects & determine size of data
528 //
529
530 int i =0;
531 ID xmlOrder(0,64);
532 ID responseOrder(0,64);
533
534 if (eleID != 0) {
535
536 //
537 // if we have an eleID we know Response size so allocate Response holder & loop over & ask each element
538 //
539
540 int eleCount = 0;
541 int responseCount = 0;
542
543 if (echoTimeFlag == true && addColumnInfo == 1) {
544 xmlOrder[0] = 0;
545 responseOrder[0] = 0;
546 eleCount = 1;
547 responseCount =1;
548 }
549
550 // loop over ele & set Responses
551 for (i=0; i<numEle; i++) {
552 Element *theEle = theDomain->getElement((*eleID)(i));
553 if (theEle != 0) {
554 xmlOrder[eleCount] = i+1;
555 eleCount++;
556 }
557 }
558
559 theOutputHandler->setOrder(xmlOrder);
560
561 //
562 // do time
563 //
564
565 if (echoTimeFlag == true) {
566 theOutputHandler->tag("TimeOutput");
567 theOutputHandler->tag("ResponseType", "time");
568 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