Hipace
|
Public Member Functions | |
def | __init__ (self, test_name, file_name, do_fields=True, do_particles=True, ndigit=14) |
def | read_output_file (self, do_fields=True, do_particles=True) |
def | evaluate (self, rtol=1.e-9, atol=1.e-40, skip_dict={}) |
def | trim_digits (self, x) |
Public Attributes | |
test_name | |
file_name | |
ndigit | |
data | |
Class for checksum comparison of one test.
def checksum.checksum.Checksum.__init__ | ( | self, | |
test_name, | |||
file_name, | |||
do_fields = True , |
|||
do_particles = True , |
|||
ndigit = 14 |
|||
) |
Constructor Store test_name and file_name name, and compute checksum from file_name and store it in self.data. @param self The object pointer. @param test_name Name of test, as found between [] in .ini file. @param file_name IO file from which the checksum is computed. @param do_fields Whether to compare fields in the checksum. @param do_particles Whether to compare particles in the checksum. @param ndigit Number of digits stored in benchmarks.
def checksum.checksum.Checksum.evaluate | ( | self, | |
rtol = 1.e-9 , |
|||
atol = 1.e-40 , |
|||
skip_dict = {} |
|||
) |
Compare IO file checksum with benchmark. Read checksum from IO file, read benchmark corresponding to test_name, and assert that they are equal. Almost all the body of this functions is for user-readable print statements. @param self The object pointer. @param test_name Name of test, as found between [] in .ini file. @param file_name IO file from which the checksum is computed.
def checksum.checksum.Checksum.read_output_file | ( | self, | |
do_fields = True , |
|||
do_particles = True |
|||
) |
Get checksum from IO file. Read an simulation IO file, compute 1 checksum per field and return all checksums in a dictionary. The checksum of quantity Q is max(abs(Q)). @param self The object pointer. @param do_fields Whether to read fields from the IO file. @param do_particles Whether to read particles from the IO file.
def checksum.checksum.Checksum.trim_digits | ( | self, | |
x | |||
) |
Trim the number of signigicant digits @param x number to trim
checksum.checksum.Checksum.data |
checksum.checksum.Checksum.file_name |
checksum.checksum.Checksum.ndigit |
checksum.checksum.Checksum.test_name |