solprop.translate.routes#
The closed union of route descriptions a propagation problem carries (SEP 47 6.2).
What differs between routes is carried by exactly one of three frozen variants, each holding the fields its executor needs and checking them on construction:
ModalRoute: modal amplitudes through the transform’s static synthesis and projection – the mode-averaged route and the resolved quadrature, a wall’s coupled flow among them – with the TDSE response as its extension (TDSESource).GeneralRoute: a general modal guide, whose transform carries the full E/H reference (transform.modal_tables).SpatialRoute: free space on a radial, Cartesian, planar or line grid (SPATIAL_KINDS,spatial_kind()), with its plane measure and transverse boundary.
route_name() names a route in a refusal; tdse_of(), flux_of(),
transverse_of() and tdse_descriptor() read a variant’s optional parts. A
backend visits problem.route with match and refuses, by name and before it
allocates, what it does not execute (docs/dev/kernel-contract.md, “The route
union”, and section 10 for extending it).
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.