feat: start abaqus input parser
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"project": "FESA Structural Solver",
|
||||
"phase": "abaqus-input-parser",
|
||||
"steps": [
|
||||
{
|
||||
"step": 0,
|
||||
"name": "io-contract",
|
||||
"status": "completed",
|
||||
"allowed_paths": [
|
||||
"docs/io-definitions/abaqus-input-parser-io.md"
|
||||
],
|
||||
"summary": "Abaqus input parser I/O contract added"
|
||||
},
|
||||
{
|
||||
"step": 1,
|
||||
"name": "mesh-keyword-parser",
|
||||
"status": "completed",
|
||||
"allowed_paths": [
|
||||
"src/fesa/io/abaqus/",
|
||||
"tests/unit/abaqus_input_parser_*_test.cpp"
|
||||
],
|
||||
"summary": "Mesh keyword parser maps NODE and ELEMENT data into Domain"
|
||||
},
|
||||
{
|
||||
"step": 2,
|
||||
"name": "syntax-diagnostics",
|
||||
"status": "pending",
|
||||
"allowed_paths": [
|
||||
"src/fesa/io/abaqus/",
|
||||
"tests/unit/abaqus_input_parser_*_test.cpp"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": 3,
|
||||
"name": "sets-and-section-properties",
|
||||
"status": "pending",
|
||||
"allowed_paths": [
|
||||
"src/fesa/io/abaqus/",
|
||||
"src/fesa/model/",
|
||||
"tests/unit/abaqus_input_parser_*_test.cpp",
|
||||
"tests/unit/model_*_test.cpp"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": 4,
|
||||
"name": "material-step-load-parser",
|
||||
"status": "pending",
|
||||
"allowed_paths": [
|
||||
"src/fesa/io/abaqus/",
|
||||
"src/fesa/model/",
|
||||
"tests/unit/abaqus_input_parser_*_test.cpp",
|
||||
"tests/unit/model_*_test.cpp"
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": 5,
|
||||
"name": "integration-validation-report",
|
||||
"status": "pending",
|
||||
"allowed_paths": [
|
||||
"tests/integration/",
|
||||
"docs/build-test-reports/abaqus-input-parser.md"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
# Step 0: io-contract
|
||||
|
||||
## Read First
|
||||
|
||||
Read these files before editing:
|
||||
|
||||
- `/AGENTS.md`
|
||||
- `/docs/PRD.md`
|
||||
- `/docs/ARCHITECTURE.md`
|
||||
- `/docs/ADR.md`
|
||||
- `/docs/SOLVER_AGENT_DESIGN.md`
|
||||
- `/docs/io-definitions/README.md`
|
||||
|
||||
## Task
|
||||
|
||||
Create the feature-level I/O contract for the Abaqus input parser at
|
||||
`/docs/io-definitions/abaqus-input-parser-io.md`.
|
||||
|
||||
The contract must explicitly state that FESA supports only the documented
|
||||
Abaqus keyword subset, not full Abaqus compatibility. Keep this document at a
|
||||
semantic level. Do not design C++ APIs and do not implement parser code in this
|
||||
step.
|
||||
|
||||
Required scope:
|
||||
|
||||
- Model data keywords: `*HEADING`, `*NODE`, `*ELEMENT`, `*NSET`, `*ELSET`,
|
||||
`*MATERIAL`, `*ELASTIC`, and section keywords needed for V0 bar/truss use.
|
||||
- History data keywords: `*STEP`, `*STATIC`, `*BOUNDARY`, `*CLOAD`,
|
||||
`*OUTPUT`, `*NODE OUTPUT`, and `*ELEMENT OUTPUT`.
|
||||
- Syntax policy for comments beginning with `**`, case-insensitive keywords,
|
||||
comma-separated parameters and data, blank lines, unsupported keywords, and
|
||||
parse diagnostics.
|
||||
- Internal semantic mapping to `Domain`, nodes, elements, sets, materials,
|
||||
properties, `AnalysisStep`, boundary conditions, loads, and output requests.
|
||||
- HDF5 and reference CSV comparison schema summary consistent with existing
|
||||
PRD/architecture documents. Do not create or modify reference artifacts.
|
||||
|
||||
## Tests To Write First
|
||||
|
||||
No C++ tests are required in this documentation-only step.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
```powershell
|
||||
python -m unittest discover -s scripts -p "test_*.py"
|
||||
python scripts/validate_workspace.py
|
||||
```
|
||||
|
||||
## Verification Procedure
|
||||
|
||||
1. Run the acceptance criteria commands.
|
||||
2. Confirm the contract does not claim full Abaqus compatibility.
|
||||
3. Confirm every supported keyword has purpose, data requirements, mapping, and
|
||||
unsupported-case behavior.
|
||||
4. Update `phases/abaqus-input-parser/index.json` step 0:
|
||||
- success: `"status": "completed"`, `"summary": "Abaqus input parser I/O contract added"`
|
||||
- error after three attempts: `"status": "error"`, `"error_message": "<specific error>"`
|
||||
- blocked: `"status": "blocked"`, `"blocked_reason": "<specific reason>"`
|
||||
|
||||
## Forbidden
|
||||
|
||||
- Do not implement parser code.
|
||||
- Do not design C++ APIs.
|
||||
- Do not run Abaqus, Nastran, or any reference solver.
|
||||
- Do not generate or modify Abaqus reference CSV files.
|
||||
@@ -0,0 +1,83 @@
|
||||
# Step 1: mesh-keyword-parser
|
||||
|
||||
## Read First
|
||||
|
||||
Read these files before editing:
|
||||
|
||||
- `/AGENTS.md`
|
||||
- `/docs/PRD.md`
|
||||
- `/docs/ARCHITECTURE.md`
|
||||
- `/docs/ADR.md`
|
||||
- `/docs/io-definitions/abaqus-input-parser-io.md`
|
||||
- `/src/fesa/model/domain.hpp`
|
||||
- `/src/fesa/model/node.hpp`
|
||||
- `/src/fesa/model/element.hpp`
|
||||
- `/tests/unit/model_domain_test.cpp`
|
||||
|
||||
Review step 0 output before implementing. Keep this step limited to parser API
|
||||
and mesh keyword mapping.
|
||||
|
||||
## Task
|
||||
|
||||
Add the first C++ parser slice under `/src/fesa/io/abaqus/`.
|
||||
|
||||
Required behavior:
|
||||
|
||||
- Provide a small `InputParser` that accepts an in-memory `.inp` string and
|
||||
returns a parse result containing `fesa::model::Domain` and
|
||||
`fesa::core::Status`.
|
||||
- Parse `*HEADING` as accepted but not yet stored.
|
||||
- Parse `*NODE` data lines into `Domain::add_node`.
|
||||
- Parse `*ELEMENT, TYPE=<type>` data lines into `Domain::add_element`.
|
||||
- Support only two-node line/bar element names needed by the current model:
|
||||
`T2D2`, `T3D2`, `B31`, and `C3D2`.
|
||||
- Map `T2D2`, `T3D2`, and `C3D2` to `ElementTopology::truss2`; map `B31` to
|
||||
`ElementTopology::bar2`.
|
||||
- Use `PropertyId{0}` for elements in this first mesh-only slice because
|
||||
section parsing is introduced later.
|
||||
- Treat keywords and parameter names case-insensitively.
|
||||
- Skip blank lines and comment lines that begin with `**`.
|
||||
|
||||
Keep implementation C++17/MSVC-compatible. Do not introduce external
|
||||
libraries, regex-heavy parser frameworks, JavaScript, TypeScript, or npm
|
||||
fallbacks.
|
||||
|
||||
## Tests To Write First
|
||||
|
||||
Add `/tests/unit/abaqus_input_parser_mesh_test.cpp` before production code.
|
||||
|
||||
The test must first fail because `fesa/io/abaqus/input_parser.hpp` does not
|
||||
exist, then pass after implementation. It should verify:
|
||||
|
||||
- a small input with `*HEADING`, `*NODE`, and `*ELEMENT, TYPE=T3D2` returns
|
||||
`Status::is_ok() == true`;
|
||||
- the returned `Domain` contains the expected node ids and 3D coordinates;
|
||||
- the returned `Domain` contains the expected element id, topology,
|
||||
connectivity, and `PropertyId{0}`;
|
||||
- keyword and parameter casing are accepted case-insensitively.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
```powershell
|
||||
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R abaqus_input_parser_mesh_test
|
||||
python -m unittest discover -s scripts -p "test_*.py"
|
||||
python scripts/validate_workspace.py
|
||||
```
|
||||
|
||||
## Verification Procedure
|
||||
|
||||
1. Run the targeted CTest after writing the test and before production code;
|
||||
confirm the failure is due to the missing parser API.
|
||||
2. Implement the minimum code needed for the test to pass.
|
||||
3. Run all acceptance criteria commands.
|
||||
4. Confirm C++ production changes have a related C++ test file.
|
||||
5. Update `phases/abaqus-input-parser/index.json` step 1:
|
||||
- success: `"status": "completed"`, `"summary": "Mesh keyword parser maps NODE and ELEMENT data into Domain"`
|
||||
- error after three attempts: `"status": "error"`, `"error_message": "<specific error>"`
|
||||
- blocked: `"status": "blocked"`, `"blocked_reason": "<specific reason>"`
|
||||
|
||||
## Forbidden
|
||||
|
||||
- Do not add set, material, section, load, boundary condition, output request,
|
||||
include-file, or HDF5 behavior in this step.
|
||||
- Do not mutate reference artifacts.
|
||||
@@ -0,0 +1,63 @@
|
||||
# Step 2: syntax-diagnostics
|
||||
|
||||
## Read First
|
||||
|
||||
Read these files before editing:
|
||||
|
||||
- `/AGENTS.md`
|
||||
- `/docs/ARCHITECTURE.md`
|
||||
- `/docs/ADR.md`
|
||||
- `/docs/io-definitions/abaqus-input-parser-io.md`
|
||||
- `/src/fesa/io/abaqus/input_parser.hpp`
|
||||
- `/src/fesa/io/abaqus/input_parser.cpp`
|
||||
- `/tests/unit/abaqus_input_parser_mesh_test.cpp`
|
||||
|
||||
Review completed step summaries in `/phases/abaqus-input-parser/index.json`.
|
||||
|
||||
## Task
|
||||
|
||||
Add structured diagnostics for parser syntax and unsupported subset behavior.
|
||||
|
||||
Required behavior:
|
||||
|
||||
- Unsupported keywords produce `Status::is_ok() == false` with an error
|
||||
diagnostic code and message that identifies the keyword.
|
||||
- Malformed `*NODE` and `*ELEMENT` data lines produce error diagnostics.
|
||||
- Missing required `TYPE` on `*ELEMENT` produces an error diagnostic.
|
||||
- Unsupported element types produce an error diagnostic and do not add that
|
||||
element.
|
||||
- Diagnostics must include enough context in the message to locate the line
|
||||
number.
|
||||
- Existing valid mesh parser behavior remains unchanged.
|
||||
|
||||
## Tests To Write First
|
||||
|
||||
Extend `/tests/unit/abaqus_input_parser_mesh_test.cpp` or add
|
||||
`/tests/unit/abaqus_input_parser_diagnostics_test.cpp` before production code.
|
||||
|
||||
Test:
|
||||
|
||||
- unsupported keyword failure;
|
||||
- malformed node row failure;
|
||||
- missing element `TYPE` failure;
|
||||
- unsupported element type failure.
|
||||
|
||||
Run the targeted CTest and confirm the new tests fail for missing behavior
|
||||
before implementation.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
```powershell
|
||||
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R abaqus_input_parser
|
||||
python -m unittest discover -s scripts -p "test_*.py"
|
||||
python scripts/validate_workspace.py
|
||||
```
|
||||
|
||||
## Verification Procedure
|
||||
|
||||
Update step 2 status with summary or a concrete error/blocked reason.
|
||||
|
||||
## Forbidden
|
||||
|
||||
- Do not add new semantic model fields except what diagnostics require.
|
||||
- Do not add material, section, step, boundary, or load parsing.
|
||||
@@ -0,0 +1,62 @@
|
||||
# Step 3: sets-and-section-properties
|
||||
|
||||
## Read First
|
||||
|
||||
Read these files before editing:
|
||||
|
||||
- `/AGENTS.md`
|
||||
- `/docs/ARCHITECTURE.md`
|
||||
- `/docs/ADR.md`
|
||||
- `/docs/io-definitions/abaqus-input-parser-io.md`
|
||||
- `/src/fesa/model/domain.hpp`
|
||||
- `/src/fesa/model/element.hpp`
|
||||
- `/src/fesa/model/property.hpp`
|
||||
- `/src/fesa/io/abaqus/input_parser.hpp`
|
||||
- `/src/fesa/io/abaqus/input_parser.cpp`
|
||||
|
||||
Review completed parser tests and phase summaries first.
|
||||
|
||||
## Task
|
||||
|
||||
Extend the model and parser only as needed to represent set membership and
|
||||
section-to-property assignment for V0 bar/truss models.
|
||||
|
||||
Required behavior:
|
||||
|
||||
- Parse `*NSET, NSET=<name>` node membership rows.
|
||||
- Parse `*ELSET, ELSET=<name>` element membership rows.
|
||||
- Parse one V0 section keyword that assigns a material name to an element set.
|
||||
Prefer the smallest section subset compatible with the current V0 element
|
||||
path.
|
||||
- Preserve deterministic member ordering as read, unless the I/O contract
|
||||
explicitly states otherwise.
|
||||
- Keep `Domain` as the owner of model definition data. Do not store equation ids
|
||||
on nodes or elements.
|
||||
|
||||
## Tests To Write First
|
||||
|
||||
Add focused C++ tests before production code:
|
||||
|
||||
- a model test for any new set/section semantic model API;
|
||||
- a parser test proving `*NSET`, `*ELSET`, and the selected section keyword map
|
||||
into the semantic model.
|
||||
|
||||
Run targeted CTest and confirm the tests fail before implementation.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
```powershell
|
||||
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R "(model_|abaqus_input_parser_)"
|
||||
python -m unittest discover -s scripts -p "test_*.py"
|
||||
python scripts/validate_workspace.py
|
||||
```
|
||||
|
||||
## Verification Procedure
|
||||
|
||||
Update step 3 status with summary or a concrete error/blocked reason.
|
||||
|
||||
## Forbidden
|
||||
|
||||
- Do not parse materials beyond names needed for section linkage.
|
||||
- Do not add loads, boundary conditions, or analysis steps.
|
||||
- Do not generate or modify reference artifacts.
|
||||
@@ -0,0 +1,65 @@
|
||||
# Step 4: material-step-load-parser
|
||||
|
||||
## Read First
|
||||
|
||||
Read these files before editing:
|
||||
|
||||
- `/AGENTS.md`
|
||||
- `/docs/PRD.md`
|
||||
- `/docs/ARCHITECTURE.md`
|
||||
- `/docs/ADR.md`
|
||||
- `/docs/io-definitions/abaqus-input-parser-io.md`
|
||||
- `/src/fesa/model/material.hpp`
|
||||
- `/src/fesa/model/analysis_step.hpp`
|
||||
- `/src/fesa/model/boundary_condition.hpp`
|
||||
- `/src/fesa/model/load.hpp`
|
||||
- `/src/fesa/io/abaqus/input_parser.hpp`
|
||||
- `/src/fesa/io/abaqus/input_parser.cpp`
|
||||
|
||||
Review completed parser and model tests first.
|
||||
|
||||
## Task
|
||||
|
||||
Extend the parser for the V0 material and history data subset.
|
||||
|
||||
Required behavior:
|
||||
|
||||
- Parse `*MATERIAL, NAME=<name>` and `*ELASTIC` data into the internal material
|
||||
representation. If the current `Material` model cannot store elastic data,
|
||||
add the smallest semantic extension with tests.
|
||||
- Parse `*STEP` and `*STATIC` into ordered `AnalysisStep` definitions.
|
||||
- Parse `*BOUNDARY` rows into step boundary conditions using existing
|
||||
`DofComponent` mapping.
|
||||
- Parse `*CLOAD` rows into step concentrated loads using existing
|
||||
`DofComponent` mapping.
|
||||
- Parse `*OUTPUT`, `*NODE OUTPUT`, and `*ELEMENT OUTPUT` only to the extent
|
||||
documented in the I/O contract. If semantic storage is not yet present, record
|
||||
an explicit ignored-with-warning diagnostic rather than inventing output model
|
||||
APIs.
|
||||
|
||||
## Tests To Write First
|
||||
|
||||
Add focused C++ tests before production code:
|
||||
|
||||
- model tests for any new material or output request semantic fields;
|
||||
- parser tests for material/elastic, step/static, boundary, and cload rows.
|
||||
|
||||
Run targeted CTest and confirm the tests fail before implementation.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
```powershell
|
||||
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R "(model_|abaqus_input_parser_)"
|
||||
python -m unittest discover -s scripts -p "test_*.py"
|
||||
python scripts/validate_workspace.py
|
||||
```
|
||||
|
||||
## Verification Procedure
|
||||
|
||||
Update step 4 status with summary or a concrete error/blocked reason.
|
||||
|
||||
## Forbidden
|
||||
|
||||
- Do not implement analysis execution, assembly, HDF5 writing, or reference
|
||||
comparison in this step.
|
||||
- Do not mutate reference artifacts.
|
||||
@@ -0,0 +1,55 @@
|
||||
# Step 5: integration-validation-report
|
||||
|
||||
## Read First
|
||||
|
||||
Read these files before editing:
|
||||
|
||||
- `/AGENTS.md`
|
||||
- `/docs/PRD.md`
|
||||
- `/docs/ARCHITECTURE.md`
|
||||
- `/docs/ADR.md`
|
||||
- `/docs/io-definitions/abaqus-input-parser-io.md`
|
||||
- `/src/fesa/io/abaqus/input_parser.hpp`
|
||||
- `/tests/unit/abaqus_input_parser_mesh_test.cpp`
|
||||
- existing parser/model tests added by prior steps
|
||||
|
||||
Review all completed step summaries in `/phases/abaqus-input-parser/index.json`.
|
||||
|
||||
## Task
|
||||
|
||||
Add an integration-level parser test and a build/test report.
|
||||
|
||||
Required behavior:
|
||||
|
||||
- Add a small integration test that parses a V0 Abaqus `.inp` string containing
|
||||
the supported parser subset and validates the resulting `Domain` and
|
||||
`AnalysisStep` data.
|
||||
- Keep the test in memory; do not create or modify Abaqus reference CSV
|
||||
artifacts.
|
||||
- Write `/docs/build-test-reports/abaqus-input-parser.md` with command evidence,
|
||||
exit codes, and known limitations.
|
||||
|
||||
## Tests To Write First
|
||||
|
||||
Add `/tests/integration/abaqus_input_parser_integration_test.cpp` before any
|
||||
final integration adjustments. Confirm it fails for the missing integrated
|
||||
behavior, then make it pass with the minimum implementation-owned changes.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
```powershell
|
||||
ctest --test-dir build/msvc-debug --output-on-failure -C Debug -R abaqus_input_parser
|
||||
python -m unittest discover -s scripts -p "test_*.py"
|
||||
python scripts/validate_workspace.py
|
||||
```
|
||||
|
||||
## Verification Procedure
|
||||
|
||||
1. Run the acceptance criteria commands.
|
||||
2. Confirm no reference artifacts were generated or modified.
|
||||
3. Update step 5 status with summary or a concrete error/blocked reason.
|
||||
|
||||
## Forbidden
|
||||
|
||||
- Do not claim reference comparison, physics sanity, or release readiness.
|
||||
- Do not generate, restore, or modify Abaqus reference CSV files.
|
||||
@@ -3,6 +3,10 @@
|
||||
{
|
||||
"dir": "solver-core-skeleton",
|
||||
"status": "completed"
|
||||
},
|
||||
{
|
||||
"dir": "abaqus-input-parser",
|
||||
"status": "pending"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user