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

Method getVariable

SRC/material/section/SectionAggregator.cpp:1088–1117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1086
1087
1088int
1089SectionAggregator::getVariable(const char *argv, Information &info)
1090{
1091
1092 info.theDouble = 0.0;
1093 int i;
1094 int order = numMats;
1095 if (theSection != 0)
1096 order += theSection->getOrder();
1097
1098 const Vector &e = this->getSectionDeformation();
1099 const ID &code = this->getType();
1100
1101 if (strcmp(argv,"axialStrain") == 0) {
1102 for (i = 0; i < order; i++)
1103 if (code(i) == SECTION_RESPONSE_P)
1104 info.theDouble += e(i);
1105 } else if (strcmp(argv,"curvatureZ") == 0) {
1106 for (i = 0; i < order; i++)
1107 if (code(i) == SECTION_RESPONSE_MZ)
1108 info.theDouble += e(i);
1109 } else if (strcmp(argv,"curvatureY") == 0) {
1110 for (i = 0; i < order; i++)
1111 if (code(i) == SECTION_RESPONSE_MY)
1112 info.theDouble += e(i);
1113 } else
1114 return -1;
1115
1116 return 0;
1117}
1118
1119// AddingSensitivity:BEGIN ////////////////////////////////////
1120int

Calls 2

getOrderMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected