Connect HHT field convergence to production acceptance and v2 logs
This commit is contained in:
@@ -669,4 +669,39 @@ TEST(HhtDynamicAlgebra, RejectsAdmissibleNullRankChangeBeforeAcceptingFrame) {
|
||||
EXPECT_EQ(frame.hidden_constraint[0], 23.0);
|
||||
}
|
||||
|
||||
TEST(HhtEndpointFields, MeasuresActualFullChartAcrossNonlinearRootAndPartialBoundary) {
|
||||
const auto fixture = MakeFixture(1U, true);
|
||||
auto trial = EmptyTrial(fixture), old = EmptyTrial(fixture);
|
||||
trial.residual = fesa::Vector{24U};
|
||||
fesa::Vector previous{24U};
|
||||
// Independent nonlinear graph q_phiZ=p^2: p .1 -> .2. The
|
||||
// previous tangent lift is .02, while the actual endpoint change is .03.
|
||||
previous[0] = .1; previous[5] = .01;
|
||||
trial.generalized_coordinates[0] = .2;
|
||||
trial.generalized_coordinates[5] = .04;
|
||||
trial.residual[0] = 3; trial.residual[5] = -5;
|
||||
// Large constrained values and spatial support moments are not free
|
||||
// generalized endpoint evidence and cannot change either scalar maximum.
|
||||
trial.generalized_coordinates[3] = 1000;
|
||||
trial.residual[3] = 2000;
|
||||
trial.reaction = fesa::Vector{24U}; trial.reaction[5] = 3000;
|
||||
const auto result = fesa::hht_internal::MeasureEndpointFields(fixture.dofs, trial, old, previous);
|
||||
ASSERT_TRUE(result.HasValue());
|
||||
EXPECT_TRUE(result.Value()[0].active); EXPECT_TRUE(result.Value()[1].active);
|
||||
EXPECT_DOUBLE_EQ(result.Value()[0].residual, 3);
|
||||
EXPECT_DOUBLE_EQ(result.Value()[1].residual, 5);
|
||||
EXPECT_DOUBLE_EQ(result.Value()[0].increment, .2);
|
||||
EXPECT_DOUBLE_EQ(result.Value()[1].increment, .04);
|
||||
EXPECT_DOUBLE_EQ(*result.Value()[0].correction, .2 - .1);
|
||||
EXPECT_DOUBLE_EQ(*result.Value()[1].correction, .04 - .01);
|
||||
EXPECT_NE(*result.Value()[1].correction, 2 * .1 * (.2 - .1));
|
||||
const auto initial = fesa::hht_internal::MeasureEndpointFields(fixture.dofs, trial, old, std::nullopt);
|
||||
ASSERT_TRUE(initial.HasValue());
|
||||
EXPECT_FALSE(initial.Value()[0].correction.has_value());
|
||||
EXPECT_FALSE(initial.Value()[1].correction.has_value());
|
||||
previous[0] = -std::numeric_limits<double>::max();
|
||||
trial.generalized_coordinates[0] = std::numeric_limits<double>::max();
|
||||
EXPECT_FALSE(fesa::hht_internal::MeasureEndpointFields(fixture.dofs, trial, old, previous).HasValue());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user