| 1112 | } |
| 1113 | |
| 1114 | void |
| 1115 | FiberSectionAsym3d::Print(OPS_Stream &s, int flag) |
| 1116 | { |
| 1117 | if (flag == OPS_PRINT_PRINTMODEL_SECTION || flag == OPS_PRINT_PRINTMODEL_MATERIAL) { |
| 1118 | s << "\nFiberSectionAsym3d, tag: " << this->getTag() << endln; |
| 1119 | s << "\tSection code: " << code; |
| 1120 | s << "\tNumber of Fibers: " << numFibers << endln; |
| 1121 | s << "\tCentroid: (" << -yBar << ", " << zBar << ')' << endln; |
| 1122 | if (theTorsion != 0) |
| 1123 | theTorsion->Print(s, flag); |
| 1124 | |
| 1125 | if (flag == OPS_PRINT_PRINTMODEL_MATERIAL) { |
| 1126 | for (int i = 0; i < numFibers; i++) { |
| 1127 | s << "\nLocation (y, z) = (" << matData[3*i] << ", " << matData[3*i+1] << ")"; |
| 1128 | s << "\nArea = " << matData[3*i+2] << endln; |
| 1129 | theMaterials[i]->Print(s, flag); |
| 1130 | |
| 1131 | } |
| 1132 | } |
| 1133 | } |
| 1134 | if (flag == 3) { |
| 1135 | for (int i = 0; i < numFibers; i++) { |
| 1136 | s << theMaterials[i]->getTag() << " " << matData[3*i] << " " << matData[3*i+1] << " " << matData[3*i+2] << " " ; |
| 1137 | s << theMaterials[i]->getStress() << " " << theMaterials[i]->getStrain() << endln; |
| 1138 | } |
| 1139 | } |
| 1140 | |
| 1141 | if (flag == 4) { |
| 1142 | for (int i = 0; i < numFibers; i++) { |
| 1143 | s << "add fiber # " << i+1 << " using material # " << theMaterials[i]->getTag() << " to section # 1\n"; |
| 1144 | s << "fiber_cross_section = " << matData[3*i+2] << "*m^2\n"; |
| 1145 | s << "fiber_location = (" << matData[3*i] << "*m, " << matData[3*i+1] << "*m);\n\n"; |
| 1146 | } |
| 1147 | } |
| 1148 | |
| 1149 | if (flag == OPS_PRINT_PRINTMODEL_JSON) { |
| 1150 | s << "\t\t\t{"; |
| 1151 | s << "\"name\": \"" << this->getTag() << "\", "; |
| 1152 | s << "\"type\": \"FiberSectionAsym3d\", "; |
| 1153 | if (theTorsion != 0) |
| 1154 | s << "\"torsion\": " << theTorsion->getInitialTangent() << ", "; |
| 1155 | s << "\"fibers\": [\n"; |
| 1156 | for (int i = 0; i < numFibers; i++) { |
| 1157 | s << "\t\t\t\t{\"coord\": [" << matData[3*i] << ", " << matData[3*i+1] << "], "; |
| 1158 | s << "\"area\": " << matData[3*i+2] << ", "; |
| 1159 | s << "\"material\": \"" << theMaterials[i]->getTag() << "\""; |
| 1160 | if (i < numFibers - 1) |
| 1161 | s << "},\n"; |
| 1162 | else |
| 1163 | s << "}\n"; |
| 1164 | } |
| 1165 | s << "\t\t\t]}"; |
| 1166 | } |
| 1167 | } |
| 1168 | |
| 1169 | Response* |
| 1170 | FiberSectionAsym3d::setResponse(const char **argv, int argc, OPS_Stream &output) |
nothing calls this directly
no test coverage detected