qttools.boundary_conditions#
source package qttools.boundary_conditions
Classes
-
BaseBoundarySystem — Abstract base class to solve boundary systems with memoization and system reduction.
source class BaseBoundarySystem(boundary_solver, cache_compressor: None = None, system_reducer: SystemReducer | None = None, num_ref_iterations: int = 2, relative_tol: float = 0.2, absolute_tol: float = 1e-06, warning_threshold: float = 0.1, memoization_mode: str = 'auto', agreement_threshold: float = 0.999)
Bases : ABC
Abstract base class to solve boundary systems with memoization and system reduction.
Initializes the boundary method.
Parameters
-
boundary_solver : callable — The boundary system solver to be memoized.
-
cache_compressor : object, optional — An object with 'compress' and 'decompress' methods to handle cache compression. If None, no compression is applied.
-
num_ref_iterations : int, optional — The number of fixed-point iterations to refine the solution. Default is 2.
-
relative_tol : float, optional — The relative tolerance for convergence. Default is 0.2.
-
absolute_tol : float, optional — The absolute tolerance for convergence. Default is 1e-6.
-
warning_threshold : float, optional — The threshold for issuing a warning about high residuals. Default is 0.1.
-
memoization_mode : str, optional — The memoization mode. Can be 'off', 'auto', 'force-after-first', or 'force'. Default is 'auto'.
-
agreement_threshold : float, optional — The threshold for agreement across MPI ranks to consider a memoized solution valid. Default is 0.999.