Coverage for hiphive/core/config.py: 100%
36 statements
« prev ^ index » next coverage.py v7.6.8, created at 2024-11-28 11:20 +0000
« prev ^ index » next coverage.py v7.6.8, created at 2024-11-28 11:20 +0000
1# This module contains the various variables used as tolerances and similar
2# throughout the code in the core functionality.
5class config:
6 class eigensymmetries:
7 rotation_integer_tolerance = 1e-12
8 method = 'iterative'
9 crystal_symmetries = True
11 class iterative:
12 zero_tolerance = 1e-12
13 simplify = True
14 simplify_tolerance = None
15 method = 'symbolic'
18"""This is the tolerance used when the rotation matrices and similar are tested
19if they are integers.
20"""
21integer_tolerance = 1e-12
23""" For each symmetry, the constraint matrix can be reduced to square
24again. This can be done either by 'symbolic', 'numeric' or not at all
25(None). Default is None since the matrix is often small enough to fit
26in memory.
27'symbolic', 'numeric', None
28"""
29eigentensor_compress_mode = None
31"""If this is True, before every symbolic compression the values will be
32simplified by sympy, potentially turning them into exact rational or
33irrational numbers. This can be useful for systems with non-integer
34rotation matrices in cartesian coordinates e.g. hcp. The main purpose is
35to make the rref more stable against repeating rounding errors.
36True, False
37"""
38eigentensor_simplify_before_compress = False
40""" If non compress was used during construction but used before solving
41True, False
42"""
43eigentensor_simplify_before_last_compress = False
45"""If the compress_mode is None the constraint matrix might be compressed
46right before the nullspace() solver
47'numeric', 'symbolic', None
48"""
49eigentensor_compress_before_solve = None
51"""This might make the nullspace() more stable
52True, False
53"""
54eigentensor_simplify_before_solve = True
56"""
57'symbolic', 'numeric'
58"""
59eigentensor_solve_mode = 'symbolic'
62"""
63'symbolic', 'numeric'
64"""
65sum_rule_constraint_mode = 'symbolic'
67"""
68True, False
69"""
70sum_rule_constraint_simplify = True
73"""
74True, False
75"""
76constraint_vectors_simplify_before_compress = True
78"""
79'symbolic', 'numeric', None
80"""
81constraint_vectors_compress_mode = 'symbolic'
83"""
84True, False
85"""
86constraint_vectors_simplify_before_solve = True
88"""
89'symbolic', 'numeric'
90"""
91constraint_vectors_solve_mode = 'symbolic'