perturbopy.test_utils.run_test.run_utils.setup_default_tol
- perturbopy.test_utils.run_test.run_utils.setup_default_tol(igns_n_tols, test_case)
Setup the default tolerances for each file to compare if the tolerances are not specified in the pert_input.yml file.
This function ensures that every output file to compare has the following dictionary structure:
output_file.yml: abs tol: default: 1e-8 # relative error rel tol: default: 0.01
The elements are considerent different if the following equation does not apply:
>>> absolute(a - b) <= (abs_tol + rel_tol * absolute(b))
- Parameters:
igns_n_tols (list) – list of dictionaries, which contain containing the tolerances needed to performance comparison of ref_outs and new_outs
test_case (str) – define what type of the test we run - for perturbo testing or for the qe2pert testing.
- Returns:
igns_n_tols_updated – updated list containing the dictionary with tolerances
- Return type:
list