verify()

verify()#

ConstantOperator.verify(plot: bool = False, *, k: int = 10, ntests: int = 4, r: int = 6, m: int = 3) None#

Verify consistency between dimension properties and required methods.

This method verifies apply() and, if implemented, jacobian(), galerkin(), copy(), save(), and load(). If the entries are not set, no checks are made.

Parameters:
plotbool

If True, plot the relative errors of the finite difference check for jacobian() as a function of the perturbation size. If False (default), print a report of the relative errors. Nothing is plotted or printed if jacobian() is not implemented.

Notes

This method does not verify the correctness of apply(), only that it returns an output with the expected shape. However, if jacobian() is implemented, a finite difference check is applied to check that apply() and jacobian() are consistent.