From 0e0e93de25b63fdcc5ba0d70325abab5b2251319 Mon Sep 17 00:00:00 2001 From: Jompa Date: Mon, 24 Feb 2025 12:29:40 +0100 Subject: [PATCH] minor change in solveq to not cause problems when solving wihout given bcs --- src/calfem/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calfem/core.py b/src/calfem/core.py index fb1fa80..bbc9c0d 100644 --- a/src/calfem/core.py +++ b/src/calfem/core.py @@ -5300,15 +5300,15 @@ def solveq(K, f, bcPrescr=None, bcVal=None): """ + if bcPrescr is None: + return np.asmatrix(np.linalg.solve(K, f)) + nDofs = K.shape[0] nPdofs = bcPrescr.shape[0] if bcVal is None: bcVal = np.zeros([nPdofs], 'd') - if bcPrescr is None: - return np.asmatrix(np.linalg.solve(K, f)) - bc = np.ones(nDofs, 'bool') bcDofs = np.arange(nDofs)