Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions finat/finiteelementbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,29 @@ def mapping(self):
'''Appropriate mapping from the reference cell to a physical cell for
all basis functions of the finite element.'''

@cached_property
def has_pointwise_dual_basis(self):
'''Whether this element's dual basis consist only of point
Comment thread
pbrubeck marked this conversation as resolved.
Outdated
evaluation functionals.'''
try:
Q, ps = self.dual_basis
except NotImplementedError:
return False
# Check whether the weight matrix is a product of identity matrices
# A pointwise dual basis has gem.Delta as the only terminal node
children = [Q]
while children:
nodes = []
for c in children:
if isinstance(c, gem.Delta):
pass
elif isinstance(c, gem.gem.Terminal):
return False
else:
nodes.extend(c.children)
children = nodes
return True


def entity_support_dofs(elem, entity_dim):
'''Return the map of entity id to the degrees of freedom for which
Expand Down