From 5428272402ea3a35eb1b38dcf00a1b26434c3795 Mon Sep 17 00:00:00 2001 From: Amaury CHABANE Date: Sat, 9 Apr 2022 14:06:36 +0200 Subject: [PATCH] Improved f solver calculation --- pyeit/eit/fem.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyeit/eit/fem.py b/pyeit/eit/fem.py index a58a7a7..a5030c9 100644 --- a/pyeit/eit/fem.py +++ b/pyeit/eit/fem.py @@ -238,10 +238,7 @@ def solve_nd(self, ex_mat, perm): # 4. solving nodes potential using boundary conditions b = self._natural_boundary_nd(ex_mat) - def f_init(b): - return np.dot(r_matrix, b).ravel() - - f = np.array(list(map(f_init, b))) + f = np.dot(r_matrix, b[:, None]).T.reshape(b.shape[:-1]) # 5. build Jacobian matrix column wise (element wise) # Je = Re*Ke*Ve = (nex3) * (3x3) * (3x1)