Skip to content

Commit

Permalink
DefaultPoint
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Oct 29, 2023
1 parent 9064496 commit 7cfb083
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions FIAT/polynomial_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ class PolynomialSet(object):
function.
"""

def __init__(self, ref_el, degree, embedded_degree, expansion_set, coeffs, dmats=None):
def __init__(self, ref_el, degree, embedded_degree, expansion_set, coeffs):
self.ref_el = ref_el
self.num_members = coeffs.shape[0]
self.degree = degree
self.embedded_degree = embedded_degree
self.expansion_set = expansion_set
self.coeffs = coeffs
self.dmats = dmats or []
self.dmats = []

def tabulate_new(self, pts):
return numpy.dot(self.coeffs,
Expand Down
4 changes: 3 additions & 1 deletion FIAT/reference_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,9 @@ def make_affine_mapping(xs, ys):
def default_simplex(spatial_dim):
"""Factory function that maps spatial dimension to an instance of
the default reference simplex of that dimension."""
if spatial_dim == 1:
if spatial_dim == 0:
return Point()
elif spatial_dim == 1:
return DefaultLine()
elif spatial_dim == 2:
return DefaultTriangle()
Expand Down

0 comments on commit 7cfb083

Please sign in to comment.