feat(cpp-object-oriented-modular-refactoring): step 13 - element-definition-domain
This commit is contained in:
@@ -7,7 +7,59 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "fesa/model/model_types.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
Mitc4ShellDefinition::Mitc4ShellDefinition(
|
||||
SourceEntityId source_id_value,
|
||||
const ShellSourceElementType source_type_value,
|
||||
std::array<EntityIndex, 4> node_indices_value,
|
||||
const EntityIndex material_index_value,
|
||||
const EntityIndex section_index_value, SourceLocation location_value)
|
||||
: source_id{std::move(source_id_value)},
|
||||
source_type{source_type_value},
|
||||
node_indices{std::move(node_indices_value)},
|
||||
material_index{material_index_value},
|
||||
section_index{section_index_value},
|
||||
location{std::move(location_value)},
|
||||
property_index_{section_index_value},
|
||||
node_indices_view_{node_indices.begin(), node_indices.end()} {}
|
||||
|
||||
ElementDefinitionKind Mitc4ShellDefinition::Kind() const noexcept {
|
||||
return ElementDefinitionKind::kMitc4Shell;
|
||||
}
|
||||
|
||||
const SourceEntityId& Mitc4ShellDefinition::SourceId() const noexcept {
|
||||
return source_id;
|
||||
}
|
||||
|
||||
std::string_view Mitc4ShellDefinition::SourceElementType() const noexcept {
|
||||
return source_type == ShellSourceElementType::kS4 ? "S4" : "S4R";
|
||||
}
|
||||
|
||||
const std::vector<EntityIndex>& Mitc4ShellDefinition::NodeIndices()
|
||||
const noexcept {
|
||||
return node_indices_view_;
|
||||
}
|
||||
|
||||
EntityIndex Mitc4ShellDefinition::MaterialIndex() const noexcept {
|
||||
return material_index;
|
||||
}
|
||||
|
||||
EntityIndex Mitc4ShellDefinition::PropertyIndex() const noexcept {
|
||||
return property_index_;
|
||||
}
|
||||
|
||||
void Mitc4ShellDefinition::SetPropertyIndex(
|
||||
const EntityIndex property_index) noexcept {
|
||||
property_index_ = property_index;
|
||||
}
|
||||
|
||||
void Mitc4ShellDefinition::SynchronizeNodeIndices() {
|
||||
node_indices_view_.assign(node_indices.begin(), node_indices.end());
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr std::size_t kNodeCount = 4U;
|
||||
|
||||
Reference in New Issue
Block a user