# models

Shared models and errors for GDSFactory FDTD artifact generation.

Classes:

- **`FDTDArtifactError`** –

  Base error for invalid or unsupported GDSFactory FDTD artifacts.
- **`FDTDConfigError`** –

  Raised when settings cannot produce a valid GDSFactory FDTD config.
- **`FDTDGeometryError`** –

  Raised when geometry cannot produce a valid GDSFactory FDTD mesh.
- **`MeshGroup`** –

  One named three-dimensional Gmsh physical group.
- **`MeshManifest`** –

  Authoritative physical-group mapping emitted with a Gmsh mesh.
- **`PortMeshGroup`** –

  One named two-dimensional Gmsh port physical group.
- **`SimulationArtifacts`** –

  Paths and metadata produced by :meth:`Simulation.write`.

## FDTDArtifactError

Bases: `ValueError`

Base error for invalid or unsupported GDSFactory FDTD artifacts.

## FDTDConfigError

Bases: `FDTDArtifactError`

Raised when settings cannot produce a valid GDSFactory FDTD config.

## FDTDGeometryError

Bases: `FDTDArtifactError`

Raised when geometry cannot produce a valid GDSFactory FDTD mesh.

## MeshGroup

```python
MeshGroup(name: str, physical_tag: int, material: str, priority: int)
```

One named three-dimensional Gmsh physical group.

## MeshManifest

```python
MeshManifest(
    volumes: dict[str, MeshGroup],
    layers: dict[str, MeshGroup],
    ports: dict[str, PortMeshGroup],
    domain_min_nm: tuple[float, float, float],
    domain_max_nm: tuple[float, float, float],
)
```

Authoritative physical-group mapping emitted with a Gmsh mesh.

## PortMeshGroup

```python
PortMeshGroup(
    name: str,
    physical_name: str,
    physical_tag: int,
    layer: str,
    normal: tuple[int, int, int],
)
```

One named two-dimensional Gmsh port physical group.

## SimulationArtifacts

```python
SimulationArtifacts(mesh_path: Path, config_path: Path, manifest: MeshManifest)
```

Paths and metadata produced by :meth:`Simulation.write`.
