feat: integrate Solid source and three-DOF semantics

This commit is contained in:
KOKO\Mimi
2026-10-09 01:34:03 +09:00
16 changed files with 1592 additions and 102 deletions
+6 -1
View File
@@ -9,7 +9,12 @@
namespace fesa {
/// @brief Identifies the supported semantic element-definition kinds.
enum class ElementDefinitionKind { kEulerBeam3D, kMitc4Shell, kDs4Thermal };
enum class ElementDefinitionKind {
kEulerBeam3D,
kMitc4Shell,
kDs4Thermal,
kHex8
};
/// @brief Provides immutable source identity and topology for one element.
/// @note Numerical stiffness, recovery, and equation ids are intentionally
+58
View File
@@ -0,0 +1,58 @@
#ifndef FESA_ELEMENTS_HEX8_DEFINITION_H_
#define FESA_ELEMENTS_HEX8_DEFINITION_H_
#include <array>
#include <utility>
#include <vector>
#include "fesa/elements/element_definition.h"
namespace fesa {
/// @brief Owns source-safe eight-node Solid topology without numerical state.
class Hex8Definition final : public ElementDefinition {
public:
/// @brief Constructs a semantic candidate in source connectivity order.
Hex8Definition(SourceEntityId source, std::array<EntityIndex, 8> nodes,
EntityIndex material, EntityIndex section,
SourceLocation source_location)
: source_id{std::move(source)},
node_indices{nodes},
material_index{material},
section_index{section},
location{std::move(source_location)},
property_index_{section},
node_indices_view_{nodes.begin(), nodes.end()} {}
ElementDefinitionKind Kind() const noexcept override {
return ElementDefinitionKind::kHex8;
}
const SourceEntityId& SourceId() const noexcept override { return source_id; }
std::string_view SourceElementType() const noexcept override {
return "C3D8";
}
const std::vector<EntityIndex>& NodeIndices() const noexcept override {
return node_indices_view_;
}
EntityIndex MaterialIndex() const noexcept override { return material_index; }
EntityIndex PropertyIndex() const noexcept override {
return property_index_;
}
SourceEntityId source_id;
std::array<EntityIndex, 8> node_indices;
EntityIndex material_index;
EntityIndex section_index;
SourceLocation location;
private:
friend class Domain;
/// @brief Synchronizes candidate topology with the immutable base view.
void SynchronizeNodeIndices() {
node_indices_view_.assign(node_indices.begin(), node_indices.end());
}
/// @brief Binds the local Solid section to the unified property collection.
void SetPropertyIndex(EntityIndex index) noexcept { property_index_ = index; }
EntityIndex property_index_;
std::vector<EntityIndex> node_indices_view_;
};
} // namespace fesa
#endif // FESA_ELEMENTS_HEX8_DEFINITION_H_