spectral.utils.norms.discrete_l2_error#
- spectral.utils.norms.discrete_l2_error(f_exact: ndarray, f_num: ndarray, interval_length: float) float[source]#
Compute discrete L2 error between exact and numerical solutions. #TODO: Change to use Mass Matrix instead
- Parameters:
- f_exact
np.ndarray Exact function values
- f_num
np.ndarray Numerical approximation values
- interval_length
float Length of the interval
- f_exact
- Returns:
floatDiscrete L2 error norm