fix: tighten thermal input diagnostics
This commit is contained in:
@@ -147,6 +147,7 @@ TEST(ThermalDomainMapping, RejectsThermalMaterialAndControlForms) {
|
||||
{"7850.,\n", "-1.,\n"},
|
||||
{"*Conductivity\n", "*Conductivity, dependencies=1\n"},
|
||||
{"*Specific Heat\n460.,\n", ""},
|
||||
{"*Specific Heat\n460.,\n", "*Specific Heat\n460.,\n*Elastic\n1., .3\n"},
|
||||
{"*Heat Transfer\n1., 100.\n",
|
||||
"*Heat Transfer, steady state\n1., 100.\n"},
|
||||
{"*Heat Transfer\n1., 100.\n", "*Heat Transfer\n0., 100.\n"},
|
||||
@@ -163,6 +164,22 @@ TEST(ThermalDomainMapping, RejectsThermalMaterialAndControlForms) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(ThermalDomainMapping, RejectsThermalNoOpAndProcedureViolations) {
|
||||
const std::vector<std::pair<std::string, std::string>> cases{
|
||||
{"*Part, name=P",
|
||||
"*Preprint, echo=NO, model=NO, history=NO\n*Part, name=P"},
|
||||
{"1., 100.\n", "1., 100., , , ,\n"},
|
||||
{"*Cflux", "*Static\n.1, 1., .1, 1.\n*Cflux"},
|
||||
{"*End Step", "*Output, field\n*Node Output\nNT\n*End Step"}};
|
||||
for (const auto& test_case : cases) {
|
||||
auto deck = ThermalDeck();
|
||||
const auto position = deck.find(test_case.first);
|
||||
ASSERT_NE(position, std::string::npos);
|
||||
deck.replace(position, test_case.first.size(), test_case.second);
|
||||
EXPECT_FALSE(MapText(deck).HasValue());
|
||||
}
|
||||
}
|
||||
|
||||
TEST(ThermalDomainMapping, AppliesSameDofStepOverrideAndDefaultValues) {
|
||||
auto deck = ThermalDeck();
|
||||
const auto first = deck.find("Bottom, 15, 15, 30.");
|
||||
|
||||
Reference in New Issue
Block a user