discretize.tests.OrderTest.getError#

OrderTest.getError()[source]#

Compute error defined as a norm of the residual.

This method is overwritten within the test class of a particular operator. Within the method, we define a test function \(f\), the analytic solution of an operator \(A(f)\) acting on the test function, and the numerical approximation obtained by applying the discretized operator \(A_h (f)\). getError is defined to return the norm of the residual as shown below:

\[error(h) = \| A_h(f) - A(f) \|\]