solprop.translate.routes#

The closed union of route descriptions a propagation problem carries (SEP 47 6.2).

A PropagationProblem shares its grid, operator, response and source components between every route; what differs between routes is carried by exactly one of three variants, each holding the fields its executor needs and nothing else:

  • ModalRoute: modal amplitudes through the static synthesis and projection of the transform – the mode-averaged effective-area route and the resolved quadrature, a wall’s coupled flow among them. The TDSE response is its reference-only extension (TDSESource).

  • GeneralRoute: a general modal guide, whose transform carries the full E/H reference (transform.modal_tables) and whose static matrices are declared placeholders.

  • SpatialRoute: free space on a transverse grid of one of four kinds – radial, Cartesian, planar (the hybrid slab transform) or line (a Cartesian grid one sample wide in y) – with the plane measure every spatial statistic is weighted by and the resolved transverse boundary.

Each variant checks its own fields on construction; what spans groups is checked by validate(), which visits the variant explicitly. A backend admits a problem the same way: it visits problem.route with a match statement and refuses, by name and before it allocates, a variant or a kind it does not execute. Extending a route changes this typed contract and its tests in both distributions; there is no string-keyed bag of optional capabilities (docs/dev/kernel-contract.md, the extension procedure).

Module Attributes

SpatialKind

The four kinds of transverse grid a spatial route runs on.

SPATIAL_KINDS

Every spatial kind, in the order the manual lists them.

Route

The closed union of route descriptions.

Functions

flux_of(route)

Return a spatial route's plane measure, or None on a modal route.

route_name(route)

Return the name a refusal gives a route.

spatial_kind(geometry)

Return the spatial kind a transverse geometry is.

tdse_descriptor(route)

Return the TDSE extension's scientific identity, or None without one.

tdse_of(route)

Return the modal route's TDSE extension, or None on every other route.

transverse_of(route)

Return a spatial route's transverse boundary, or None.

Classes

GeneralRoute(transform)

A general modal guide, its transform carrying the full E/H reference.

ModalRoute(transform[, tdse])

Modal amplitudes through the transform's static synthesis and projection.

SpatialRoute(kind, transform, flux[, transverse])

Free space on a transverse grid of one of four kinds.

TDSESource(descriptor, current_numerator)

The TDSE response: the modal route's reference-only extension (SEP 26).

class solprop.translate.routes.GeneralRoute(transform)[source]#

Bases: object

A general modal guide, its transform carrying the full E/H reference.

The route of solprop.translate.general.GeneralModalRoute, the record a run is assembled from. Its transform’s static matrices are declared placeholders (docs/dev/kernel-contract.md section 4).

Attributes:
transformsolprop.translate.modal.Transform

A modal transform with modal_tables.

Raises:
TranslationError

If the transform carries no general modal tables.

transform: Transform#
validate()[source]#

Refuse a transform without the general modal tables.

Raises:
TranslationError

If transform.modal_tables is absent.

class solprop.translate.routes.ModalRoute(transform, tdse=None)[source]#

Bases: object

Modal amplitudes through the transform’s static synthesis and projection.

The mode-averaged effective-area route and the resolved quadrature, with or without a coupled flow (a capillary wall’s). Its transform carries neither a spatial geometry nor general modal tables.

Attributes:
transformsolprop.translate.modal.Transform

Synthesis and projection, of kind "mode_averaged" or "modal".

tdseTDSESource or None, optional

The TDSE response, the reference’s alone; None without one.

Raises:
TranslationError

If the transform is not a modal one.

tdse: TDSESource | None = None#
transform: Transform#
validate()[source]#

Refuse a transform that belongs to another route.

Raises:
TranslationError

Naming the transform’s kind.

type solprop.translate.routes.Route = ModalRoute | GeneralRoute | SpatialRoute#

The closed union of route descriptions.

solprop.translate.routes.SPATIAL_KINDS: tuple[SpatialKind, ...] = ('radial', 'cartesian', 'planar', 'line')#

Every spatial kind, in the order the manual lists them.

type solprop.translate.routes.SpatialKind = Literal['radial', 'cartesian', 'planar', 'line']#

