Files
FESADev/phases/cpp-object-oriented-modular-refactoring/step18.md
T

3.5 KiB

Step 18: Load Hierarchy

과거 개발 계획이다. 아래 작업·상태·예시는 현재 실행 지시가 아니다. 현재 구현과 검증 한계는 기능 요약을 따른다.

읽어야 할 파일

  • /AGENTS.md
  • ../../docs/solver-core/README.md
  • ../../docs/solver-core/README.md
  • ../../docs/solver-core/README.md
  • ../../docs/cpp-object-oriented-modular-refactoring/README.md
  • Step 11 source-target resolver files
  • Step 13 Domain/AnalysisModel files
  • Step 15 DofManager files
  • /include/fesa/assembly/load_assembler.h, /src/fesa/assembly/load_assembler.cpp
  • /tests/unit/assembly/load_assembler_test.cpp
  • /tests/unit/analysis/analysis_model_test.cpp
  • /src/fesa/io/abaqus/domain_mapper.cpp
  • /src/fesa/CMakeLists.txt, /tests/CMakeLists.txt
  • /phases/cpp-object-oriented-modular-refactoring/index.json
  • /phases/cpp-object-oriented-modular-refactoring/step18.md

작업

Requirement R-LOAD-001을 구현한다.

  1. /tests/unit/loads/load_test.cpp와 LoadAssembler generic test를 먼저 추가한다. C-LOAD-001 uses a fake Load to emit ordered contributions, verifies signed duplicate target accumulation and rejects nonfinite/index errors before global mutation.
  2. Missing Load base/contribution API or concrete-vector-only assembler gives RED.
  3. Create /include/fesa/loads/load.h, /include/fesa/loads/concentrated_nodal_load.h, and /src/fesa/loads/concentrated_nodal_load.cpp; register the source and load test in CMake.
  4. Candidate interfaces:
struct LoadContribution {
  std::size_t source_order;
  std::size_t full_dof_index;
  double value;
};

struct LoadContext {
  const Domain& domain;
  const DofManager& dof_manager;
  const SourceTargetResolver& target_resolver;
};

class Load {
 public:
  virtual ~Load() = default;
  virtual Result<std::vector<LoadContribution>> ComputeContributions(
      const LoadContext& context) const = 0;
};

class ConcentratedNodalLoad final : public Load {
 public:
  ConcentratedNodalLoad(SourceTargetQuery target,
                        std::array<double, 6> global_components,
                        std::size_t source_order);
  Result<std::vector<LoadContribution>> ComputeContributions(
      const LoadContext& context) const override;

 private:
  SourceTargetQuery target_;
  std::array<double, 6> global_components_;
  std::size_t source_order_;
};
  1. Domain StepDefinition owns loads through unique_ptr<Load> and exposes const active order.
  2. LoadAssembler requests contributions in active source order, validates them, then accumulates into a candidate full vector in the existing deterministic order.
  3. Current drilling-moment validation, exact-zero aggregate handling, nonzero prescribed effective RHS behavior and diagnostics remain unchanged.

Acceptance Criteria

과거 도구 실행·출력 지시는 정리했으며, 현재 검증 방법은 기능 요약을 따른다.

검증 및 상태 갱신

  • RED fake load, ordered/validation focused tests and full CTest를 summary에 기록한다.
  • Reduction/order/diagnostic regression is error.
  • 성공 시 현재 Step만 completed로 갱신한다.
  • timestamp, retry, commit, advancement는 Executor 소유다.

금지사항

  • Load object가 global Vector를 직접 mutate하게 하지 마라.
  • Distributed load, body force or new keyword를 구현하지 마라.
  • Parallel accumulation or order optimization을 추가하지 마라.
  • 직접 commit하거나 hook script를 수동 실행하지 마라.