Strings to typed objects¶
The public API no longer documents string selectors for behavior. Strings name objects chosen by the user. Typed descriptors choose algorithms, layouts, solvers, policies, and backends.
Conversion table¶
Old selector style |
Public typed style |
Package |
|---|---|---|
Riemann flux token |
|
|
Reconstruction token |
|
|
Limiter token |
|
|
Time scheme token |
|
|
Backend token |
|
|
Uniform target |
|
|
AMR target |
|
|
Regrid cadence |
|
|
Elliptic solver token |
|
|
Runtime param kind |
|
|
Output format token |
|
|
External brick id alone |
|
|
What stays a string¶
Strings remain valid when they are names:
Model("euler")
case.block("ions", physics=ions)
PoissonProblem(name="phi", unknown="phi")
RuntimeParam("nu", default=0.1)
T.state("U", block="ions")
Later references should use handles returned by the API when handles exist.
Documentation rule¶
Do not write examples that present a string as a behavior choice. If a page must mention a native token, call it an internal lowered id and show the typed descriptor users should write.