Skip to content

Commit

Permalink
Increase number of extra output quantities available for shell elemen…
Browse files Browse the repository at this point in the history
…ts so we can write out all the BladeStiffenedShell DVs
  • Loading branch information
A-CGray committed May 19, 2023
1 parent 3e7a63f commit a49fbf4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
11 changes: 10 additions & 1 deletion src/constitutive/TACSBladeStiffenedShellConstitutive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1199,12 +1199,21 @@ void TACSBladeStiffenedShellConstitutive::addFailureDVSens(
// Retrieve the design variable for plotting purposes
TacsScalar TACSBladeStiffenedShellConstitutive::evalDesignFieldValue(
int elemIndex, const double pt[], const TacsScalar X[], int index) {
// TODO: Implement this
switch (index) {
case 0:
return this->computeEffectiveThickness();
case 1:
return this->computeEffectiveBendingThickness();
case 2:
return this->panelLength;
case 3:
return this->stiffenerPitch;
case 4:
return this->panelThick;
case 5:
return this->stiffenerHeight;
case 6:
return this->stiffenerThick;
}
return 0.0;
}
Expand Down
10 changes: 9 additions & 1 deletion 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 4;
return 8;
} else if (comp == TACS_OUTPUT_LOADS) {
return 6;
}
Expand Down Expand Up @@ -305,6 +305,14 @@ const char *TacsGetOutputComponentName(ElementType etype, int comp, int index) {
return "dv2";
case 3:
return "dv3";
case 4:
return "dv4";
case 5:
return "dv5";
case 6:
return "dv6";
case 7:
return "dv7";
default:
return NULL;
}
Expand Down
6 changes: 5 additions & 1 deletion src/elements/shell/TACSShellElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,11 @@ void TACSShellElement<quadrature, basis, director, model>::getOutputData(
data[1] = con->evalDesignFieldValue(elemIndex, pt, X, 0);
data[2] = con->evalDesignFieldValue(elemIndex, pt, X, 1);
data[3] = con->evalDesignFieldValue(elemIndex, pt, X, 2);
data += 4;
data[4] = con->evalDesignFieldValue(elemIndex, pt, X, 3);
data[5] = con->evalDesignFieldValue(elemIndex, pt, X, 4);
data[6] = con->evalDesignFieldValue(elemIndex, pt, X, 5);
data[7] = con->evalDesignFieldValue(elemIndex, pt, X, 6);
data += 8;
}
}
}
Expand Down

0 comments on commit a49fbf4

Please sign in to comment.