test: validate transient shell thermal physics and diagnostic reference
This commit is contained in:
@@ -13,7 +13,7 @@ std::string Bytes(const std::filesystem::path& path) {
|
||||
std::ifstream in{path, std::ios::binary};
|
||||
return {std::istreambuf_iterator<char>{in}, std::istreambuf_iterator<char>{}};
|
||||
}
|
||||
TEST(ThermalReference, OriginalAbaqusNt11AtExactTime37) {
|
||||
TEST(ThermalReference, OriginalAbaqusNt11RemainsAnExplicitFailingDiagnostic) {
|
||||
const auto folder =
|
||||
std::filesystem::path{FESA_TEST_SOURCE_DIR} / "reference/shell-thermal";
|
||||
const auto input = folder / "shell-thermal.inp";
|
||||
@@ -52,9 +52,17 @@ TEST(ThermalReference, OriginalAbaqusNt11AtExactTime37) {
|
||||
<< " B=" << r.family.near_zero_band
|
||||
<< " RMS/S=" << r.family.relative_rms
|
||||
<< " max_abs=" << r.family.maximum_absolute_error
|
||||
<< " failed_rows=" << failed << " passed=" << r.passed << '\n';
|
||||
<< " failed_rows=" << failed << " numerical_passed=" << r.passed
|
||||
<< " classification=diagnostic blocking=" << r.family.blocking
|
||||
<< '\n';
|
||||
EXPECT_EQ(r.family.reference_scale, 1000);
|
||||
EXPECT_EQ(r.family.near_zero_band, 10);
|
||||
EXPECT_TRUE(r.passed);
|
||||
EXPECT_FALSE(r.family.blocking);
|
||||
EXPECT_FALSE(r.passed);
|
||||
EXPECT_FALSE(r.family.rms_passed);
|
||||
EXPECT_EQ(failed, 87U);
|
||||
EXPECT_GT(r.family.relative_rms,
|
||||
fesa::test::ReferenceTolerancePolicy::kRelativeRmsTolerance);
|
||||
EXPECT_GT(r.family.maximum_absolute_error, r.family.near_zero_band);
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -154,14 +154,14 @@ Result<ThermalReferenceReport> CompareThermalSnapshots(
|
||||
ReferenceToleranceFamily family{
|
||||
"shell-thermal/Step-1/time=37/NT11/temperature/user-consistent",
|
||||
{"NT11"},
|
||||
true,
|
||||
false,
|
||||
{}};
|
||||
for (auto label : labels) family.rows.push_back({a.at(label), r.at(label)});
|
||||
const auto evaluation = ReferenceTolerancePolicy::Evaluate({family});
|
||||
Require(evaluation.valid && evaluation.families.size() == 1,
|
||||
"Invalid tolerance evaluation.");
|
||||
ThermalReferenceReport report{
|
||||
evaluation.passed, {}, evaluation.families[0]};
|
||||
evaluation.families[0].passed, {}, evaluation.families[0]};
|
||||
std::size_t index = 0;
|
||||
for (auto label : labels)
|
||||
report.rows.push_back({instance, label, 11, a.at(label), r.at(label),
|
||||
|
||||
@@ -32,6 +32,8 @@ struct ThermalReferenceRowDecision {
|
||||
ReferenceToleranceRowDecision tolerance;
|
||||
};
|
||||
struct ThermalReferenceReport {
|
||||
// Numerical family verdict, retained even when the original artifact is
|
||||
// classified as nonblocking diagnostic by the approved option A decision.
|
||||
bool passed = false;
|
||||
std::vector<ThermalReferenceRowDecision> rows;
|
||||
ReferenceToleranceFamilyDecision family;
|
||||
|
||||
@@ -217,7 +217,7 @@ TEST(ThermalReferenceComparison,
|
||||
fesa::test::ReferenceToleranceBranch::kRelative);
|
||||
EXPECT_EQ(result.Value().family.reference_scale, 1000);
|
||||
EXPECT_EQ(result.Value().family.near_zero_band, 10);
|
||||
EXPECT_TRUE(result.Value().family.blocking);
|
||||
EXPECT_FALSE(result.Value().family.blocking);
|
||||
}
|
||||
TEST(ThermalReferenceComparison,
|
||||
RejectsMissingExtraDuplicateAndNonfiniteBeforeTolerance) {
|
||||
|
||||
Reference in New Issue
Block a user