| 550 | } |
| 551 | |
| 552 | Response* |
| 553 | ShellDKGT::setResponse(const char **argv, int argc, OPS_Stream &output) |
| 554 | { |
| 555 | Response *theResponse = 0; |
| 556 | |
| 557 | output.tag("ElementOutput"); |
| 558 | |
| 559 | output.attr("eleType", "ShellDKGT"); |
| 560 | output.attr("eleTag",this->getTag()); |
| 561 | int numNodes = this->getNumExternalNodes(); |
| 562 | const ID &nodes = this->getExternalNodes(); |
| 563 | static char nodeData[32]; |
| 564 | |
| 565 | for (int i=0; i<numNodes; i++) { |
| 566 | sprintf(nodeData,"node%d",i+1); |
| 567 | output.attr(nodeData,nodes(i)); |
| 568 | } |
| 569 | |
| 570 | if (strcmp(argv[0],"force") == 0 || strcmp(argv[0],"forces") == 0 || |
| 571 | strcmp(argv[0],"globalForce") == 0 || strcmp(argv[0],"globalForces") == 0) { |
| 572 | const Vector &force = this->getResistingForce(); |
| 573 | int size = force.Size(); |
| 574 | for (int i=0; i<size; i++) { |
| 575 | sprintf(nodeData,"P%d",i+1); |
| 576 | output.tag("ResponseType",nodeData); |
| 577 | } |
| 578 | theResponse = new ElementResponse(this, 1, this->getResistingForce()); |
| 579 | } |
| 580 | |
| 581 | else if (strcmp(argv[0],"material") == 0 || strcmp(argv[0],"Material") == 0 || |
| 582 | strcmp(argv[0],"section") == 0) { |
| 583 | if (argc < 2) { |
| 584 | opserr << "ShellDKGT::setResponse() - need to specify more data\n"; |
| 585 | return 0; |
| 586 | } |
| 587 | int pointNum = atoi(argv[1]); |
| 588 | if (pointNum > 0 && pointNum <= 4) { |
| 589 | |
| 590 | output.tag("GaussPoint"); |
| 591 | output.attr("number",pointNum); |
| 592 | output.attr("eta",sg[pointNum-1]); |
| 593 | output.attr("neta",tg[pointNum-1]); |
| 594 | |
| 595 | theResponse = materialPointers[pointNum-1]->setResponse(&argv[2], argc-2, output); |
| 596 | |
| 597 | output.endTag(); |
| 598 | } |
| 599 | |
| 600 | } else if (strcmp(argv[0],"stresses") ==0) { |
| 601 | |
| 602 | for (int i=0; i<4; i++) { |
| 603 | output.tag("GaussPoint"); |
| 604 | output.attr("number",i+1); |
| 605 | output.attr("eta",sg[i]); |
| 606 | output.attr("neta",tg[i]); |
| 607 | |
| 608 | output.tag("SectionForceDeformation"); |
| 609 | output.attr("classType", materialPointers[i]->getClassTag()); |
nothing calls this directly
no test coverage detected