Skip to content

Commit

Permalink
Fix to prev commit so that failure0 is the aggregated failure value
Browse files Browse the repository at this point in the history
  • Loading branch information
A-CGray committed Jul 8, 2024
1 parent e1cbe43 commit 0fb8ab1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/constitutive/TACSBladeStiffenedShellConstitutive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1228,12 +1228,15 @@ TacsScalar TACSBladeStiffenedShellConstitutive::evalDesignFieldValue(
TacsScalar TACSBladeStiffenedShellConstitutive::evalFailureFieldValue(
int elemIndex, const double pt[], const TacsScalar X[],
const TacsScalar strain[], int failIndex) {
if (failIndex < 0 || failIndex >= this->NUM_FAILURES) {
if (failIndex == 0) {
return this->evalFailure(elemIndex, pt, X, strain);
} else if (failIndex >= 1 && failIndex <= this->NUM_FAILURES) {
TacsScalar fails[this->NUM_FAILURES];
computeFailureValues(strain, fails);
return fails[failIndex - 1];
} else {
return 0.0;
}
TacsScalar fails[this->NUM_FAILURES];
computeFailureValues(strain, fails);
return fails[failIndex];
}

TacsScalar
Expand Down

0 comments on commit 0fb8ab1

Please sign in to comment.