Skip to content

Commit

Permalink
revert num_exp_function to use polynomial_dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Nov 9, 2023
1 parent b0173d4 commit 05d36c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions FIAT/polynomial_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ def __init__(self, ref_el, degree, shape=tuple()):
else:
flat_shape = numpy.ravel(shape)
num_components = numpy.prod(flat_shape)
expansion_set = expansions.ExpansionSet(ref_el)
num_exp_functions = expansion_set.get_num_members(degree)
num_exp_functions = expansions.polynomial_dimension(ref_el, degree)
num_members = num_components * num_exp_functions
embedded_degree = degree
expansion_set = expansions.ExpansionSet(ref_el)

if shape == tuple():
coeffs = numpy.eye(num_members)
Expand Down Expand Up @@ -219,11 +219,11 @@ def __init__(self, ref_el, degree, size=None):
size = sd

shape = (size, size)
expansion_set = expansions.ExpansionSet(ref_el)
num_exp_functions = expansion_set.get_num_members(degree)
num_exp_functions = expansions.polynomial_dimension(ref_el, degree)
num_components = size * (size + 1) // 2
num_members = num_components * num_exp_functions
embedded_degree = degree
expansion_set = expansions.ExpansionSet(ref_el)

# set up coefficients for symmetric tensors
coeffs_shape = (num_members, *shape, num_exp_functions)
Expand Down

0 comments on commit 05d36c9

Please sign in to comment.