Skip to content

Commit 305be74

Browse files
committed
Removed methods that are already included in inheritance
1 parent 9858a68 commit 305be74

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

pySDC/implementations/problem_classes/Battery.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -274,41 +274,6 @@ def u_exact(self, t):
274274

275275
return me
276276

277-
def get_switching_info(self, u, t):
278-
"""
279-
Provides information about a discrete event for one subinterval.
280-
281-
Args:
282-
u (dtype_u): current values
283-
t (float): current time
284-
285-
Returns:
286-
switch_detected (bool): Indicates if a switch is found or not
287-
m_guess (np.int): Index of collocation node inside one subinterval of where the discrete event was found
288-
vC_switch (list): Contains function values of switching condition (for interpolation)
289-
"""
290-
291-
switch_detected = False
292-
m_guess = -100
293-
294-
for m in range(len(u)):
295-
if u[m][1] - self.params.V_ref[0] <= 0:
296-
switch_detected = True
297-
m_guess = m - 1
298-
break
299-
300-
vC_switch = [u[m][1] - self.params.V_ref[0] for m in range(1, len(u))] if switch_detected else []
301-
302-
return switch_detected, m_guess, vC_switch
303-
304-
def count_switches(self):
305-
"""
306-
Counts the number of switches. This function is called when a switch is found inside the range of tolerance
307-
(in switch_estimator.py)
308-
"""
309-
310-
self.nswitches += 1
311-
312277

313278
class battery_implicit(battery):
314279
def __init__(self, problem_params, dtype_u=mesh, dtype_f=mesh):

0 commit comments

Comments
 (0)