Detailed API reference¶
This page is generated from Yonderdrake’s public Python objects. The concise support tables and method-selection guidance remain in API and supported scope.
Time-memory operators¶
Yonderdrake public interface.
Markers¶
Representations¶
- class yonderdrake.BirkSong(num_modes, **method_parameters)[source]¶
Birk-Song’s squared Cayley-transform Gauss-Jacobi spectrum.
- Parameters:
num_modes (int)
method_parameters (Any)
- class yonderdrake.Diethelm(num_modes, **method_parameters)[source]¶
Diethelm’s Gauss-Jacobi improvement of the diffusive representation.
- Parameters:
num_modes (int)
method_parameters (Any)
- class yonderdrake.Diethelm2022(num_modes, *, quadrature='trapezoidal', target_error=1e-08, decay_scale=1.0, truncation_radius=None, rate_scale=1.0)[source]¶
Truncate Diethelm’s 2022 real-line representation for quadrature.
quadratureselects composite trapezoidal, composite Simpson, or Gauss-Legendre weights. Simpson quadrature requires an oddnum_modes. Automatic truncation balances tail and grid estimates. An explicittruncation_radiusbypasses that balance.- Warning:
This representation is provided for expert use and comparison. It is more sensitive to mode count, time range, and scaling than BirkSong or Diethelm.
- Parameters:
- class yonderdrake.YuanAgrawal(num_modes, *, rate_scale=1.0)[source]¶
Original Yuan-Agrawal Gauss-Laguerre diffusive spectrum.
- Warning:
This representation is provided for expert use and comparison. It is generally less robust per mode than
BirkSongorDiethelm.
Formulations and steppers¶
- class yonderdrake.Recurrence(interpolant='linear')[source]¶
Eliminated constant-memory recurrence formulation.
- Parameters:
interpolant (str)
- class yonderdrake.AuxiliaryODE(scheme='backward_euler', coupling='monolithic')[source]¶
Monolithic physical-plus-mode auxiliary-ODE formulation.
- yonderdrake.FractionalTimeStepper(F, representation, t, dt, u, *, formulation=None, u0=None, bcs=None, solver_parameters=None, appctx=None)[source]¶
Construct a native formulation for a fractional derivative marker.
Spatial operators¶
- yonderdrake.SpectralFractionalLaplacian(u, s, *, bcs, sinc_truncation_target=1e-10, shift_cache='stream', shift_solver_parameters=None, mass_solver_parameters=None)[source]¶
Create the primal external operator representing
(-Delta_D)^s.
Caputo-Wismer applications¶
Application-level building blocks.
- class yonderdrake.applications.CaputoWismerMaterial(indicator, wave_speed, damping, alpha)[source]¶
One piecewise material in a Caputo-Wismer wave model.
- class yonderdrake.applications.SensorArray(space, locations, *, width)[source]¶
Gaussian volume sensors with a matching discrete adjoint.
- Parameters:
space (Any)
locations (Any)
width (float)
- classmethod ring(space, num_sensors, radius, *, width, center=(0.0, 0.0))[source]¶
Construct a two-dimensional circular sensor array.
- classmethod sphere(space, num_sensors, radius, *, width, center=(0.0, 0.0, 0.0))[source]¶
Construct a three-dimensional spherical sensor array.
- sample(field)[source]¶
Return the spatially averaged value recorded by every sensor.
- Parameters:
field (Any)
- Return type:
ndarray
- class yonderdrake.applications.CaputoWismerStepper(u, t, dt, *, materials, representation=None, num_modes=32, source=None, absorbing_speed=None, initial_velocity=0.0, bcs=None, stiffness_theta=1.0, solver_parameters=None, appctx=None)[source]¶
Advance a heterogeneous Caputo-Wismer wave equation.
- Parameters:
u (Any)
t (Any)
dt (Any)
materials (Sequence[CaputoWismerMaterial])
representation (Any)
num_modes (int)
source (Any)
absorbing_speed (Any)
initial_velocity (Any)
bcs (Any)
stiffness_theta (float)
solver_parameters (Any)
appctx (Any)
- yonderdrake.applications.record_sensor_data(initial_pressure, sensors, *, materials, dt, num_steps, num_modes=32, representation=None, absorbing_speed=None, stiffness_theta=0.0, solver_parameters=None)[source]¶
Propagate initial pressure and record a chosen sensor array.
- yonderdrake.applications.ring_sensor_locations(num_sensors, radius, *, center=(0.0, 0.0))[source]¶
Return uniformly spaced sensor centres on a two-dimensional ring.
- yonderdrake.applications.sphere_sensor_locations(num_sensors, radius, *, center=(0.0, 0.0, 0.0))[source]¶
Return approximately uniform sensor centres on a three-dimensional sphere.
- class yonderdrake.applications.CaputoWismerForwardOperator(space, sensors, *, materials, dt, num_steps, num_modes=32, representation=None, absorbing_speed=None, attenuation='dissipative', stiffness_theta=0.0, solver_parameters=None)[source]¶
Linear initial-pressure to sensor-trace map and its discrete adjoint.
- Parameters:
space (Any)
sensors (SensorArray)
materials (Sequence[CaputoWismerMaterial])
dt (float)
num_steps (int)
num_modes (int)
representation (Any)
absorbing_speed (Any)
attenuation (AttenuationMode)
stiffness_theta (float)
solver_parameters (Any)
- forward(initial_pressure)[source]¶
Propagate one initial pressure and return all sensor samples.
- Parameters:
initial_pressure (Any)
- Return type:
ndarray
- class yonderdrake.applications.CaputoWismerInverseProblem(space, sensor_data, sensors, *, materials, dt, num_modes=32, representation=None, absorbing_speed=None, attenuation='dissipative', stiffness_theta=0.0, regularization=1e-06, solver_parameters=None)[source]¶
Kaltenbacher-style regularized initial-pressure reconstruction.
- Parameters:
space (Any)
sensor_data (Any)
sensors (SensorArray)
materials (Sequence[CaputoWismerMaterial])
dt (float)
num_modes (int)
representation (Any)
absorbing_speed (Any)
attenuation (AttenuationMode)
stiffness_theta (float)
regularization (float)
solver_parameters (Any)
- objective_gradient(candidate)[source]¶
Return the Tikhonov objective and its coefficient-space gradient.
- class yonderdrake.applications.CaputoWismerReconstruction(pressure, converged, iterations, objective, objective_history, message, function_evaluations, forward_seconds, adjoint_seconds, elapsed_seconds)[source]¶
Result and diagnostics from an adjoint reconstruction.
- yonderdrake.applications.reconstruct_initial_pressure(space, sensor_data, sensors, *, materials, dt, method='kaltenbacher', attenuation='dissipative', num_modes=32, representation=None, absorbing_speed=None, stiffness_theta=0.0, regularization=1e-06, initial_guess=None, max_iterations=None, tolerance=1e-07, positivity=False, warm_start=False, solver_parameters=None)[source]¶
Reconstruct initial pressure with the selected Python imaging method.
- Parameters:
space (Any)
sensor_data (Any)
sensors (SensorArray)
materials (Sequence[CaputoWismerMaterial])
dt (float)
method (Literal['kaltenbacher', 'adjoint'])
attenuation (Literal['dissipative', 'none'])
num_modes (int)
representation (Any)
absorbing_speed (Any)
stiffness_theta (float)
regularization (float)
initial_guess (Any)
max_iterations (int | None)
tolerance (float)
positivity (bool)
warm_start (bool)
solver_parameters (Any)
- Return type: