# Step 16: 3D Euler Beam Element ## 담당 역할과 필수 스킬 - 담당 역할: `implementation-agent` - 필수 스킬: `fesa-cpp-msvc-tdd` ## 읽어야 할 파일 - `/AGENTS.md` - `/docs/ARCHITECTURE.md` - `/docs/ADR.md` - `/docs/requirements/linear-static-3d-euler-beam.md` - `/docs/formulations/3d-isoparametric-euler-beam-formulation.md` - `/docs/numerical-reviews/linear-static-3d-euler-beam-review.md` - `/docs/io-definitions/linear-static-3d-euler-beam-io.md` - `/docs/implementation-plans/linear-static-3d-euler-beam.md` - `/include/fesa/math/vector.hpp` - `/include/fesa/math/matrix.hpp` - `/include/fesa/model/model_types.hpp` - `/include/fesa/results/result_records.hpp` - `/docs/implementation-plans/linear-static-3d-euler-beam-implementation-report.md` ## 소유 파일 - Create: `/include/fesa/elements/euler_beam_3d.hpp` - Create: `/src/fesa/elements/euler_beam_3d.cpp` - Create: `/tests/unit/elements/euler_beam_3d_test.cpp` - Modify: `/src/fesa/CMakeLists.txt` - Modify: `/tests/CMakeLists.txt` ## 작업 승인 formulation을 그대로 구현하는 2-node `EulerBeam3D` kernel을 작성하라. ```cpp struct ConstantLocalLineLoad { double px; double py; double pz; double mx; }; struct BeamStressPoint { int gaussPoint; std::size_t sectionPoint; double x1; double x2; double s11; std::string source; }; struct BeamRecovery { std::array, 2> equilibriumEndActions; std::array, 2> endpointSectionResultants; std::array, 2> gaussGeneralizedStrains; std::array, 2> gaussGeneralizedResultants; std::vector stressPoints; }; class EulerBeam3D { public: static Result create(/* two nodes, guide, E, G, A, Iy, Iz, J, section points */); Matrix localStiffness() const; Matrix globalStiffness() const; Vector localEquivalentLoad(const ConstantLocalLineLoad& load) const; BeamRecovery recover(const Vector& globalElementDisplacement) const; }; ``` - Local DOF order와 부호는 formulation의 12-component order를 그대로 쓴다. - `R` rows는 `(ex,ey,ez)`, `T=diag(R,R,R,R)`, `dl=T*dg`, `Kg=T^T*Kl*T`다. - `Kl`은 두 Gauss point로 `B^T D B`를 적분하고 closed-form과 normalized `1e-12`로 검증한다. Production에서 1-point reduced integration을 사용하지 않는다. - `coordinate_scale=max(1,norm(X1),norm(X2))`에 대해 `L>1e-12*coordinate_scale`, `norm(a_perp)>1e-12*max(1,norm(a))`를 요구한다. `E,G,A,Iy,Iz,J>0`을 검증하고 fallback axis를 쓰지 않는다. - line-load kernel은 constant `[px,py,pz,mx]` consistent vector만 제공한다. Parser/CLI load object로 연결하지 않는다. - Recovery는 equilibrium end action과 section resultants를 구분하고 two Gauss generalized values 및 section point `S11=E(epsilon0+x2*kappa_y-x1*kappa_z)`를 생성한다. Element identity가 없는 kernel-level `BeamStressPoint`를 Step 22가 `StressS11Row`로 감싼다. Section point가 없으면 `(0,0), source=fesa-default` 하나를 사용한다. Tests는 Hermite endpoint/derivative, B matrix, Gauss/closed stiffness, symmetry, six rigid modes/rank 6, positive deformation energy, transform orthogonality/determinant/energy invariance, line-load signs, axial/torsion/y-z bending analytical displacement/recovery, invalid geometry와 stress formula를 포함하고 `EulerBeam3D` regex로 등록한다. ## Acceptance Criteria ```powershell cmake --build .harness/build --config Debug --target fesa_tests ctest --test-dir .harness/build -C Debug -R EulerBeam3D --output-on-failure ``` RED 후 GREEN/VERIFY: ```powershell cmake -S . -B .harness/build -A x64 ` -DFESA_GTEST_SOURCE_DIR=C:/git/googletest ` "-DMKL_DIR=C:/Program Files (x86)/Intel/oneAPI/mkl/2026.1/lib/cmake/mkl" ` "-DTBB_DIR=C:/Program Files (x86)/Intel/oneAPI/tbb/2023.1/lib/cmake/tbb" ` "-DHDF5_DIR=C:/Program Files/HDF_Group/HDF5/2.1.1/cmake" cmake --build .harness/build --config Debug ctest --test-dir .harness/build -C Debug -R EulerBeam3D --output-on-failure ctest --test-dir .harness/build -C Debug --show-only=json-v1 ctest --test-dir .harness/build -C Debug --output-on-failure ``` ## 검증 절차 1. formulation invariant/analytical tests를 먼저 작성해 RED를 확인한다. 2. 가장 작은 kernel 구현으로 GREEN을 만들고 normalized tolerance를 그대로 적용한다. 3. 수식/코드 component ordering을 대조하고 전체 MSVC x64 Debug VERIFY를 수행한다. 4. `/docs/implementation-plans/linear-static-3d-euler-beam-implementation-report.md`의 Step 16 section에 실제 RED/GREEN/VERIFY command, exit code, 핵심 output과 변경 파일을 기록한다. 5. Step 16을 `completed`로 갱신하고 element/recovery test evidence를 summary에 기록한다. ## 금지사항 - B31/Timoshenko shear deformation을 섞지 마라. 이유: 승인 formulation이 아니다. - 1-point bending integration이나 fallback orientation을 쓰지 마라. 이유: spurious mode/의미 왜곡 위험이다. - transverse/torsional shear stress를 만들어내지 마라. 이유: section 정보가 부족하고 범위 밖이다. - `*DLOAD` parser/CLI 지원을 추가하지 마라. 이유: kernel test만 승인됐다. - 직접 commit하지 마라. 이유: Harness executor가 담당한다.