verify()#
- OperatorTemplate.verify(plot: bool = False, *, k: int = 10, fdifftol: float = 1e-05, ntests: int = 4) None[source]#
Verify consistency between dimension properties and required methods.
This method verifies
apply()and, if implemented,jacobian(),galerkin(),copy(),save(), andload().- Parameters:
- plotbool
If
True, plot the relative errors of the finite difference check forjacobian()as a function of the perturbation size. IfFalse(default), print a report of the relative errors. Nothing is plotted or printed ifjacobian()is not implemented.
Notes
This method does not verify the correctness of
apply(), only that it returns an output with the expected shape. However, ifjacobian()is implemented, a finite difference check is applied to check thatapply()andjacobian()are consistent.