The four kinds of transverse grid a spatial route runs on.

class solprop.translate.routes.SpatialRoute(kind, transform, flux, transverse=None)[source]#

Bases: object

Free space on a transverse grid of one of four kinds.

Attributes:
kind{‘radial’, ‘cartesian’, ‘planar’, ‘line’}

The transverse grid: Hankel, two-dimensional Cartesian, the hybrid planar slab transform, or a Cartesian grid one sample wide in y. It equals spatial_kind() of the transform’s geometry.

transformsolprop.translate.modal.Transform

A transform with a spatial geometry.

fluxsolprop.translate.spatial.FluxPlan

The plane measure every spatial statistic is weighted by (SEP 34).

transversesolprop.spatial_absorber.SpatialAbsorberDesign or None, optional

The resolved transverse boundary (SEP 40); None for none.

Raises:
TranslationError

If the transform has no geometry or the kind is not the geometry’s.

flux: FluxPlan#
kind: SpatialKind#
transform: Transform#
transverse: SpatialAbsorberDesign | None = None#
validate()[source]#

Check the kind against the transform’s geometry.

Raises:
TranslationError

Naming the disagreement.

class solprop.translate.routes.TDSESource(descriptor, current_numerator)[source]#

Bases: object

The TDSE response: the modal route’s reference-only extension (SEP 26).

Only the NumPy reference executes it; every other backend refuses it by name (docs/dev/kernel-contract.md section 6). The atomic binding itself is an execution resource, owned by the driver and handed to the backend explicitly; this record is its immutable scientific identity.

Attributes:
descriptorsolprop.translate.tdse.TDSEDescriptor

The atomic specification, the resolved response lattice and the scientific identity.

current_numeratornumpy.ndarray

The independent current source numerator -crop_scale/(2 epsilon_0 c), float64, shape (n_modes, n_pol, n_omega), read-only and C-contiguous, zero outside the retained band and nowhere positive. A stage divides it by its real effective index without dividing by frequency.

Raises:
TranslationError

If the numerator is not a frozen, finite, non-positive float64 row.

current_numerator: Float[ndarray, 'n_modes n_pol n_omega']#
descriptor: TDSEDescriptor#
validate()[source]#

Check the numerator is a frozen source row.

Raises:
TranslationError

If it is not.

solprop.translate.routes.flux_of(route)[source]#

Return a spatial route’s plane measure, or None on a modal route.

Parameters:
routeRoute

The route.

Returns:
solprop.translate.spatial.FluxPlan or None

The plane measure, which every spatial route carries.

solprop.translate.routes.route_name(route)[source]#

Return the name a refusal gives a route.

Parameters:
routeobject

The route: a variant of Route, or anything else a refusal names.

Returns:
str

"modal", "general modal" or "<kind> spatial", with " with TDSE" for the modal route’s extension; any other object’s type name.

solprop.translate.routes.spatial_kind(geometry)[source]#

Return the spatial kind a transverse geometry is.

Parameters:
geometrysolprop.translate.spatial.SpatialGeometry

The transform’s spatial leaf.

Returns:
str

"radial" for a Hankel geometry, "planar" for the hybrid slab transform, "line" for a Cartesian grid one sample wide in y (solprop.grid.LineGrid) and "cartesian" for any other Cartesian grid.

solprop.translate.routes.tdse_descriptor(route)[source]#

Return the TDSE extension’s scientific identity, or None without one.

Parameters:
routeRoute

The route.

Returns:
solprop.translate.tdse.TDSEDescriptor or None

The descriptor of the modal route’s TDSE extension.

solprop.translate.routes.tdse_of(route)[source]#

Return the modal route’s TDSE extension, or None on every other route.

Parameters:
routeRoute

The route.

Returns:
TDSESource or None

The extension, when the route is a modal one carrying it.

solprop.translate.routes.transverse_of(route)[source]#

Return a spatial route’s transverse boundary, or None.

Parameters:
routeRoute

The route.

Returns:
solprop.spatial_absorber.SpatialAbsorberDesign or None

The resolved design, None on a modal route or without a boundary.