salvus.fem.error_estimations
salvus.fem.error_estimations salvus fem error_estimations Estimate numerical errors when using Salvus.
Spatial dispersion errors are estimated using references from:
W.A. Mulder, 1999 Spurious modes in finite-element discretizations of the wave equation may not be all that bad Applied Numerical Mathematics, Volume 30, Issue 4 https://doi.org/10.1016/S0168-9274(98)00078-6.
Functions
estimate_epw_for_new_p()
estimate_epw_for_new_p()def estimate_epw_for_new_p(
original_p: int_, original_epw: float_, new_p: int_
) -> float_: ...Estimate the required elements per wavelength for a new simulation.
Given an existing polynomial order and elements per wavelength settings, estimate the required elements per wavelength for a new polynomial order so that the spatial dispersion error per cycle remains approximately the same.
original_pint_ — The original polynomial order.original_epwfloat_ — The original elements per wavelength.new_pint_ — The new polynomial order.
estimate_epw_for_simulation()
estimate_epw_for_simulation()def estimate_epw_for_simulation(
p: int_, number_of_cycles: float_, acceptable_error: float_
) -> float_: ...Estimate the required elements per wavelength for a given accuracy.
Given a polynomial order, number of cycles, and acceptable error, estimate the required elements per wavelength so that the spatial dispersion error stays below the acceptable error.
pint_ — The polynomial order.number_of_cyclesfloat_ — The number of cycles/propagated wavelengths.acceptable_errorfloat_ — The acceptable error.
estimate_spatial_dispersion_error_per_cycle()
estimate_spatial_dispersion_error_per_cycle()def estimate_spatial_dispersion_error_per_cycle(
p: int_, elements_per_wavelength: T
) -> T: ...Estimate the spatial dispersion error per cycle.
This is an estimate of the spatial dispersion error per cycle/propagated wavelength of the spectral element method employed by Salvus, assuming perfect time integration.
pint_ — The polynomial order of the elements.elements_per_wavelengthT — The number of elements per wavelength.