refactor: move solver skeleton implementations to cpp
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
#include <fesa/model/domain.hpp>
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace fesa::model {
|
||||
|
||||
void Domain::add_node(Node node)
|
||||
{
|
||||
nodes_.push_back(std::move(node));
|
||||
}
|
||||
|
||||
void Domain::add_element(Element element)
|
||||
{
|
||||
elements_.push_back(std::move(element));
|
||||
}
|
||||
|
||||
void Domain::add_material(Material material)
|
||||
{
|
||||
materials_.push_back(std::move(material));
|
||||
}
|
||||
|
||||
void Domain::add_property(Property property)
|
||||
{
|
||||
properties_.push_back(std::move(property));
|
||||
}
|
||||
|
||||
void Domain::add_step(AnalysisStep step)
|
||||
{
|
||||
steps_.push_back(std::move(step));
|
||||
}
|
||||
|
||||
const std::vector<Node>& Domain::nodes() const
|
||||
{
|
||||
return nodes_;
|
||||
}
|
||||
|
||||
const std::vector<Element>& Domain::elements() const
|
||||
{
|
||||
return elements_;
|
||||
}
|
||||
|
||||
const std::vector<Material>& Domain::materials() const
|
||||
{
|
||||
return materials_;
|
||||
}
|
||||
|
||||
const std::vector<Property>& Domain::properties() const
|
||||
{
|
||||
return properties_;
|
||||
}
|
||||
|
||||
const std::vector<AnalysisStep>& Domain::steps() const
|
||||
{
|
||||
return steps_;
|
||||
}
|
||||
|
||||
const Node* Domain::find_node(core::NodeId id) const
|
||||
{
|
||||
for (const auto& node : nodes_) {
|
||||
if (node.id().value == id.value) {
|
||||
return &node;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const Element* Domain::find_element(core::ElementId id) const
|
||||
{
|
||||
for (const auto& element : elements_) {
|
||||
if (element.id().value == id.value) {
|
||||
return &element;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const Material* Domain::find_material(core::MaterialId id) const
|
||||
{
|
||||
for (const auto& material : materials_) {
|
||||
if (material.id().value == id.value) {
|
||||
return &material;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const Property* Domain::find_property(core::PropertyId id) const
|
||||
{
|
||||
for (const auto& property : properties_) {
|
||||
if (property.id().value == id.value) {
|
||||
return &property;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const AnalysisStep* Domain::find_step(core::StepId id) const
|
||||
{
|
||||
for (const auto& step : steps_) {
|
||||
if (step.id().value == id.value) {
|
||||
return &step;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace fesa::model
|
||||
Reference in New Issue
Block a user