verify()#
- QuadraticOperator.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()
, andload()
. If theentries
are not set, no checks are made.- 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.