Skip to content

Commit

Permalink
Merge branch 'pbrubeck/recursive-nodes' into pbrubeck/dmat-without-sympy
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck authored Nov 5, 2023
2 parents 2eae684 + 3485d41 commit c3690ce
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 107 deletions.
2 changes: 1 addition & 1 deletion FIAT/lagrange.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class LagrangeDualSet(dual_set.DualSet):
simplices of any dimension. Nodes are point evaluation at
equispaced points."""

def __init__(self, ref_el, degree, family="equi"):
def __init__(self, ref_el, degree, family=None):
entity_ids = {}
nodes = []
entity_permutations = {}
Expand Down
2 changes: 1 addition & 1 deletion FIAT/quadrature.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_weights(self):
return numpy.array(self.wts)

def integrate(self, f):
return sum([w * f(x) for (x, w) in zip(self.pts, self.wts)])
return sum(w * f(x) for x, w in zip(self.pts, self.wts))


class GaussJacobiQuadratureLineRule(QuadratureRule):
Expand Down
103 changes: 0 additions & 103 deletions FIAT/recursive_points.py

This file was deleted.

6 changes: 4 additions & 2 deletions FIAT/reference_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,16 @@ def lattice_iter(start, finish, depth):
yield jj + [ii]


def make_lattice(verts, n, interior=0, family="equi"):
def make_lattice(verts, n, interior=0, family=None):
"""Constructs a lattice of points on the simplex defined by verts.
For example, the 1:st order lattice will be just the vertices.
The optional argument interior specifies how many points from
the boundary to omit. For example, on a line with n = 2,
and interior = 0, this function will return the vertices and
midpoint, but with interior = 1, it will only return the
midpoint."""
if family is None or family == "equispaced":
family = "equi"
family = _decode_family(family)
D = len(verts)
X = numpy.array(verts)
Expand Down Expand Up @@ -404,7 +406,7 @@ def compute_face_edge_tangents(self, dim, entity_id):
edge_ts.append(vert_coords[dest] - vert_coords[source])
return edge_ts

def make_points(self, dim, entity_id, order, family="equi"):
def make_points(self, dim, entity_id, order, family=None):
"""Constructs a lattice of points on the entity_id:th
facet of dimension dim. Order indicates how many points to
include in each direction."""
Expand Down

0 comments on commit c3690ce

Please sign in to comment.