Coverage for gamdpy/integrators/integrator.py: 78%

9 statements  

« prev     ^ index     » next       coverage.py v7.9.1, created at 2025-06-14 15:55 +0200

1from abc import ABC, abstractmethod 

2from gamdpy import Configuration 

3 

4class Integrator(ABC): 

5 """ 

6 Abstract Base Class specifying the requirements for an integrator 

7 """ 

8 

9 @abstractmethod 

10 def get_kernel(self, configuration: Configuration, compute_plan: dict, compute_flags: dict, interactions_kernel): 

11 """ 

12 Get a kernel (or python function depending on compute_plan["gridsync"]) that implements performing a number of steps of the integrator 

13 """ 

14 

15 pass 

16 

17 @abstractmethod 

18 def get_params(self, configuration: Configuration, interactions_params: dict) -> tuple : 

19 """ 

20 Get a tuple with the parameters expected by the associated kernel 

21 """ 

22 

23 pass