| 2642 | } |
| 2643 | |
| 2644 | void |
| 2645 | ForceBeamColumnCBDI2d::Print(OPS_Stream &s, int flag) |
| 2646 | { |
| 2647 | if (flag == 2) { |
| 2648 | |
| 2649 | s << "#ForceBeamColumnCBDI2D\n"; |
| 2650 | |
| 2651 | const Vector &node1Crd = theNodes[0]->getCrds(); |
| 2652 | const Vector &node2Crd = theNodes[1]->getCrds(); |
| 2653 | const Vector &node1Disp = theNodes[0]->getDisp(); |
| 2654 | const Vector &node2Disp = theNodes[1]->getDisp(); |
| 2655 | |
| 2656 | s << "#NODE " << node1Crd(0) << " " << node1Crd(1) |
| 2657 | << " " << node1Disp(0) << " " << node1Disp(1) << " " << node1Disp(2) << endln; |
| 2658 | |
| 2659 | s << "#NODE " << node2Crd(0) << " " << node2Crd(1) |
| 2660 | << " " << node2Disp(0) << " " << node2Disp(1) << " " << node2Disp(2) << endln; |
| 2661 | |
| 2662 | double P = Secommit(0); |
| 2663 | double M1 = Secommit(1); |
| 2664 | double M2 = Secommit(2); |
| 2665 | double L = crdTransf->getInitialLength(); |
| 2666 | double V = (M1+M2)/L; |
| 2667 | |
| 2668 | double p0[3]; p0[0] = 0.0; p0[1] = 0.0; p0[2] = 0.0; |
| 2669 | if (numEleLoads > 0) |
| 2670 | this->computeReactions(p0); |
| 2671 | |
| 2672 | s << "#END_FORCES " << -P+p0[0] << " " << V+p0[1] << " " << M1 << endln; |
| 2673 | s << "#END_FORCES " << P << " " << -V+p0[2] << " " << M2 << endln; |
| 2674 | |
| 2675 | // plastic hinge rotation |
| 2676 | static Vector vp(3); |
| 2677 | static Matrix fe(3,3); |
| 2678 | this->getInitialFlexibility(fe); |
| 2679 | vp = crdTransf->getBasicTrialDisp(); |
| 2680 | vp.addMatrixVector(1.0, fe, Se, -1.0); |
| 2681 | s << "#PLASTIC_HINGE_ROTATION " << vp[1] << " " << vp[2] << " " << 0.1*L << " " << 0.1*L << endln; |
| 2682 | /* |
| 2683 | // allocate array of vectors to store section coordinates and displacements |
| 2684 | static int maxNumSections = 0; |
| 2685 | static Vector *coords = 0; |
| 2686 | static Vector *displs = 0; |
| 2687 | if (maxNumSections < numSections) { |
| 2688 | if (coords != 0) |
| 2689 | delete [] coords; |
| 2690 | if (displs != 0) |
| 2691 | delete [] displs; |
| 2692 | |
| 2693 | coords = new Vector [numSections]; |
| 2694 | displs = new Vector [numSections]; |
| 2695 | |
| 2696 | if (!coords) { |
| 2697 | opserr << "NLBeamColumn3d::Print() -- failed to allocate coords array"; |
| 2698 | exit(-1); |
| 2699 | } |
| 2700 | |
| 2701 | int i; |
no test coverage detected