feat(linear-static-3d-euler-beam): step 12 - inp-domain-mapping-review-fix

This commit is contained in:
KOKO\Mimi
2026-08-09 16:34:48 +09:00
parent 9502ef56b4
commit b1e78bc4cc
3 changed files with 97 additions and 13 deletions
+29 -13
View File
@@ -2026,19 +2026,10 @@ private:
matchingSets.push_back(&set);
}
}
if (matchingSets.size() == 1U) {
return matchingSets.front()->nodeIndices;
}
if (matchingSets.size() > 1U) {
inputFailure(
"unresolved-reference", location, keyword, target,
"The node-set target is ambiguous across identity instances.");
return std::nullopt;
}
std::vector<EntityIndex> matchingNodes;
std::int64_t label = 0;
if (tryPositiveInteger(target, label)) {
std::vector<EntityIndex> matchingNodes;
for (std::size_t index = 0U;
index < definition_.nodes.size();
++index) {
@@ -2046,9 +2037,34 @@ private:
matchingNodes.push_back(static_cast<EntityIndex>(index));
}
}
if (matchingNodes.size() == 1U) {
return matchingNodes;
}
}
// A token is resolved only after both approved interpretations have
// been considered; declaration order never gives a node set priority
// over an equally valid direct source-label target.
if (matchingSets.size() > 1U) {
inputFailure(
"unresolved-reference", location, keyword, target,
"The node-set target is ambiguous across identity instances.");
return std::nullopt;
}
if (matchingNodes.size() > 1U) {
inputFailure(
"unresolved-reference", location, keyword, target,
"The direct node-label target is ambiguous across identity instances.");
return std::nullopt;
}
if (matchingSets.size() == 1U && matchingNodes.size() == 1U) {
inputFailure(
"unresolved-reference", location, keyword, target,
"The target is ambiguous between a node-set name and a direct node label.");
return std::nullopt;
}
if (matchingSets.size() == 1U) {
return matchingSets.front()->nodeIndices;
}
if (matchingNodes.size() == 1U) {
return matchingNodes;
}
inputFailure(
"unresolved-reference", location, keyword, target,