| 445 | |
| 446 | |
| 447 | EnvelopeNodeRecorder::~EnvelopeNodeRecorder() |
| 448 | { |
| 449 | // |
| 450 | // write the data |
| 451 | // |
| 452 | |
| 453 | if (theHandler != 0 && data != 0) { |
| 454 | |
| 455 | theHandler->tag("Data"); // Data |
| 456 | |
| 457 | int numResponse = data->noCols(); |
| 458 | |
| 459 | for (int i=0; i<3; i++) { |
| 460 | for (int j=0; j<numResponse; j++) |
| 461 | (*currentData)(j) = (*data)(i,j); |
| 462 | theHandler->write(*currentData); |
| 463 | } |
| 464 | |
| 465 | theHandler->endTag(); // Data |
| 466 | } |
| 467 | |
| 468 | // |
| 469 | // clean up the memory |
| 470 | // |
| 471 | |
| 472 | int numDOF = theDofs->Size(); |
| 473 | |
| 474 | if (theDofs != 0) |
| 475 | delete theDofs; |
| 476 | |
| 477 | if (theNodalTags != 0) |
| 478 | delete theNodalTags; |
| 479 | |
| 480 | if (theHandler != 0) |
| 481 | delete theHandler; |
| 482 | |
| 483 | if (currentData != 0) |
| 484 | delete currentData; |
| 485 | |
| 486 | if (data != 0) |
| 487 | delete data; |
| 488 | |
| 489 | if (theNodes != 0) |
| 490 | delete [] theNodes; |
| 491 | |
| 492 | if (theTimeSeries != 0) { |
| 493 | for (int i=0; i<numDOF; i++) |
| 494 | delete theTimeSeries[i]; |
| 495 | delete [] theTimeSeries; |
| 496 | } |
| 497 | |
| 498 | if (timeSeriesValues != 0) |
| 499 | delete [] timeSeriesValues; |
| 500 | } |
| 501 | |
| 502 | int |
| 503 | EnvelopeNodeRecorder::record(int commitTag, double timeStamp) |