feat: add property model foundation
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "fesa/element/Element.hpp"
|
||||
#include "fesa/load/Load.hpp"
|
||||
#include "fesa/material/Material.hpp"
|
||||
#include "fesa/property/Property.hpp"
|
||||
#include "fesa/property/ShellProperty.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
@@ -22,7 +23,8 @@ public:
|
||||
void addNode(Node node);
|
||||
void addElement(std::unique_ptr<fesa::element::Element> element);
|
||||
void addMaterial(std::unique_ptr<fesa::material::Material> material);
|
||||
void addShellProperty(fesa::property::ShellProperty property);
|
||||
void addProperty(std::unique_ptr<fesa::property::Property> property);
|
||||
void addShellProperty(std::unique_ptr<fesa::property::ShellProperty> property);
|
||||
void addNodeSet(std::string name, std::vector<NodeId> node_ids);
|
||||
void addElementSet(std::string name, std::vector<ElementId> element_ids);
|
||||
std::size_t addBoundaryCondition(std::unique_ptr<fesa::boundary::BoundaryCondition> boundary);
|
||||
@@ -41,6 +43,10 @@ public:
|
||||
const fesa::material::Material& material(MaterialId id) const;
|
||||
std::size_t materialCount() const noexcept;
|
||||
|
||||
const fesa::property::Property* findProperty(PropertyId id) const noexcept;
|
||||
const fesa::property::Property& property(PropertyId id) const;
|
||||
std::size_t propertyCount() const noexcept;
|
||||
|
||||
const fesa::property::ShellProperty* findShellProperty(PropertyId id) const noexcept;
|
||||
const fesa::property::ShellProperty& shellProperty(PropertyId id) const;
|
||||
std::size_t shellPropertyCount() const noexcept;
|
||||
@@ -69,7 +75,7 @@ private:
|
||||
std::unordered_map<NodeId, Node> nodes_;
|
||||
std::unordered_map<ElementId, std::unique_ptr<fesa::element::Element>> elements_;
|
||||
std::unordered_map<MaterialId, std::unique_ptr<fesa::material::Material>> materials_;
|
||||
std::unordered_map<PropertyId, fesa::property::ShellProperty> shell_properties_;
|
||||
std::unordered_map<PropertyId, std::unique_ptr<fesa::property::Property>> properties_;
|
||||
std::unordered_map<std::string, std::vector<NodeId>> node_sets_;
|
||||
std::unordered_map<std::string, std::vector<ElementId>> element_sets_;
|
||||
std::vector<std::unique_ptr<fesa::boundary::BoundaryCondition>> boundary_conditions_;
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace fesa::io {
|
||||
|
||||
class Hdf5ResultWriter {
|
||||
public:
|
||||
explicit Hdf5ResultWriter(std::string file_path);
|
||||
|
||||
const std::string& filePath() const noexcept;
|
||||
|
||||
private:
|
||||
std::string file_path_;
|
||||
};
|
||||
|
||||
} // namespace fesa::io
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "fesa/core/ModelTypes.hpp"
|
||||
|
||||
namespace fesa::property {
|
||||
|
||||
using fesa::core::PropertyId;
|
||||
|
||||
enum class PropertyKind {
|
||||
Shell
|
||||
};
|
||||
|
||||
class Property {
|
||||
public:
|
||||
virtual ~Property() = default;
|
||||
|
||||
virtual PropertyId id() const noexcept = 0;
|
||||
virtual PropertyKind kind() const noexcept = 0;
|
||||
};
|
||||
|
||||
} // namespace fesa::property
|
||||
@@ -1,17 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "fesa/core/ModelTypes.hpp"
|
||||
#include "fesa/property/Property.hpp"
|
||||
|
||||
namespace fesa::property {
|
||||
|
||||
using fesa::core::MaterialId;
|
||||
using fesa::core::PropertyId;
|
||||
|
||||
class ShellProperty {
|
||||
class ShellProperty final : public Property {
|
||||
public:
|
||||
ShellProperty(PropertyId id, MaterialId material_id, double thickness);
|
||||
|
||||
PropertyId id() const noexcept;
|
||||
PropertyId id() const noexcept override;
|
||||
PropertyKind kind() const noexcept override;
|
||||
MaterialId materialId() const noexcept;
|
||||
double thickness() const noexcept;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user