pde_opt.numerics.utils.testing
This module contains helper functions for testing the PDEs.
Functions
|
Test convergence of a numeric equation against a symbolic equation. |
|
L2 relative error between numeric and symbolic |
|
Log–log plot of error vs dx with dotted reference slopes. |
- pde_opt.numerics.utils.testing.l2_rel_err(numeric, symbolic)[source]
L2 relative error between numeric and symbolic
- pde_opt.numerics.utils.testing.check_convergence(numeric: Type[BaseEquation], symbolic: Type[BaseSymbolicEquation], numeric_args, symbolic_args, Ns, L)[source]
Test convergence of a numeric equation against a symbolic equation.
- Parameters:
numeric – Numeric equation class
symbolic – Symbolic equation class
numeric_args – Arguments for the numeric equation
symbolic_args – Arguments for the symbolic equation
Ns – List of grid sizes to test
L – Length of the domain
- Returns:
List of grid sizes and errors