61 lines
2.0 KiB
C++
61 lines
2.0 KiB
C++
#ifndef FESA_ELEMENTS_MITC4_SHELL_DEFINITION_H_
|
|
#define FESA_ELEMENTS_MITC4_SHELL_DEFINITION_H_
|
|
|
|
#include <array>
|
|
#include <string_view>
|
|
#include <vector>
|
|
|
|
#include "fesa/elements/element_definition.h"
|
|
|
|
namespace fesa {
|
|
|
|
class Domain;
|
|
|
|
/// @brief Preserves the source shell type independently of formulation.
|
|
enum class ShellSourceElementType { kS4, kS4r };
|
|
|
|
/// @brief Names the internal shell formulation selected by S4 and S4R.
|
|
inline constexpr std::string_view kMitc4InternalFormulation{"FESA-MITC4"};
|
|
|
|
/// @brief Defines one four-node S4/S4R semantic element.
|
|
class Mitc4ShellDefinition final : public ElementDefinition {
|
|
public:
|
|
/// @brief Constructs a parser-validated semantic definition.
|
|
Mitc4ShellDefinition(SourceEntityId source_id,
|
|
ShellSourceElementType source_type,
|
|
std::array<EntityIndex, 4> node_indices,
|
|
EntityIndex material_index, 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;
|
|
|
|
SourceEntityId source_id;
|
|
ShellSourceElementType source_type;
|
|
std::array<EntityIndex, 4> node_indices;
|
|
EntityIndex material_index;
|
|
EntityIndex section_index;
|
|
SourceLocation location;
|
|
|
|
private:
|
|
friend class Domain;
|
|
|
|
/// @brief Rebinds a shell-local section index to the unified property view.
|
|
void SetPropertyIndex(EntityIndex property_index) noexcept;
|
|
|
|
/// @brief Synchronizes the base view after parser-candidate construction.
|
|
void SynchronizeNodeIndices();
|
|
|
|
EntityIndex property_index_;
|
|
std::vector<EntityIndex> node_indices_view_;
|
|
};
|
|
|
|
|
|
} // namespace fesa
|
|
|
|
#endif // FESA_ELEMENTS_MITC4_SHELL_DEFINITION_H_
|