Coverage for pySDC/implementations/problem_classes/boussinesq_helpers/helper_classes.py: 0%
19 statements
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-20 14:51 +0000
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-20 14:51 +0000
1class logging(object):
2 def __init__(self):
3 self.solver_calls = 0
4 self.iterations = 0
5 self.nsmall = 0
7 def add(self, iterations):
8 self.solver_calls += 1
9 self.iterations += iterations
12class Callback(object):
13 def getresidual(self):
14 return self.residual
16 def getcounter(self):
17 return self.counter
19 def __init__(self):
20 self.counter = 0
21 self.residual = 0.0
23 def __call__(self, residuals):
24 self.counter += 1
25 self.residual = residuals