| 1342 | |
| 1343 | |
| 1344 | int |
| 1345 | FiberSection3d::getResponse(int responseID, Information §Info) |
| 1346 | { |
| 1347 | static double yLocs[10000]; |
| 1348 | static double zLocs[10000]; |
| 1349 | static double fiberArea[10000]; |
| 1350 | |
| 1351 | if (sectionIntegr != 0) { |
| 1352 | sectionIntegr->getFiberLocations(numFibers, yLocs, zLocs); |
| 1353 | } |
| 1354 | else { |
| 1355 | for (int i = 0; i < numFibers; i++) { |
| 1356 | yLocs[i] = matData[3*i]; |
| 1357 | zLocs[i] = matData[3*i+1]; |
| 1358 | fiberArea[i] = matData[3*i+2]; |
| 1359 | } |
| 1360 | } |
| 1361 | |
| 1362 | if (responseID == 5) { |
| 1363 | int numData = 5*numFibers; |
| 1364 | Vector data(numData); |
| 1365 | int count = 0; |
| 1366 | for (int j = 0; j < numFibers; j++) { |
| 1367 | data(count) = yLocs[j]; // y |
| 1368 | data(count+1) = zLocs[j]; // z |
| 1369 | data(count+2) = fiberArea[j]; // A |
| 1370 | data(count+3) = theMaterials[j]->getStress(); |
| 1371 | data(count+4) = theMaterials[j]->getStrain(); |
| 1372 | count += 5; |
| 1373 | } |
| 1374 | return sectInfo.setVector(data); |
| 1375 | } else if (responseID == 55) { |
| 1376 | int numData = 6*numFibers; |
| 1377 | Vector data(numData); |
| 1378 | int count = 0; |
| 1379 | for (int j = 0; j < numFibers; j++) { |
| 1380 | data(count) = yLocs[j]; // y |
| 1381 | data(count+1) = zLocs[j]; // z |
| 1382 | data(count+2) = fiberArea[j]; // A |
| 1383 | data(count+3) = (double)theMaterials[j]->getTag(); |
| 1384 | data(count+4) = theMaterials[j]->getStress(); |
| 1385 | data(count+5) = theMaterials[j]->getStrain(); |
| 1386 | count += 6; |
| 1387 | } |
| 1388 | return sectInfo.setVector(data); |
| 1389 | } else if (responseID == 6) { |
| 1390 | int count = 0; |
| 1391 | for (int j = 0; j < numFibers; j++) { |
| 1392 | if (theMaterials[j]->hasFailed() == true) |
| 1393 | count++; |
| 1394 | } |
| 1395 | return sectInfo.setInt(count); |
| 1396 | } else if (responseID == 7) { |
| 1397 | int count = 0; |
| 1398 | for (int j = 0; j < numFibers; j++) { |
| 1399 | if (theMaterials[j]->hasFailed() == true) { |
| 1400 | count+=1; |
| 1401 | } |