Skip to content

Commit

Permalink
Merge pull request #37 from ChabaneAmaury/forward_vectorization
Browse files Browse the repository at this point in the history
Improved f solver calculation
  • Loading branch information
liubenyuan authored Apr 9, 2022
2 parents 9279ba2 + 5428272 commit a40f85a
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 a40f85a

Please sign in to comment.