#include "fesa/model/domain.hpp"

#include <utility>

namespace fesa {

Result<Domain> Domain::create(ModelDefinition definition) {
    return Result<Domain>::success(Domain{std::move(definition)});
}

const std::vector<Node>& Domain::nodes() const noexcept {
    return definition_.nodes;
}

const std::vector<EulerBeam3DDefinition>& Domain::elements() const noexcept {
    return definition_.elements;
}

const std::vector<Mitc4ShellDefinition>& Domain::shellElements() const noexcept {
    return definition_.shellElements;
}

const std::vector<LinearElasticMaterial>& Domain::materials() const noexcept {
    return definition_.materials;
}

const std::vector<GeneralBeamSection>& Domain::sections() const noexcept {
    return definition_.sections;
}

const std::vector<ShellSection>& Domain::shellSections() const noexcept {
    return definition_.shellSections;
}

const std::vector<ShellNodeInitialFrame>& Domain::shellNodeInitialFrames() const noexcept {
    return definition_.shellNodeInitialFrames;
}

const std::vector<NodeSet>& Domain::nodeSets() const noexcept {
    return definition_.nodeSets;
}

const std::vector<ElementSet>& Domain::elementSets() const noexcept {
    return definition_.elementSets;
}

const std::vector<StaticStepDefinition>& Domain::steps() const noexcept {
    return definition_.steps;
}

const std::vector<Diagnostic>& Domain::warnings() const noexcept {
    return definition_.warnings;
}

const std::filesystem::path& Domain::sourcePath() const noexcept {
    return definition_.sourcePath;
}

const std::string& Domain::sourceContentIdentity() const noexcept {
    return definition_.sourceContentIdentity;
}

Domain::Domain(ModelDefinition definition)
    : definition_{std::move(definition)} {}

} // namespace fesa
