MCPcopy Create free account
hub / github.com/Apress/python-for-matlab-development / equitriangle_model

Function equitriangle_model

pythran/fem/main.py:59–70  ·  view source on GitHub ↗
(elsize='qa1',                        # {{{
                       constrain=None)

Source from the content-addressed store, hash-verified

57 return B
58# }}}
59def equitriangle_model(elsize='qa1', # {{{
60 constrain=None):
61 A = dict(vertices=np.array(((0, 0), (1, 0), (0.5, 0.866))))
62 B = tr.triangulate(A, elsize)
63 if constrain == 'bottom_edge':
64 node_ids = np.argwhere(B['vertices'][:,1] == 0)
65 B['constrained_x'] = node_ids.squeeze() # nodes with x dof fixed
66 B['constrained_y'] = node_ids.squeeze() # nodes with y dof fixed
67 else:
68 B['constrained_x'] = [] # nodes with x dof fixed
69 B['constrained_y'] = [] # nodes with y dof fixed
70 return B
71# }}}
72def beam_model(elsize='qa0.4', # {{{
73 constrain=None):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected