feat(cpp-object-oriented-modular-refactoring): step 5 - solver-workflow-google-style
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
#ifndef FESA_ANALYSIS_ANALYSIS_MODEL_H_
|
||||
#define FESA_ANALYSIS_ANALYSIS_MODEL_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/model/domain.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
/// @brief Provides the active-step view into a non-owned Domain.
|
||||
/// @note The referenced Domain must outlive this object and retains all
|
||||
/// semantic ownership.
|
||||
class AnalysisModel {
|
||||
public:
|
||||
/// @brief Creates the sole active-step view for a valid Domain.
|
||||
/// @param domain Domain that remains alive for the returned view's lifetime.
|
||||
/// @return A stable view or an input-cardinality failure.
|
||||
static Result<AnalysisModel> Create(const Domain& domain);
|
||||
|
||||
/// @brief Returns the non-owned Domain backing this view.
|
||||
const Domain& GetDomain() const noexcept;
|
||||
|
||||
/// @brief Returns the sole active static step.
|
||||
const StaticStepDefinition& Step() const noexcept;
|
||||
|
||||
/// @brief Returns active beam element indices in stable internal order.
|
||||
const std::vector<EntityIndex>& ActiveElements() const noexcept;
|
||||
|
||||
/// @brief Returns reachable material indices in stable internal order.
|
||||
const std::vector<EntityIndex>& ActiveMaterials() const noexcept;
|
||||
|
||||
/// @brief Returns reachable beam-section indices in stable internal order.
|
||||
const std::vector<EntityIndex>& ActiveSections() const noexcept;
|
||||
|
||||
/// @brief Returns boundary-condition indices in source order.
|
||||
const std::vector<EntityIndex>& ActiveBoundaryConditions() const noexcept;
|
||||
|
||||
/// @brief Returns concentrated-load indices in source order.
|
||||
const std::vector<EntityIndex>& ActiveLoads() const noexcept;
|
||||
|
||||
private:
|
||||
/// @brief Builds stable indices without copying the referenced Domain.
|
||||
explicit AnalysisModel(const Domain& domain);
|
||||
|
||||
const Domain* domain_;
|
||||
std::vector<EntityIndex> active_elements_;
|
||||
std::vector<EntityIndex> active_materials_;
|
||||
std::vector<EntityIndex> active_sections_;
|
||||
std::vector<EntityIndex> active_boundary_conditions_;
|
||||
std::vector<EntityIndex> active_loads_;
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
#endif // FESA_ANALYSIS_ANALYSIS_MODEL_H_
|
||||
Reference in New Issue
Block a user