| 3146 | } |
| 3147 | |
| 3148 | void |
| 3149 | ForceBeamColumnCBDI3d::Print(OPS_Stream &s, int flag) |
| 3150 | { |
| 3151 | if (flag == 2) { |
| 3152 | |
| 3153 | s << "#ForceBeamColumnCBDI2D\n"; |
| 3154 | |
| 3155 | const Vector &node1Crd = theNodes[0]->getCrds(); |
| 3156 | const Vector &node2Crd = theNodes[1]->getCrds(); |
| 3157 | const Vector &node1Disp = theNodes[0]->getDisp(); |
| 3158 | const Vector &node2Disp = theNodes[1]->getDisp(); |
| 3159 | |
| 3160 | s << "#NODE " << node1Crd(0) << " " << node1Crd(1) |
| 3161 | << " " << node1Disp(0) << " " << node1Disp(1) << " " << node1Disp(2) << endln; |
| 3162 | |
| 3163 | s << "#NODE " << node2Crd(0) << " " << node2Crd(1) |
| 3164 | << " " << node2Disp(0) << " " << node2Disp(1) << " " << node2Disp(2) << endln; |
| 3165 | |
| 3166 | double P = Secommit(0); |
| 3167 | double M1 = Secommit(1); |
| 3168 | double M2 = Secommit(2); |
| 3169 | double L = crdTransf->getInitialLength(); |
| 3170 | double V = (M1+M2)/L; |
| 3171 | |
| 3172 | double p0[6]; |
| 3173 | p0[0] = 0.0; p0[1] = 0.0; p0[2] = 0.0; |
| 3174 | p0[3] = 0.0; p0[4] = 0.0; p0[5] = 0.0; |
| 3175 | if (numEleLoads > 0) |
| 3176 | this->computeReactions(p0); |
| 3177 | |
| 3178 | s << "#END_FORCES " << -P+p0[0] << " " << V+p0[1] << " " << M1 << endln; |
| 3179 | s << "#END_FORCES " << P << " " << -V+p0[2] << " " << M2 << endln; |
| 3180 | |
| 3181 | // plastic hinge rotation |
| 3182 | static Vector vp(6); |
| 3183 | static Matrix fe(6,6); |
| 3184 | this->getInitialFlexibility(fe); |
| 3185 | vp = crdTransf->getBasicTrialDisp(); |
| 3186 | vp.addMatrixVector(1.0, fe, Se, -1.0); |
| 3187 | s << "#PLASTIC_HINGE_ROTATION " << vp[1] << " " << vp[2] << " " << 0.1*L << " " << 0.1*L << endln; |
| 3188 | /* |
| 3189 | // allocate array of vectors to store section coordinates and displacements |
| 3190 | static int maxNumSections = 0; |
| 3191 | static Vector *coords = 0; |
| 3192 | static Vector *displs = 0; |
| 3193 | if (maxNumSections < numSections) { |
| 3194 | if (coords != 0) |
| 3195 | delete [] coords; |
| 3196 | if (displs != 0) |
| 3197 | delete [] displs; |
| 3198 | |
| 3199 | coords = new Vector [numSections]; |
| 3200 | displs = new Vector [numSections]; |
| 3201 | |
| 3202 | if (!coords) { |
| 3203 | opserr << "NLBeamColumn3d::Print() -- failed to allocate coords array"; |
| 3204 | exit(-1); |
| 3205 | } |
no test coverage detected