Skip to content

Commit

Permalink
Make interpolator work for vector valued base functions
Browse files Browse the repository at this point in the history
  • Loading branch information
emi0000 committed Aug 5, 2024
1 parent c6b3675 commit fe3f474
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions skfem/assembly/basis/cell_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,20 @@ def probes(self, x: ndarray):
for k in range(self.Nbfun)
]
).flatten()
#number of components of the current base functions
try:
comp=len(self.elem.lbasis(self.elem.dim*[0],0)[0])
except:
comp=1
return coo_matrix(
(
phis,
(
np.tile(np.arange(x.shape[1]), self.Nbfun),
self.element_dofs[:, cells].flatten(),
np.tile(np.arange(comp*x.shape[1]), self.Nbfun),
self.element_dofs[:, np.tile(cells,comp)].flatten(),
),
),
shape=(x.shape[1], self.N),
shape=(comp*x.shape[1], self.N),
)

def point_source(self, x: ndarray) -> ndarray:
Expand Down

0 comments on commit fe3f474

Please sign in to comment.