Skip to content

Commit e9fddb6

Browse files
authored
Merge pull request OpenSees#1721 from mhscott/mpco-recorder
Mpco recorder
2 parents 11d0420 + 2c4e00e commit e9fddb6

2 files changed

Lines changed: 31 additions & 4 deletions

File tree

SRC/element/twoNodeLink/TwoNodeLinkSection.cpp

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,9 +1034,31 @@ Response* TwoNodeLinkSection::setResponse(const char **argv, int argc,
10341034
}
10351035
// material output
10361036
else if (strcmp(argv[0],"section") == 0) {
1037-
if (argc > 1) {
1038-
theResponse = theSection->setResponse(&argv[1], argc-1, output);
1039-
}
1037+
if (argc > 1) {
1038+
// we need at least one more argument otherwise
1039+
// there is no need to forward this call to the material
1040+
if (argc > 2) {
1041+
// if we have 2 or more extra arguments, the first one
1042+
// could be an integer. In this case we check to see if it is the section id
1043+
// (only 1 in this case)
1044+
int sectionNum = atoi(argv[1]);
1045+
if (sectionNum == 0) {
1046+
// if it is not a number we forward the call to the section as usual
1047+
theResponse = theSection->setResponse(&argv[1], argc - 1, output);
1048+
}
1049+
else {
1050+
// it is a number. Now we have to make sure it is within the allowed range
1051+
// for this element (in this case it can only be 1)
1052+
if (sectionNum == 1) {
1053+
theResponse = theSection->setResponse(&argv[2], argc - 2, output);
1054+
}
1055+
}
1056+
}
1057+
else {
1058+
// otherwise forward it as usual
1059+
theResponse = theSection->setResponse(&argv[1], argc - 1, output);
1060+
}
1061+
}
10401062
}
10411063

10421064
if (strcmp(argv[0],"xaxis") == 0) {

SRC/recorder/MPCORecorder.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3870,6 +3870,8 @@ namespace mpco {
38703870
elem_class_tag == ELE_TAG_ZeroLengthContact3D ||
38713871
elem_class_tag == ELE_TAG_ZeroLengthContactASDimplex ||
38723872
elem_class_tag == ELE_Tag_ZeroLengthImpact3D ||
3873+
// ./twoNodeLink
3874+
elem_class_tag == ELE_TAG_TwoNodeLinkSection ||
38733875
// ./elasticBeamColumn
38743876
elem_class_tag == ELE_TAG_ElasticBeam2d ||
38753877
elem_class_tag == ELE_TAG_ElasticBeam3d ||
@@ -3915,7 +3917,10 @@ namespace mpco {
39153917
elem_class_tag == ELE_TAG_ForceBeamColumn2d || /* <- OK! this one defines everything ! good job*/
39163918
elem_class_tag == ELE_TAG_ForceBeamColumn3d || /* <- OK! this one defines everything ! good job*/
39173919
elem_class_tag == ELE_TAG_ForceBeamColumnCBDI2d || /* <- OK! this one defines everything ! good job*/
3918-
elem_class_tag == ELE_TAG_ForceBeamColumnWarping2d /* <- OK! this one defines everything ! good job*/
3920+
elem_class_tag == ELE_TAG_ForceBeamColumnWarping2d || /* <- OK! this one defines everything ! good job*/
3921+
// ./mixedBeamColumn
3922+
elem_class_tag == ELE_TAG_MixedBeamColumn2d ||
3923+
elem_class_tag == ELE_TAG_MixedBeamColumn3d
39193924
) {
39203925
geom_type = ElementGeometryType::Line_2N;
39213926
int_type = ElementIntegrationRuleType::CustomIntegrationRule;

0 commit comments

Comments
 (0)