Andreas<p><span class="h-card"><a href="https://pynews.com.br/@villares" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>villares</span></a></span> Great! In FElupe, I eliminated one loop for performance reasons: First, I create a line-mesh and then expand it to a rectangle.</p><p>import felupe as fem</p><p>mesh = fem.Rectangle(a=(0, 0), b=(100, 100), n=(6, 6))</p><p>Here you'll find the rectangle-function</p><p><a href="https://github.com/adtzlr/felupe/blob/4369e0a3e2b5cdcc78930e11bfb4b7c8edd3cf93/src/felupe/mesh/_line_rectangle_cube.py#L33-L47" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/adtzlr/felupe/blob/</span><span class="invisible">4369e0a3e2b5cdcc78930e11bfb4b7c8edd3cf93/src/felupe/mesh/_line_rectangle_cube.py#L33-L47</span></a></p><p>and here the expand-tool:</p><p><a href="https://github.com/adtzlr/felupe/blob/4369e0a3e2b5cdcc78930e11bfb4b7c8edd3cf93/src/felupe/mesh/_tools.py#L27-L87" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/adtzlr/felupe/blob/</span><span class="invisible">4369e0a3e2b5cdcc78930e11bfb4b7c8edd3cf93/src/felupe/mesh/_tools.py#L27-L87</span></a></p><p><a href="https://mathstodon.xyz/tags/python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>python</span></a> <a href="https://mathstodon.xyz/tags/scientificcomputing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>scientificcomputing</span></a> <a href="https://mathstodon.xyz/tags/computationalmechanics" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>computationalmechanics</span></a> <a href="https://mathstodon.xyz/tags/meshing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>meshing</span></a> <a href="https://mathstodon.xyz/tags/opensource" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>opensource</span></a></p>