You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I generate appropriate tuples with generate_nonnegative_integer_tuples_summing_to_at_most tool?
I have added
def generate_quadrangle_vertex_tuples(order):
yield (0, 0)
yield (order, 0)
yield (order,order)
yield (0, order)
def generate_quadrangle_edge_tuples(order):
for i in range(1, order):
yield (i, 0)
for i in range(1, order):
yield (order, i)
for i in range(1, order):
yield (i, order)
for i in range(1, order):
yield (0, i)
def generate_quadrangle_volume_tuples(order):
for i in range(1, order):
for j in range(1, order):
yield (j, i)
and
class GmshIncompleteQuadrilateralElement(GmshElementBase):
dimensions = 2
def __init__(self, order):
self.order = order
@memoize_method
def gmsh_node_tuples(self):
result = []
for tup in generate_quadrangle_vertex_tuples(self.order):
result.append(tup)
for tup in generate_quadrangle_edge_tuples(self.order):
result.append(tup)
return result
class GmshQuadrilateralElement(GmshElementBase):
dimensions = 2
@memoize_method
def gmsh_node_tuples(self):
result = []
for tup in generate_quadrangle_vertex_tuples(self.order):
result.append(tup)
for tup in generate_quadrangle_edge_tuples(self.order):
result.append(tup)
for tup in generate_quadrangle_volume_tuples(self.order):
result.append(tup)
return result
which generate:
el = GmshQuadrilateralElement(1)
el.gmsh_node_tuples()
[(0, 0), (1, 0), (1, 1), (0, 1)]
el = GmshQuadrilateralElement(2)
el.gmsh_node_tuples()
Hello,
I'm trying to work on adding support for quadrilateral elements
(Quadrangle, Quadrangle8, Quadrangle9)
How can I generate appropriate tuples with generate_nonnegative_integer_tuples_summing_to_at_most tool?
I have added
and
which generate:
but the node numbering is not compatible (sum of integers > self.order | self.dimension) with tuples returned by lexicographic_node_tuples.
Thanks
The text was updated successfully, but these errors were encountered: