Skip to content

Commit

Permalink
Update shell elements to support 7 failure values
Browse files Browse the repository at this point in the history
  • Loading branch information
A-CGray committed Jul 9, 2024
1 parent c1f571f commit 4a89b75
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
16 changes: 9 additions & 7 deletions src/elements/TACSElementTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ int TacsGetOutputComponentCount(ElementType etype, int comp) {
} else if (comp == TACS_OUTPUT_STRESSES) {
return 9;
} else if (comp == TACS_OUTPUT_EXTRAS) {
return 13;
return 14;
} else if (comp == TACS_OUTPUT_LOADS) {
return 6;
}
Expand Down Expand Up @@ -310,18 +310,20 @@ const char *TacsGetOutputComponentName(ElementType etype, int comp, int index) {
case 5:
return "failure5";
case 6:
return "dv1";
return "failure6";
case 7:
return "dv2";
return "dv1";
case 8:
return "dv3";
return "dv2";
case 9:
return "dv4";
return "dv3";
case 10:
return "dv5";
return "dv4";
case 11:
return "dv6";
return "dv5";
case 12:
return "dv6";
case 13:
return "dv7";
default:
return NULL;
Expand Down
22 changes: 8 additions & 14 deletions src/elements/shell/TACSShellElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -1487,20 +1487,14 @@ void TACSShellElement<quadrature, basis, director, model>::getOutputData(
data += 9;
}
if (write_flag & TACS_OUTPUT_EXTRAS) {
data[0] = con->evalFailureFieldValue(elemIndex, pt, X, e, 0);
data[1] = con->evalFailureFieldValue(elemIndex, pt, X, e, 1);
data[2] = con->evalFailureFieldValue(elemIndex, pt, X, e, 2);
data[3] = con->evalFailureFieldValue(elemIndex, pt, X, e, 3);
data[4] = con->evalFailureFieldValue(elemIndex, pt, X, e, 4);
data[5] = con->evalFailureFieldValue(elemIndex, pt, X, e, 5);
data[6] = con->evalDesignFieldValue(elemIndex, pt, X, 0);
data[7] = con->evalDesignFieldValue(elemIndex, pt, X, 1);
data[8] = con->evalDesignFieldValue(elemIndex, pt, X, 2);
data[9] = con->evalDesignFieldValue(elemIndex, pt, X, 3);
data[10] = con->evalDesignFieldValue(elemIndex, pt, X, 4);
data[11] = con->evalDesignFieldValue(elemIndex, pt, X, 5);
data[12] = con->evalDesignFieldValue(elemIndex, pt, X, 6);
data += 13;
for (int failInd = 0; failInd < 7; failInd++) {
data[failInd] =
con->evalFailureFieldValue(elemIndex, pt, X, e, failInd);
}
for (int dvInd = 0; dvInd < 7; dvInd++) {
data[dvInd + 7] = con->evalDesignFieldValue(elemIndex, pt, X, dvInd);
}
data += 14;
}
}
}
Expand Down

0 comments on commit 4a89b75

Please sign in to comment.