| 1773 | |
| 1774 | |
| 1775 | void |
| 1776 | Node::Print(OPS_Stream &s, int flag) |
| 1777 | { |
| 1778 | if (flag == OPS_PRINT_CURRENTSTATE) { // print out everything |
| 1779 | s << "\n Node: " << this->getTag() << endln; |
| 1780 | s << "\tCoordinates : " << *Crd; |
| 1781 | if (commitDisp != 0) |
| 1782 | s << "\tDisps: " << *trialDisp; |
| 1783 | if (commitVel != 0) |
| 1784 | s << "\tVelocities : " << *trialVel; |
| 1785 | if (commitAccel != 0) |
| 1786 | s << "\tcommitAccels: " << *trialAccel; |
| 1787 | if (unbalLoad != 0) |
| 1788 | s << "\t unbalanced Load: " << *unbalLoad; |
| 1789 | if (reaction != 0) |
| 1790 | s << "\t reaction: " << *reaction; |
| 1791 | if (mass != 0) { |
| 1792 | s << "\tMass : " << *mass; |
| 1793 | s << "\t Rayleigh Factor: alphaM: " << alphaM << endln; |
| 1794 | s << "\t Rayleigh Forces: " << *this->getResponse(RayleighForces); |
| 1795 | } |
| 1796 | if (theEigenvectors != 0) |
| 1797 | s << "\t Eigenvectors: " << *theEigenvectors; |
| 1798 | if (theDOF_GroupPtr != 0) |
| 1799 | s << "\tID : " << theDOF_GroupPtr->getID(); |
| 1800 | s << "\n"; |
| 1801 | } |
| 1802 | |
| 1803 | else if (flag == 1) { // print out: nodeId displacements |
| 1804 | s << this->getTag() << " " << *commitDisp; |
| 1805 | } |
| 1806 | |
| 1807 | if (flag == OPS_PRINT_PRINTMODEL_JSON) { |
| 1808 | s << "\t\t\t{"; |
| 1809 | s << "\"name\": " << this->getTag() << ", "; |
| 1810 | s << "\"ndf\": " << numberDOF << ", "; |
| 1811 | s << "\"crd\": ["; |
| 1812 | int numCrd = Crd->Size(); |
| 1813 | for (int i = 0; i < numCrd - 1; i++) |
| 1814 | s << (*Crd)(i) << ", "; |
| 1815 | s << (*Crd)(numCrd - 1) << "]"; |
| 1816 | if (mass != 0) { |
| 1817 | s << ", \"mass\": ["; |
| 1818 | for (int i = 0; i < numberDOF - 1; i++) |
| 1819 | s << (*mass)(i, i) << ", "; |
| 1820 | s << (*mass)(numberDOF - 1, numberDOF - 1) << "]"; |
| 1821 | } |
| 1822 | s << "}"; |
| 1823 | } |
| 1824 | } |
| 1825 | |
| 1826 | int |
| 1827 | Node::displaySelf(Renderer &theRenderer, int displayMode, float fact) |
no test coverage detected