forked from FEniCS/fiat
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in mapdes/fiat/entity-argument (pull request #28)
Add optional entity argument to the tabulate method
- Loading branch information
Showing
7 changed files
with
58 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
# along with FIAT. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
# Modified by David A. Ham ([email protected]), 2014 | ||
# Modified by Thomas H. Gibson ([email protected]), 2016 | ||
|
||
from __future__ import absolute_import, print_function, division | ||
|
||
|
@@ -138,10 +139,23 @@ def space_dimension(self): | |
"Return the dimension of the finite element space." | ||
return self.poly_set.get_num_members() | ||
|
||
def tabulate(self, order, points): | ||
def tabulate(self, order, points, entity=None): | ||
"""Return tabulated values of derivatives up to given order of | ||
basis functions at given points.""" | ||
return self.poly_set.tabulate(points, order) | ||
basis functions at given points. | ||
:arg order: The maximum order of derivative. | ||
:arg points: An iterable of points. | ||
:arg entity: Optional (dimension, entity number) pair | ||
indicating which topological entity of the | ||
reference element to tabulate on. If ``None``, | ||
default cell-wise tabulation is performed. | ||
""" | ||
if entity is None: | ||
entity = (self.ref_el.get_spatial_dimension(), 0) | ||
|
||
entity_dim, entity_id = entity | ||
transform = self.ref_el.get_entity_transform(entity_dim, entity_id) | ||
return self.poly_set.tabulate(list(map(transform, points)), order) | ||
|
||
def value_shape(self): | ||
"Return the value shape of the finite element functions." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters