feat: add thermal semantic domain model

This commit is contained in:
KOKO\Mimi
2026-09-29 18:33:44 +09:00
parent e6fd9e9e6b
commit 254247efc1
11 changed files with 755 additions and 2 deletions
+95
View File
@@ -0,0 +1,95 @@
#ifndef FESA_ELEMENTS_DS4_THERMAL_H_
#define FESA_ELEMENTS_DS4_THERMAL_H_
#include <array>
#include <utility>
#include <vector>
#include "fesa/elements/element_definition.h"
namespace fesa {
/// @brief Defines one four-node uncoupled transient thermal DS4 element.
/// @note This semantic definition contains no geometry kernel or equation
/// state.
class Ds4ThermalDefinition final : public ElementDefinition {
public:
Ds4ThermalDefinition(SourceEntityId source_id,
std::array<EntityIndex, 4> node_indices,
EntityIndex section_index, SourceLocation location);
ElementDefinitionKind Kind() const noexcept override;
const SourceEntityId& SourceId() const noexcept override;
std::string_view SourceElementType() const noexcept override;
const std::vector<EntityIndex>& NodeIndices() const noexcept override;
EntityIndex MaterialIndex() const noexcept override;
EntityIndex PropertyIndex() const noexcept override;
/// @brief Returns the stable thermal-section collection position.
EntityIndex ThermalSectionIndex() const noexcept;
/// @brief Returns the source location defining this element.
const SourceLocation& Location() const noexcept;
private:
friend class Domain;
void BindMaterialIndex(EntityIndex material_index) noexcept;
SourceEntityId source_id_;
std::array<EntityIndex, 4> node_indices_;
std::vector<EntityIndex> node_indices_view_;
EntityIndex section_index_;
EntityIndex material_index_{0U};
SourceLocation location_;
};
inline Ds4ThermalDefinition::Ds4ThermalDefinition(
SourceEntityId source_id, std::array<EntityIndex, 4> node_indices,
EntityIndex section_index, SourceLocation location)
: source_id_{std::move(source_id)},
node_indices_{node_indices},
node_indices_view_{node_indices.begin(), node_indices.end()},
section_index_{section_index},
location_{std::move(location)} {}
inline ElementDefinitionKind Ds4ThermalDefinition::Kind() const noexcept {
return ElementDefinitionKind::kDs4Thermal;
}
inline const SourceEntityId& Ds4ThermalDefinition::SourceId() const noexcept {
return source_id_;
}
inline std::string_view Ds4ThermalDefinition::SourceElementType() const noexcept {
return "DS4";
}
inline const std::vector<EntityIndex>& Ds4ThermalDefinition::NodeIndices()
const noexcept {
return node_indices_view_;
}
inline EntityIndex Ds4ThermalDefinition::MaterialIndex() const noexcept {
return material_index_;
}
inline EntityIndex Ds4ThermalDefinition::PropertyIndex() const noexcept {
return section_index_;
}
inline EntityIndex Ds4ThermalDefinition::ThermalSectionIndex() const noexcept {
return section_index_;
}
inline const SourceLocation& Ds4ThermalDefinition::Location() const noexcept {
return location_;
}
inline void Ds4ThermalDefinition::BindMaterialIndex(
EntityIndex material_index) noexcept {
material_index_ = material_index;
}
} // namespace fesa
#endif // FESA_ELEMENTS_DS4_THERMAL_H_
+1 -1
View File
@@ -9,7 +9,7 @@
namespace fesa {
/// @brief Identifies the supported semantic element-definition kinds.
enum class ElementDefinitionKind { kEulerBeam3D, kMitc4Shell };
enum class ElementDefinitionKind { kEulerBeam3D, kMitc4Shell, kDs4Thermal };
/// @brief Provides immutable source identity and topology for one element.
/// @note Numerical stiffness, recovery, and equation ids are intentionally