| 1317 | |
| 1318 | |
| 1319 | int |
| 1320 | FiberSectionAsym3d::getResponse(int responseID, Information §Info) |
| 1321 | { |
| 1322 | // Just call the base class method ... don't need to define |
| 1323 | // this function, but keeping it here just for clarity |
| 1324 | if (responseID == 5) { |
| 1325 | int numData = 5*numFibers; |
| 1326 | Vector data(numData); |
| 1327 | int count = 0; |
| 1328 | for (int j = 0; j < numFibers; j++) { |
| 1329 | double yLoc, zLoc, A, stress, strain; |
| 1330 | yLoc = matData[3*j]; |
| 1331 | zLoc = matData[3*j+1]; |
| 1332 | A = matData[3*j+2]; |
| 1333 | stress = theMaterials[j]->getStress(); |
| 1334 | strain = theMaterials[j]->getStrain(); |
| 1335 | data(count) = yLoc; data(count+1) = zLoc; data(count+2) = A; |
| 1336 | data(count+3) = stress; data(count+4) = strain; |
| 1337 | count += 5; |
| 1338 | } |
| 1339 | return sectInfo.setVector(data); |
| 1340 | } else if (responseID == 6) { |
| 1341 | int count = 0; |
| 1342 | for (int j = 0; j < numFibers; j++) { |
| 1343 | if (theMaterials[j]->hasFailed() == true) |
| 1344 | count++; |
| 1345 | } |
| 1346 | return sectInfo.setInt(count); |
| 1347 | } else if (responseID == 7) { |
| 1348 | int count = 0; |
| 1349 | for (int j = 0; j < numFibers; j++) { |
| 1350 | if (theMaterials[j]->hasFailed() == true) { |
| 1351 | count+=1; |
| 1352 | } |
| 1353 | } |
| 1354 | if (count == numFibers) |
| 1355 | count = 1; |
| 1356 | else |
| 1357 | count = 0; |
| 1358 | |
| 1359 | return sectInfo.setInt(count); |
| 1360 | } |
| 1361 | else if (responseID == 20) { |
| 1362 | static Vector centroid(2); |
| 1363 | centroid(0) = yBar; |
| 1364 | centroid(1) = zBar; |
| 1365 | return sectInfo.setVector(centroid); |
| 1366 | } |
| 1367 | |
| 1368 | return SectionForceDeformation::getResponse(responseID, sectInfo); |
| 1369 | } |
| 1370 | |
| 1371 | int |
| 1372 | FiberSectionAsym3d::setParameter(const char **argv, int argc, Parameter ¶m) |