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

Method Print

SRC/element/forceBeamColumn/ForceBeamColumn2d.cpp:2752–2833  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2750}
2751
2752void
2753ForceBeamColumn2d::Print(OPS_Stream &s, int flag)
2754{
2755 if (flag == 2) {
2756
2757 s << "#ForceBeamColumn2D\n";
2758
2759 const Vector &node1Crd = theNodes[0]->getCrds();
2760 const Vector &node2Crd = theNodes[1]->getCrds();
2761 const Vector &node1Disp = theNodes[0]->getDisp();
2762 const Vector &node2Disp = theNodes[1]->getDisp();
2763
2764 s << "#NODE " << node1Crd(0) << " " << node1Crd(1)
2765 << " " << node1Disp(0) << " " << node1Disp(1) << " " << node1Disp(2) << endln;
2766
2767 s << "#NODE " << node2Crd(0) << " " << node2Crd(1)
2768 << " " << node2Disp(0) << " " << node2Disp(1) << " " << node2Disp(2) << endln;
2769
2770 double P = Secommit(0);
2771 double M1 = Secommit(1);
2772 double M2 = Secommit(2);
2773 double L = crdTransf->getInitialLength();
2774 double V = (M1+M2)/L;
2775
2776 double p0[3]; p0[0] = 0.0; p0[1] = 0.0; p0[2] = 0.0;
2777 if (numEleLoads > 0)
2778 this->computeReactions(p0);
2779
2780 s << "#END_FORCES " << -P+p0[0] << " " << V+p0[1] << " " << M1 << endln;
2781 s << "#END_FORCES " << P << " " << -V+p0[2] << " " << M2 << endln;
2782
2783 // plastic hinge rotation
2784 static Vector vp(3);
2785 static Matrix fe(3,3);
2786 this->getInitialFlexibility(fe);
2787 vp = crdTransf->getBasicTrialDisp();
2788 vp.addMatrixVector(1.0, fe, Se, -1.0);
2789 s << "#PLASTIC_HINGE_ROTATION " << vp[1] << " " << vp[2] << " " << 0.1*L << " " << 0.1*L << endln;
2790 }
2791
2792 if (flag == OPS_PRINT_CURRENTSTATE) {
2793
2794 s << "\nElement: " << this->getTag() << " Type: ForceBeamColumn2d ";
2795 s << "\tConnected Nodes: " << connectedExternalNodes ;
2796 s << "\tNumber of Sections: " << numSections;
2797 s << "\tMass density: " << rho << endln;
2798 beamIntegr->Print(s, flag);
2799 double P = Secommit(0);
2800 double M1 = Secommit(1);
2801 double M2 = Secommit(2);
2802 double L = crdTransf->getInitialLength();
2803 double V = (M1+M2)/L;
2804 theVector(1) = V;
2805 theVector(4) = -V;
2806 double p0[3]; p0[0] = 0.0; p0[1] = 0.0; p0[2] = 0.0;
2807 if (numEleLoads > 0)
2808 this->computeReactions(p0);
2809

Callers 1

Calls 8

computeReactionsMethod · 0.95
getInitialFlexibilityMethod · 0.95
getCrdsMethod · 0.80
getBasicTrialDispMethod · 0.80
getDispMethod · 0.45
getInitialLengthMethod · 0.45
addMatrixVectorMethod · 0.45
getTagMethod · 0.45

Tested by

no test coverage detected