| 1626 | } |
| 1627 | |
| 1628 | Response* |
| 1629 | ASDShellQ4::setResponse(const char **argv, int argc, OPS_Stream &output) |
| 1630 | { |
| 1631 | Response* theResponse = 0; |
| 1632 | |
| 1633 | output.tag("ElementOutput"); |
| 1634 | output.attr("eleType", "ASDShellQ4"); |
| 1635 | output.attr("eleTag", this->getTag()); |
| 1636 | int numNodes = this->getNumExternalNodes(); |
| 1637 | const ID& nodes = this->getExternalNodes(); |
| 1638 | static char nodeData[32]; |
| 1639 | |
| 1640 | for (int i = 0; i < numNodes; i++) { |
| 1641 | sprintf(nodeData, "node%d", i + 1); |
| 1642 | output.attr(nodeData, nodes(i)); |
| 1643 | } |
| 1644 | |
| 1645 | if (strcmp(argv[0], "force") == 0 || strcmp(argv[0], "forces") == 0 || |
| 1646 | strcmp(argv[0], "globalForce") == 0 || strcmp(argv[0], "globalForces") == 0) { |
| 1647 | const Vector& force = this->getResistingForce(); |
| 1648 | int size = force.Size(); |
| 1649 | for (int i = 0; i < size; i++) { |
| 1650 | sprintf(nodeData, "P%d", i + 1); |
| 1651 | output.tag("ResponseType", nodeData); |
| 1652 | } |
| 1653 | theResponse = new ElementResponse(this, 1, this->getResistingForce()); |
| 1654 | } |
| 1655 | |
| 1656 | else if (strcmp(argv[0], "material") == 0 || strcmp(argv[0], "Material") == 0 || |
| 1657 | strcmp(argv[0], "section") == 0) { |
| 1658 | if (argc < 2) { |
| 1659 | opserr << "ASDShellQ4::setResponse() - need to specify more data\n"; |
| 1660 | return 0; |
| 1661 | } |
| 1662 | int pointNum = atoi(argv[1]); |
| 1663 | if (pointNum > 0 && pointNum <= 4) { |
| 1664 | |
| 1665 | output.tag("GaussPoint"); |
| 1666 | output.attr("number", pointNum); |
| 1667 | output.attr("eta", XI[pointNum - 1]); |
| 1668 | output.attr("neta", ETA[pointNum - 1]); |
| 1669 | |
| 1670 | theResponse = m_sections[pointNum - 1]->setResponse(&argv[2], argc - 2, output); |
| 1671 | |
| 1672 | output.endTag(); |
| 1673 | } |
| 1674 | |
| 1675 | } |
| 1676 | else if (strcmp(argv[0], "stresses") == 0) { |
| 1677 | |
| 1678 | for (int i = 0; i < 4; i++) { |
| 1679 | output.tag("GaussPoint"); |
| 1680 | output.attr("number", i + 1); |
| 1681 | output.attr("eta", XI[i]); |
| 1682 | output.attr("neta", ETA[i]); |
| 1683 | |
| 1684 | output.tag("SectionForceDeformation"); |
| 1685 | output.attr("classType", m_sections[i]->getClassTag()); |
nothing calls this directly
no test coverage detected