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
The four kinds of transverse grid a spatial route runs on. |
|
Every spatial kind, in the order the manual lists them. |
|
The closed union of route descriptions. |
Functions
|
Return a spatial route's plane measure, or |
|
Return the name a refusal gives a route. |
|
Return the spatial kind a transverse geometry is. |
|
Return the TDSE extension's scientific identity, or |
|
Return the modal route's TDSE extension, or |
|
Return a spatial route's transverse boundary, or |
Classes
|
A general modal guide, its transform carrying the full E/H reference. |
|
Modal amplitudes through the transform's static synthesis and projection. |
|
Free space on a transverse grid of one of four kinds. |
|
The TDSE response: the modal route's reference-only extension (SEP 26). |
- class solprop.translate.routes.GeneralRoute(transform)[source]#
Bases:
objectA 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.mdsection 4).- Attributes:
- transformsolprop.translate.modal.Transform
A modal transform with
modal_tables.
- Raises:
- TranslationError
If the transform carries no general modal tables.
- class solprop.translate.routes.ModalRoute(transform, tdse=None)[source]#
Bases:
objectModal 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;
Nonewithout one.
- Raises:
- TranslationError
If the transform is not a modal one.
- tdse: TDSESource | None = None#
- 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:
objectFree 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);
Nonefor none.
- Raises:
- TranslationError
If the transform has no geometry or the kind is not the geometry’s.
- kind: SpatialKind#
- transverse: SpatialAbsorberDesign | None = None#
- class solprop.translate.routes.TDSESource(descriptor, current_numerator)[source]#
Bases:
objectThe 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.mdsection 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#
- solprop.translate.routes.flux_of(route)[source]#
Return a spatial route’s plane measure, or
Noneon 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
Nonewithout one.- Parameters:
- routeRoute
The route.
- Returns:
- solprop.translate.tdse.TDSEDescriptor or None
The descriptor of the modal route’s TDSE extension.