fix(abaqus): map inline DS4 sets and reject beam sections

This commit is contained in:
KOKO\Mimi
2026-09-29 20:47:08 +09:00
parent 360f8df01d
commit 203d068951
2 changed files with 136 additions and 2 deletions
+25 -2
View File
@@ -916,7 +916,8 @@ class DomainMappingContext::Impl {
"BEAM GENERAL SECTION follows the part mesh and optional sets.");
return;
}
if (model_element_family_ == ElementFamily::kShell) {
if (model_element_family_ == ElementFamily::kShell ||
model_element_family_ == ElementFamily::kThermalShell) {
InputFailure(
"unsupported-mixed-element-model", block.location,
block.canonical_name, "",
@@ -1006,7 +1007,14 @@ class DomainMappingContext::Impl {
}
void ParseElements(const KeywordBlock& block, RawPart& part) {
if (!ValidateParameters(block, {"TYPE"})) {
const auto* type_parameter = Parameter(block, "TYPE");
const bool thermal_block =
type_parameter && type_parameter->value &&
AsciiCaseInsensitiveEquals(*type_parameter->value, "DS4");
if (!ValidateParameters(block,
thermal_block
? std::vector<std::string_view>{"TYPE", "ELSET"}
: std::vector<std::string_view>{"TYPE"})) {
return;
}
const auto* type = RequiredParameterValue(block, "TYPE");
@@ -1047,6 +1055,17 @@ class DomainMappingContext::Impl {
return;
}
model_element_family_ = element_family;
std::optional<RawSet> inline_set;
if (Parameter(block, "ELSET")) {
const auto* name = RequiredParameterValue(block, "ELSET");
if (name == nullptr) return;
if (ContainsSetName(part.element_sets, *name)) {
InputFailure("duplicate-entity", block.location, block.canonical_name,
*name, "Element-set names are unique within their part.");
return;
}
inline_set = RawSet{*name, {}, block.location};
}
if (block.data.empty()) {
InputFailure(element_family == ElementFamily::kShell
? "invalid-shell-connectivity"
@@ -1105,8 +1124,12 @@ class DomainMappingContext::Impl {
"Element labels are unique within a part.");
return;
}
if (inline_set) inline_set->members.push_back(element.label);
part.elements.push_back(std::move(element));
}
// Inline membership follows the block's source rows and uses the same
// part-set namespace and section resolution as an explicit ELSET.
if (inline_set) part.element_sets.push_back(std::move(*inline_set));
}
void ParseShellSection(const KeywordBlock& block, RawPart& part) {