MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / setResponse

Method setResponse

SRC/element/shell/ASDShellT3.cpp:1342–1476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1340}
1341
1342Response*
1343ASDShellT3::setResponse(const char** argv, int argc, OPS_Stream& output)
1344{
1345 Response* theResponse = 0;
1346
1347 output.tag("ElementOutput");
1348 output.attr("eleType", "ASDShellT3");
1349 output.attr("eleTag", this->getTag());
1350 int numNodes = this->getNumExternalNodes();
1351 const ID& nodes = this->getExternalNodes();
1352 static char nodeData[32];
1353
1354 for (int i = 0; i < numNodes; i++) {
1355 sprintf(nodeData, "node%d", i + 1);
1356 output.attr(nodeData, nodes(i));
1357 }
1358
1359 if (strcmp(argv[0], "force") == 0 || strcmp(argv[0], "forces") == 0 ||
1360 strcmp(argv[0], "globalForce") == 0 || strcmp(argv[0], "globalForces") == 0) {
1361 const Vector& force = this->getResistingForce();
1362 int size = force.Size();
1363 for (int i = 0; i < size; i++) {
1364 sprintf(nodeData, "P%d", i + 1);
1365 output.tag("ResponseType", nodeData);
1366 }
1367 theResponse = new ElementResponse(this, 1, this->getResistingForce());
1368 }
1369
1370 else if (strcmp(argv[0], "material") == 0 || strcmp(argv[0], "Material") == 0 ||
1371 strcmp(argv[0], "section") == 0) {
1372 if (argc < 2) {
1373 opserr << "ASDShellT3::setResponse() - need to specify more data\n";
1374 return 0;
1375 }
1376 int pointNum = atoi(argv[1]);
1377 if (pointNum > 0 && pointNum <= 3) {
1378 output.tag("GaussPoint");
1379 output.attr("number", pointNum);
1380 output.attr("eta", XI[pointNum - 1]);
1381 output.attr("neta", ETA[pointNum - 1]);
1382 int section_pos = m_reduced_integration ? 0 : pointNum - 1;
1383 theResponse = m_sections[section_pos]->setResponse(&argv[2], argc - 2, output);
1384 output.endTag();
1385 }
1386 }
1387 else if (strcmp(argv[0], "stresses") == 0) {
1388
1389 for (int i = 0; i < 3; i++) {
1390 output.tag("GaussPoint");
1391 output.attr("number", i + 1);
1392 output.attr("eta", XI[i]);
1393 output.attr("neta", ETA[i]);
1394
1395 output.tag("SectionForceDeformation");
1396 int section_pos = m_reduced_integration ? 0 : i;
1397 output.attr("classType", m_sections[section_pos]->getClassTag());
1398 output.attr("tag", m_sections[section_pos]->getTag());
1399

Callers

nothing calls this directly

Calls 9

getNumExternalNodesMethod · 0.95
getResistingForceMethod · 0.80
VectorClass · 0.50
tagMethod · 0.45
attrMethod · 0.45
getTagMethod · 0.45
SizeMethod · 0.45
endTagMethod · 0.45
getClassTagMethod · 0.45

Tested by

no test coverage detected