| 1603 | static Vector responseData(0); |
| 1604 | |
| 1605 | const Vector * |
| 1606 | Domain::getElementResponse(int eleTag, const char **argv, int argc) |
| 1607 | { |
| 1608 | Element *theEle = this->getElement(eleTag); |
| 1609 | if (theEle == 0) |
| 1610 | return NULL; |
| 1611 | else { |
| 1612 | |
| 1613 | if (argc == 1) { |
| 1614 | if (strcmp(argv[0],"forces") == 0) { |
| 1615 | return &(theEle->getResistingForce()); |
| 1616 | } else if (strcmp(argv[0],"nodeTags") == 0) { |
| 1617 | const ID&theNodes = theEle->getExternalNodes(); |
| 1618 | int size = theNodes.Size(); |
| 1619 | if (responseData.Size() != size) |
| 1620 | responseData.resize(size); |
| 1621 | for (int i=0; i<size; i++) |
| 1622 | responseData(i) = theNodes(i); |
| 1623 | return &responseData; |
| 1624 | } |
| 1625 | } |
| 1626 | |
| 1627 | DummyStream dummy; |
| 1628 | Response *theResponse = theEle->setResponse(argv, argc, dummy); |
| 1629 | if (theResponse == 0) { |
| 1630 | return 0; |
| 1631 | } |
| 1632 | |
| 1633 | if (theResponse->getResponse() < 0) { |
| 1634 | delete theResponse; |
| 1635 | return 0; |
| 1636 | } |
| 1637 | |
| 1638 | Information &eleInfo = theResponse->getInformation(); |
| 1639 | //const Vector *data = &(eleInfo.getData()); |
| 1640 | responseData = eleInfo.getData(); |
| 1641 | delete theResponse; |
| 1642 | return &responseData; |
| 1643 | } |
| 1644 | } |
| 1645 | |
| 1646 | |
| 1647 | Graph & |
nothing calls this directly
no test coverage detected