feat: add analysis model objects
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "fesa/boundary/BoundaryCondition.hpp"
|
||||
#include "fesa/core/BoundaryCondition.hpp"
|
||||
#include "fesa/core/ElementDefinition.hpp"
|
||||
#include "fesa/core/LoadDefinition.hpp"
|
||||
@@ -8,8 +9,12 @@
|
||||
#include "fesa/core/Node.hpp"
|
||||
#include "fesa/core/PropertyDefinition.hpp"
|
||||
#include "fesa/core/StepDefinition.hpp"
|
||||
#include "fesa/element/Element.hpp"
|
||||
#include "fesa/load/Load.hpp"
|
||||
#include "fesa/material/Material.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
@@ -27,6 +32,10 @@ public:
|
||||
std::size_t addBoundaryCondition(BoundaryCondition condition);
|
||||
std::size_t addNodalLoad(NodalLoadDefinition load);
|
||||
void addStep(LinearStaticStepDefinition step);
|
||||
void addElementObject(std::unique_ptr<fesa::element::Element> element);
|
||||
void addMaterialObject(std::unique_ptr<fesa::material::Material> material);
|
||||
std::size_t addLoadObject(std::unique_ptr<fesa::load::Load> load);
|
||||
std::size_t addBoundaryObject(std::unique_ptr<fesa::boundary::BoundaryCondition> boundary);
|
||||
|
||||
const Node* findNode(NodeId id) const noexcept;
|
||||
const Node& node(NodeId id) const;
|
||||
@@ -62,6 +71,22 @@ public:
|
||||
const LinearStaticStepDefinition& step(StepId id) const;
|
||||
std::size_t stepCount() const noexcept;
|
||||
|
||||
const fesa::element::Element* findElementObject(ElementId id) const noexcept;
|
||||
const fesa::element::Element& elementObject(ElementId id) const;
|
||||
std::size_t elementObjectCount() const noexcept;
|
||||
|
||||
const fesa::material::Material* findMaterialObject(MaterialId id) const noexcept;
|
||||
const fesa::material::Material& materialObject(MaterialId id) const;
|
||||
std::size_t materialObjectCount() const noexcept;
|
||||
|
||||
const fesa::load::Load* findLoadObject(std::size_t index) const noexcept;
|
||||
const fesa::load::Load& loadObject(std::size_t index) const;
|
||||
std::size_t loadObjectCount() const noexcept;
|
||||
|
||||
const fesa::boundary::BoundaryCondition* findBoundaryObject(std::size_t index) const noexcept;
|
||||
const fesa::boundary::BoundaryCondition& boundaryObject(std::size_t index) const;
|
||||
std::size_t boundaryObjectCount() const noexcept;
|
||||
|
||||
private:
|
||||
std::unordered_map<NodeId, Node> nodes_;
|
||||
std::unordered_map<ElementId, ElementDefinition> elements_;
|
||||
@@ -72,6 +97,10 @@ private:
|
||||
std::vector<BoundaryCondition> boundary_conditions_;
|
||||
std::vector<NodalLoadDefinition> nodal_loads_;
|
||||
std::unordered_map<StepId, LinearStaticStepDefinition> steps_;
|
||||
std::unordered_map<ElementId, std::unique_ptr<fesa::element::Element>> element_objects_;
|
||||
std::unordered_map<MaterialId, std::unique_ptr<fesa::material::Material>> material_objects_;
|
||||
std::vector<std::unique_ptr<fesa::load::Load>> load_objects_;
|
||||
std::vector<std::unique_ptr<fesa::boundary::BoundaryCondition>> boundary_objects_;
|
||||
};
|
||||
|
||||
} // namespace fesa::core
|
||||
|
||||
@@ -10,6 +10,8 @@ class Node {
|
||||
public:
|
||||
Node(NodeId id, double x, double y, double z);
|
||||
|
||||
static constexpr std::size_t dofCount() noexcept { return kDofPerNode; }
|
||||
|
||||
NodeId id() const noexcept;
|
||||
double x() const noexcept;
|
||||
double y() const noexcept;
|
||||
|
||||
Reference in New Issue
Block a user