feat(beam-reference-qualification): correlate Abaqus beam results
This commit is contained in:
@@ -64,6 +64,12 @@ std::vector<std::string> split_fields(const std::string_view line) {
|
||||
return fields;
|
||||
}
|
||||
|
||||
void remove_trailing_empty_fields(std::vector<std::string>& fields) {
|
||||
while (!fields.empty() && fields.back().empty()) {
|
||||
fields.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
ReferenceCsvReadResult failure(
|
||||
const DiagnosticStage stage,
|
||||
std::string code,
|
||||
@@ -196,7 +202,7 @@ std::vector<std::string_view> value_columns(
|
||||
case ReferenceQuantity::reaction:
|
||||
return {"RF-RF1", "RF-RF2", "RF-RF3", "RM-RM1", "RM-RM2", "RM-RM3"};
|
||||
case ReferenceQuantity::internal_force:
|
||||
return {"SF-SF1", "SF-SF2", "SF-SF3", "SM-SM1", "SM-SM2", "SM-SM3"};
|
||||
return {"SF-SF1", "SF-SF3", "SF-SF2", "SM-SM3", "SM-SM1", "SM-SM2"};
|
||||
case ReferenceQuantity::centroid_stress:
|
||||
return {"Sxx"};
|
||||
}
|
||||
@@ -283,7 +289,8 @@ ReferenceCsvReadResult read_reference_csv(
|
||||
1U);
|
||||
}
|
||||
|
||||
const std::vector<std::string> headers = split_fields(line);
|
||||
std::vector<std::string> headers = split_fields(line);
|
||||
remove_trailing_empty_fields(headers);
|
||||
ColumnIndices column_indices;
|
||||
for (std::size_t index = 0U; index < headers.size(); ++index) {
|
||||
if (headers[index].empty() ||
|
||||
@@ -340,7 +347,8 @@ ReferenceCsvReadResult read_reference_csv(
|
||||
if (trim(line).empty()) {
|
||||
continue;
|
||||
}
|
||||
const std::vector<std::string> fields = split_fields(line);
|
||||
std::vector<std::string> fields = split_fields(line);
|
||||
remove_trailing_empty_fields(fields);
|
||||
if (fields.size() != headers.size()) {
|
||||
return validation_failure(
|
||||
"validation.reference_csv_invalid_row",
|
||||
|
||||
Reference in New Issue
Block a user