Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Form DSL DG-SEM Multipatch Compatibility Semantics

## Objective

Add deterministic compatibility diagnostics for DG-SEM multipatch requests while
keeping DG-SEM multipatch execution unsupported.

## Scope

- Preserve strict fail-fast behavior for multipatch on backend `dgsem`.
- Add deterministic permissive diagnostics describing unsupported multipatch
semantics.
- Cover orientation variants and per-interface penalty controls.
- Add tests and docs updates for diagnostic stability.

## Non-Goals

- DG-SEM multipatch execution.
- Changes to IGA multipatch execution semantics.
- New DG flux/operator execution paths.

## Acceptance Criteria

- Strict mode still raises `unsupported_multipatch_interface`.
- Permissive mode includes deterministic DG-SEM compatibility diagnostics.
- Orientation and per-interface penalty controls each produce stable
compatibility diagnostics.
- Regression tests and docs are updated.

## Implementation Checklist

- [x] Add OpenSpec proposal/design/spec/tasks artifacts.
- [ ] Implement DG-SEM compatibility diagnostics for multipatch descriptors.
- [ ] Add strict/permissive regression tests.
- [ ] Update docs and progress tracking.

## Risks / Open Questions

- Diagnostic code set should stay minimal and deterministic to avoid future
churn when DG-SEM multipatch execution is introduced.
4 changes: 4 additions & 0 deletions docs/formdsl-nurbs-multipatch-evaluation.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ Implication:

## Tracking

- Active OpenSpec change:
`openspec/changes/formdsl-dgsem-multipatch-compatibility-semantics/`
- Active execution plan:
`docs/exec-plans/active/20260407-formdsl-dgsem-multipatch-compatibility-semantics.md`
- Per-interface controls archive:
`openspec/changes/archive/2026-04-07-formdsl-iga-multipatch-interface-controls/`
- Per-interface controls completed plan:
Expand Down
4 changes: 4 additions & 0 deletions docs/ufl-backend-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,7 @@ These are tracked outcomes from the Phase 3 backlog tasks:
`openspec/changes/archive/2026-04-07-formdsl-iga-multipatch-interface-controls/`
and
`docs/exec-plans/completed/20260407-formdsl-iga-multipatch-interface-controls.md`.
DG-SEM multipatch compatibility diagnostics are tracked in active change
`openspec/changes/formdsl-dgsem-multipatch-compatibility-semantics/` and
active plan
`docs/exec-plans/active/20260407-formdsl-dgsem-multipatch-compatibility-semantics.md`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema: spec-driven
created: 2026-04-07
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
## Context

Multipatch parsing and IGA execution are implemented, including per-interface
controls. For backend `dgsem`, multipatch remains unsupported by design, but
diagnostics currently provide only a single generic capability error.

This phase introduces deterministic DG-SEM compatibility diagnostics so callers
can understand exactly which multipatch semantics block lowering.

## Goals / Non-Goals

**Goals**

- Preserve strict unsupported behavior for DG-SEM multipatch requests.
- Add deterministic compatibility diagnostics in permissive mode.
- Distinguish base unsupported descriptor, orientation variants, and
per-interface penalty controls.
- Keep diagnostics stable and easy to assert in tests.

**Non-Goals**

- DG-SEM multipatch execution.
- Changes to IGA multipatch behavior.
- Flux-family or trace-operator redesign.

## Decisions

1. Keep `unsupported_multipatch_interface` as the primary strict failure code.
- Rationale: avoids compatibility break for existing strict-mode callers.

2. Append additional DG-SEM compatibility diagnostics in deterministic order.
- Rationale: permissive users get actionable context while retaining stable
payload semantics.

3. Detect unsupported descriptor features directly from IR multipatch
interfaces (orientation and penalty controls).
- Rationale: keeps diagnostics backend-agnostic but DG-SEM scoped.

## Risks / Trade-offs

- [Risk] Additional diagnostics may be noisy for simple unsupported requests.
- Mitigation: keep code set compact and deterministic.
- [Risk] Future DG-SEM execution phases may require code deprecation.
- Mitigation: use clearly scoped `dgsem_*` diagnostic codes.

## Migration Plan

1. Extend OpenSpec requirements for DG-SEM multipatch compatibility diagnostics.
2. Implement deterministic diagnostic generation in capability checks.
3. Add strict/permissive regression assertions and update docs.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## Why

`dgsem` remains multipatch execution unsupported, but compatibility diagnostics
are currently coarse (`unsupported_multipatch_interface` only). Callers cannot
reliably distinguish descriptor features that block DG-SEM lowering (for
example interface orientation variants or per-interface penalty controls).

We need deterministic diagnostic semantics so DG-SEM users get actionable,
structured feedback while execution remains out of scope.

## What Changes

- Keep DG-SEM multipatch execution unsupported.
- Add deterministic compatibility-profile diagnostics for DG-SEM when
multipatch descriptors are present.
- Emit structured diagnostics for orientation variants and per-interface penalty
controls under DG-SEM.
- Add regression tests for strict/permissive behavior and diagnostics payload
stability.

## Capabilities

### Modified Capabilities

- `ufl-dgsem-form-dsl`: expands diagnostics from one generic unsupported code
to a deterministic compatibility profile for multipatch descriptors.

### Unchanged Capabilities

- `ufl-iga-form-dsl`: unchanged execution semantics.
- DG-SEM multipatch execution remains unsupported in this phase.

## Impact

- Affected code:
- `src/cutkit/formdsl/capabilities.py`
- tests under `tests/formdsl/`
- support docs under `docs/`
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## ADDED Requirements

### Requirement: DG-SEM multipatch strict mode remains fail-fast
The system SHALL continue to reject multipatch descriptors on backend `dgsem`
in strict mode.

#### Scenario: Strict DG-SEM multipatch request
- **WHEN** a form with multipatch descriptors is assembled on `dgsem` with
`strict=True`
- **THEN** capability validation fails with
`unsupported_multipatch_interface`

### Requirement: DG-SEM multipatch permissive diagnostics are compatibility-aware
The system SHALL emit deterministic compatibility diagnostics for DG-SEM
multipatch requests in permissive mode.

#### Scenario: Permissive DG-SEM multipatch request with orientation variants
- **WHEN** a multipatch descriptor on `dgsem` includes `reversed` orientation
interfaces and `strict=False`
- **THEN** diagnostics include a DG-SEM compatibility code describing
unsupported orientation semantics

#### Scenario: Permissive DG-SEM multipatch request with per-interface penalties
- **WHEN** a multipatch descriptor on `dgsem` includes per-interface `penalty`
controls and `strict=False`
- **THEN** diagnostics include a DG-SEM compatibility code describing
unsupported per-interface coupling controls
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## 1. OpenSpec Artifacts

- [x] 1.1 Add proposal/design/spec/tasks artifacts for DG-SEM multipatch
compatibility diagnostics.

## 2. Capability Diagnostics

- [ ] 2.1 Keep strict unsupported behavior and add deterministic compatibility
profile diagnostics in permissive mode.
- [ ] 2.2 Emit explicit DG-SEM diagnostics for orientation variants and
per-interface penalty controls.

## 3. Validation + Docs

- [ ] 3.1 Add regression tests for strict/permissive diagnostics stability.
- [ ] 3.2 Update docs and execution-plan progress.
Loading