32 lines
1011 B
Markdown
32 lines
1011 B
Markdown
# Step 2: assembly-and-solver
|
|
|
|
## 읽어야 할 파일
|
|
|
|
- `/AGENTS.md`
|
|
- `/docs/ARCHITECTURE.md`
|
|
- `/src/femsurrogate/fea/model.py`
|
|
- `/src/femsurrogate/fea/io.py`
|
|
- `/src/femsurrogate/fea/element.py`
|
|
|
|
## 작업
|
|
|
|
TDD로 global assembly와 constrained linear static solver를 구현한다.
|
|
|
|
- `/tests/test_beam_solver.py`를 먼저 작성한다.
|
|
- BeamExamples model의 global stiffness shape `(18, 18)`을 검증한다.
|
|
- fixed node 1의 3 DOF가 constrained 처리되는지 검증한다.
|
|
- `solve_linear_static(model)`이 모든 node displacement를 finite 값으로 반환하는지 검증한다.
|
|
- 구현 파일: `/src/femsurrogate/fea/assembly.py`, `/src/femsurrogate/fea/solver.py`.
|
|
- solver는 `scipy.sparse`와 `scipy.sparse.linalg.spsolve`를 사용한다.
|
|
|
|
## Acceptance Criteria
|
|
|
|
```powershell
|
|
uv run pytest tests/test_beam_solver.py tests/test_frame_element.py tests/test_beamexamples_io.py -q
|
|
uv run ruff check .
|
|
```
|
|
|
|
## 금지사항
|
|
|
|
- expected displacement 값을 solver에 hard-code하지 마라.
|