Skip to content

Commit

Permalink
no more restore_shape
Browse files Browse the repository at this point in the history
  • Loading branch information
miklos1 committed Oct 20, 2016
1 parent 3551f66 commit 03b8b21
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tsfc/geometric.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

import gem

from finat.point_set import restore_shape

from tsfc.parameters import NUMPY_TYPE


Expand Down Expand Up @@ -107,9 +105,12 @@ def translate_cell_coordinate(terminal, mt, params):
# This destroys the structure of the quadrature points, but since
# this code path is only used to implement CellCoordinate in facet
# integrals, hopefully it does not matter much.
point_shape = tuple(index.extent for index in ps.indices)

def callback(entity_id):
t = params.fiat_cell.get_entity_transform(params.integration_dim, entity_id)
return gem.Literal(restore_shape(asarray(list(map(t, ps.points))), ps))
data = asarray(list(map(t, ps.points)))
return gem.Literal(data.reshape(point_shape + data.shape[1:]))

return gem.partial_indexed(params.entity_selector(callback, mt.restriction),
ps.indices)
Expand Down

0 comments on commit 03b8b21

Please sign in to comment.