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

yonderdrake.CaputoDerivative(u, alpha)[source]

Create a Caputo marker for FractionalTimeStepper.

Parameters:
Return type:

Any

yonderdrake.RiemannLiouvilleDerivative(u, alpha)[source]

Create a left Riemann-Liouville marker.

Parameters:
Return type:

Any

yonderdrake.ExponentialMemory(u, decay_rate)[source]

Create a one-timescale fading-memory marker.

Parameters:
Return type:

Any

yonderdrake.CaputoFabrizioOperator(u, alpha, *, normalization=1.0)[source]

Return the published Caputo-Fabrizio exponential-memory operator.

Parameters:
Return type:

Any

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.

quadrature selects composite trapezoidal, composite Simpson, or Gauss-Legendre weights. Simpson quadrature requires an odd num_modes. Automatic truncation balances tail and grid estimates. An explicit truncation_radius bypasses 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:
spectrum(alpha)[source]

Generate positive modes for the truncated real-line integral.

Parameters:

alpha (float)

Return type:

DiffusiveSpectrum

describe(alpha=None)[source]

Describe the configuration or one ordered spectrum.

Parameters:

alpha (float | None)

Return type:

dict[str, Any]

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 BirkSong or Diethelm.

Parameters:
spectrum(alpha)[source]

Generate the original squared-node Gauss-Laguerre spectrum.

Parameters:

alpha (float)

Return type:

DiffusiveSpectrum

describe(alpha=None)[source]

Describe the configuration or one generated spectrum.

Parameters:

alpha (float | None)

Return type:

dict[str, Any]

class yonderdrake.FullHistory(interpolant='linear')[source]

Direct time history with piecewise-linear interpolation.

Parameters:

interpolant (str)

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.

Parameters:
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.

Parameters:
Return type:

Any

yonderdrake.TimeMemoryStepper(F, t, dt, u, *, representation=None, formulation=None, u0=None, bcs=None, solver_parameters=None, appctx=None, warn_initial_compatibility=True)[source]

Advance exponential memory and optional fractional time markers.

Parameters:
Return type:

Any

class yonderdrake.ExponentialMemoryCompatibilityWarning[source]

Warn that bounded-kernel evolution requires compatible initial data.

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.

Parameters:
  • u (Any)

  • s (Any)

  • bcs (Any)

  • sinc_truncation_target (float)

  • shift_cache (str)

  • shift_solver_parameters (Any)

  • mass_solver_parameters (Any)

Return type:

Any

yonderdrake.RieszFractionalLaplacian(u, s, *, extension='zero', quadrature_degree=6, quadrature_rule='edge', assembly='matfree', compression_tolerance=1e-06, admissibility=1.0, leaf_size=16, bcs=None, mass_solver_parameters=None)[source]

Create the affine-triangle zero-exterior external operator.

Parameters:
  • u (Any)

  • s (Any)

  • extension (str)

  • quadrature_degree (int)

  • quadrature_rule (str)

  • assembly (str)

  • compression_tolerance (float)

  • admissibility (float)

  • leaf_size (int)

  • bcs (Any)

  • mass_solver_parameters (Any)

Return type:

Any

yonderdrake.PeriodicFractionalLaplacian(u, s)[source]

Create the Fourier multiplier (-Delta_periodic)^s.

Parameters:
Return type:

Any

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.

Parameters:
  • indicator (Any)

  • wave_speed (Any)

  • damping (Any)

  • alpha (Any)

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.

Parameters:
Return type:

SensorArray

classmethod sphere(space, num_sensors, radius, *, width, center=(0.0, 0.0, 0.0))[source]

Construct a three-dimensional spherical sensor array.

Parameters:
Return type:

SensorArray

sample(field)[source]

Return the spatially averaged value recorded by every sensor.

Parameters:

field (Any)

Return type:

ndarray

adjoint_field(values, *, out=None)[source]

Map sensor values back to their normalized spatial kernels.

Parameters:
Return type:

Any

adjoint_covector(values, *, out=None)[source]

Apply the exact coefficient-space transpose of sample.

Parameters:
Return type:

Any

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)

advance()[source]

Advance one step and commit the two physical wave histories.

Return type:

None

reset(u0, *, initial_velocity=0.0, t0=None)[source]

Reset the wave field, velocity, and fractional memory.

Parameters:
Return type:

None

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.

Parameters:
Return type:

ndarray

yonderdrake.applications.ring_sensor_locations(num_sensors, radius, *, center=(0.0, 0.0))[source]

Return uniformly spaced sensor centres on a two-dimensional ring.

Parameters:
Return type:

ndarray

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.

Parameters:
Return type:

ndarray

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

adjoint_covector(sensor_values)[source]

Apply the exact transpose of forward to sensor-time values.

Parameters:

sensor_values (Any)

Return type:

Any

adjoint(sensor_values)[source]

Return the spatial L2 representative of the discrete adjoint.

Parameters:

sensor_values (Any)

Return type:

Any

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.

Parameters:

candidate (Any)

Return type:

tuple[float, Any]

solve(*, initial_guess=None, max_iterations=None, tolerance=1e-07, positivity=False, warm_start=False)[source]

Minimize the regularized data misfit with L-BFGS-B.

Parameters:
  • initial_guess (Any)

  • max_iterations (int | None)

  • tolerance (float)

  • positivity (bool)

  • warm_start (bool)

Return type:

CaputoWismerReconstruction

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.

Parameters:
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:
Return type:

Any