| 1332 | #define RESPONSETYPE_IGAWeight 6 |
| 1333 | |
| 1334 | Response* |
| 1335 | IGASurfacePatch::setResponse(const char **argv, int argc, OPS_Stream &output) |
| 1336 | { |
| 1337 | |
| 1338 | Response* theResponse = 0; |
| 1339 | |
| 1340 | opserr << "IGASurfacePatch::setResponse - start argv list - argc = " << argc << endln; |
| 1341 | for (int i = 0; i < argc; ++i) |
| 1342 | { |
| 1343 | opserr << "argv[" << i << "] = " << argv[i] << endln; |
| 1344 | } |
| 1345 | opserr << "IGASurfacePatch::setResponse - end argv list - argc = " << argc << endln; |
| 1346 | |
| 1347 | // 1 - OPEN THE ELEMENT TAG |
| 1348 | output.tag("ElementOutput"); |
| 1349 | output.attr("eleType", "IGASurfacePatch"); |
| 1350 | output.attr("eleTag", this->getTag()); |
| 1351 | int numNodes = this->getNumExternalNodes(); |
| 1352 | const ID& nodes = this->getExternalNodes(); |
| 1353 | static char nodeData[32]; |
| 1354 | |
| 1355 | for (int i = 0; i < numNodes; i++) { |
| 1356 | sprintf(nodeData, "node%d", i + 1); |
| 1357 | output.attr(nodeData, nodes(i)); |
| 1358 | } |
| 1359 | |
| 1360 | if (strcmp(argv[0], "material") == 0 ){ |
| 1361 | |
| 1362 | // const Vector& data(numNodes); |
| 1363 | for (int i = 0; i < numNodes; i++) { |
| 1364 | sprintf(nodeData, "P%d", i + 1); |
| 1365 | output.tag("ResponseType", nodeData); |
| 1366 | } |
| 1367 | theResponse = new ElementResponse(this, RESPONSETYPE_IGASurfacePatch_NODELUMPED, Vector(numNodes)); |
| 1368 | } else if (strcmp(argv[0], "IGAOrder" ) == 0) { |
| 1369 | theResponse = new ElementResponse(this, RESPONSETYPE_IGAOrder, ID(2)); // IGASurfacePatch is 2d |
| 1370 | } else if (strcmp(argv[0], "IGAKnot1P" ) == 0) { |
| 1371 | theResponse = new ElementResponse(this, RESPONSETYPE_IGAKnot1P, Vector(noPtsX)); |
| 1372 | } else if (strcmp(argv[0], "IGAKnot2P" ) == 0) { |
| 1373 | theResponse = new ElementResponse(this, RESPONSETYPE_IGAKnot2P, Vector(noPtsY)); |
| 1374 | } else if (strcmp(argv[0], "IGAKnot3P" ) == 0) { |
| 1375 | theResponse = new ElementResponse(this, RESPONSETYPE_IGAKnot3P, Vector(0)); // No 3rd dim in this patch |
| 1376 | } else if (strcmp(argv[0], "IGAWeight" ) == 0) { |
| 1377 | theResponse = new ElementResponse(this, RESPONSETYPE_IGAWeight, Vector(noPts)); |
| 1378 | } |
| 1379 | output.endTag(); |
| 1380 | |
| 1381 | return theResponse; |
| 1382 | } |
| 1383 | |
| 1384 | |
| 1385 | int |
no test coverage detected