Skip to content

Commit

Permalink
Small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
brownbaerchen committed Oct 17, 2023
1 parent ed343bd commit b36345b
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions pySDC/implementations/problem_classes/Quench.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,7 @@ def __init__(
readOnly=False,
)

# compute dx (equal in both dimensions) and get discretization matrix A
if self.bc == 'periodic':
self.dx = 1.0 / self.nvars
xvalues = np.array([i * self.dx for i in range(self.nvars)])
elif self.bc in ['neumann-zero', 'dirichlet-zero']:
self.dx = 1.0 / (self.nvars + 1)
xvalues = np.array([(i + 1) * self.dx for i in range(self.nvars)])
# elif self.bc == 'neumann-zero':
# self.dx = 1.0 / (self.nvars -1)
# xvalues = np.array([i * self.dx for i in range(self.nvars)])
else:
raise ProblemError(f'Boundary conditions {self.bc} not implemented.')

# setup finite difference discretization from problem helper
self.dx, xvalues = problem_helper.get_1d_grid(size=self.nvars, bc=self.bc)

self.A = problem_helper.get_finite_difference_matrix(
Expand Down

0 comments on commit b36345b

Please sign in to comment.