MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / Print

Method Print

DEVELOPER/core/Node.cpp:1775–1824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1773
1774
1775void
1776Node::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
1826int
1827Node::displaySelf(Renderer &theRenderer, int displayMode, float fact)

Callers 4

TaggedObject.cppFile · 0.45
updateElementMethod · 0.45
OPS_printNDMaterialFunction · 0.45

Calls 4

getResponseMethod · 0.95
getIDMethod · 0.80
getTagMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected