Skip to content

Commit

Permalink
Refactor _doBCs
Browse files Browse the repository at this point in the history
  • Loading branch information
guyer committed Apr 27, 2024
1 parent 3de8be5 commit 7333981
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions fipy/terms/abstractDiffusionTerm.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,6 @@ def _getCoefficientMatrix(self, SparseMatrix, var, coeff):

return coefficientMatrix

def _bcAdd(self, coefficientMatrix, boundaryB, LL, bb):
coefficientMatrix += LL
boundaryB += bb

def _doBCs(self, SparseMatrix, higherOrderBCs, N, M, coeffs, coefficientMatrix, boundaryB):
for boundaryCondition in higherOrderBCs:
LL, bb = boundaryCondition._buildMatrix(SparseMatrix, N, M, coeffs)
Expand All @@ -276,7 +272,8 @@ def _doBCs(self, SparseMatrix, higherOrderBCs, N, M, coeffs, coefficientMatrix,
self._viewer.plot(matrix=LL, RHSvector=bb)
from fipy import input
input()
self._bcAdd(coefficientMatrix, boundaryB, LL, bb)
coefficientMatrix += LL
boundaryB += bb

return coefficientMatrix, boundaryB

Expand Down

0 comments on commit 7333981

Please sign in to comment.