[FEM] Elmer: fix eigenmode results for point filter

Elmers' eigenmode results have a different result name
This commit is contained in:
Uwe
2022-07-31 04:30:31 +02:00
parent a6fbd74cae
commit 7c382f7c09

View File

@@ -1099,15 +1099,24 @@ void TaskPostDataAtPoint::on_Field_activated(int i) {
return;
}
static_cast<Fem::FemPostDataAtPointFilter*>(getObject())->FieldName.setValue(FieldName);
if ((FieldName == "von Mises Stress") || (FieldName == "Tresca Stress")
// Set the unit for the different known result types.
// For the Elmer EigenModes, the names are different and unique. For them we only check
// the beginning of the name.
if ( (FieldName == "von Mises Stress") || (FieldName == "Tresca Stress")
|| (FieldName == "Major Principal Stress") || (FieldName == "Intermediate Principal Stress")
|| (FieldName == "Minor Principal Stress")
|| (FieldName == "Stress xx component") || (FieldName == "Stress xy component")
|| (FieldName == "Stress xz component") || (FieldName == "Stress yy component")
|| (FieldName == "Stress yz component") || (FieldName == "Stress zz component")) {
|| (FieldName == "Stress yz component") || (FieldName == "Stress zz component")
|| (FieldName.find("tresca Eigen", 0) == 0) || (FieldName.find("vonmises Eigen", 0) == 0)
|| (FieldName.find("stress_", 0) == 0)
|| (FieldName.find("principal stress Eigen", 0) == 0) ) {
static_cast<Fem::FemPostDataAtPointFilter*>(getObject())->Unit.setValue("Pa");
}
else if ((FieldName == "Displacement") || (FieldName == "Displacement Magnitude")) {
else if ( (FieldName == "Displacement") || (FieldName == "Displacement Magnitude")
|| (FieldName.find("displacement Eigen", 0) == 0) ) {
static_cast<Fem::FemPostDataAtPointFilter*>(getObject())->Unit.setValue("m");
}
else if (FieldName == "Temperature") {