@@ -85,6 +85,7 @@ def __init__(self, name):
8585
8686 self ._doComparison = True
8787 self ._tolerance = None
88+ self ._abs_tolerance = None
8889 self ._particle_tolerance = None
8990
9091 self .analysisRoutine = ""
@@ -294,6 +295,20 @@ def set_tolerance(self, value):
294295
295296 self ._tolerance = value
296297
298+ def get_abs_tolerance (self ):
299+ """ Returns the global absolute tolerance if one was set,
300+ and the test-specific one otherwise.
301+ """
302+
303+ if Test .global_abs_tolerance is None :
304+ return self ._abs_tolerance
305+ return Test .global_abs_tolerance
306+
307+ def set_abs_tolerance (self , value ):
308+ """ Sets the test-specific absolute tolerance to the specified value. """
309+
310+ self ._abs_tolerance = value
311+
297312 def get_particle_tolerance (self ):
298313 """ Returns the global particle tolerance if one was set,
299314 and the test-specific one otherwise.
@@ -346,6 +361,7 @@ def set_runs_to_average(self, value):
346361 compile_only = False
347362 skip_comparison = False
348363 global_tolerance = None
364+ global_abs_tolerance = None
349365 global_particle_tolerance = None
350366 performance_params = []
351367
@@ -354,6 +370,7 @@ def set_runs_to_average(self, value):
354370 compileTest = property (get_compile_test , set_compile_test )
355371 doComparison = property (get_do_comparison , set_do_comparison )
356372 tolerance = property (get_tolerance , set_tolerance )
373+ abs_tolerance = property (get_abs_tolerance , set_abs_tolerance )
357374 particle_tolerance = property (get_particle_tolerance , set_particle_tolerance )
358375 check_performance = property (get_check_performance , set_check_performance )
359376 performance_threshold = property (get_performance_threshold , set_performance_threshold )
@@ -979,7 +996,7 @@ def build_tools(self, test_list):
979996 if ("fextract" in self .extra_tools ): ftools .append ("fextract" )
980997 if ("fextrema" in self .extra_tools ): ftools .append ("fextrema" )
981998 if ("ftime" in self .extra_tools ): ftools .append ("ftime" )
982- if any ([t for t in test_list if t .tolerance is not None ]): ftools .append ("fvarnames" )
999+ if any ([t for t in test_list if t .tolerance is not None or t . abs_tolerance is not None ]): ftools .append ("fvarnames" )
9831000
9841001 for t in ftools :
9851002 self .log .log (f"building { t } ..." )
@@ -1073,6 +1090,7 @@ def apply_args(self):
10731090 Test .compile_only = args .compile_only
10741091 Test .skip_comparison = args .skip_comparison
10751092 Test .global_tolerance = args .tolerance
1093+ Test .global_abs_tolerance = args .abs_tolerance
10761094 Test .global_particle_tolerance = args .particle_tolerance
10771095 Test .performance_params = args .check_performance
10781096
0 commit comments