Skip to content

Commit

Permalink
Improved f solver calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
ChabaneAmaury committed Apr 9, 2022
1 parent 9279ba2 commit 5428272
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pyeit/eit/fem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5428272

Please sign in to comment.