feat(cpp-object-oriented-modular-refactoring): step 18 - load-hierarchy
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
#ifndef FESA_LOADS_CONCENTRATED_NODAL_LOAD_H_
|
||||
#define FESA_LOADS_CONCENTRATED_NODAL_LOAD_H_
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
|
||||
#include "fesa/core/diagnostic.h"
|
||||
#include "fesa/loads/load.h"
|
||||
#include "fesa/model/source_target_resolver.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
/// @brief Emits global concentrated nodal components for one source target.
|
||||
class ConcentratedNodalLoad final : public Load {
|
||||
public:
|
||||
/// @brief Creates a six-component global concentrated nodal load.
|
||||
ConcentratedNodalLoad(SourceTargetQuery target,
|
||||
std::array<double, 6> global_components,
|
||||
std::size_t source_order);
|
||||
|
||||
/// @brief Creates one parsed CLOAD component while preserving diagnostics.
|
||||
ConcentratedNodalLoad(SourceTargetQuery target, int source_dof,
|
||||
double magnitude, std::size_t source_order,
|
||||
SourceLocation location);
|
||||
|
||||
/// @brief Computes target-major, component-minor full-DOF contributions.
|
||||
Result<std::vector<LoadContribution>> ComputeContributions(
|
||||
const LoadContext& context) const override;
|
||||
|
||||
/// @brief Returns the immutable source target query.
|
||||
const SourceTargetQuery& Target() const noexcept;
|
||||
|
||||
/// @brief Returns six global force/moment components without reordering.
|
||||
const std::array<double, 6>& GlobalComponents() const noexcept;
|
||||
|
||||
/// @brief Returns the stable CLOAD declaration order.
|
||||
std::size_t SourceOrder() const noexcept;
|
||||
|
||||
/// @brief Returns the source location used by structured diagnostics.
|
||||
const SourceLocation& Location() const noexcept;
|
||||
|
||||
private:
|
||||
SourceTargetQuery target_;
|
||||
std::array<double, 6> global_components_{};
|
||||
std::size_t source_order_;
|
||||
SourceLocation location_{};
|
||||
int source_dof_{0};
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
#endif // FESA_LOADS_CONCENTRATED_NODAL_LOAD_H_
|
||||
Reference in New Issue
Block a user