fedoo.mesh.structured_mesh_2D

structured_mesh_2D(data, edge1, edge2, edge3, edge4, elm_type='quad4', method=0, ndim=None, name='')

Create a 2D structured grid from 4 edges.

This function build a 2D structured mesh from the ordered position of nodes defining the 4 edges.

Parameters:
  • data (Mesh|np.ndarray[float]) – may be a fedoo Mesh object or a numpy array containing the node coordinates.

  • edge1 (list[int]|np.ndarray[int]) –

    ordered node indices of the 4 edges defining the structured surface. The node indices should be given considering the following rules:

    • the node indices must be sorted from the first node on the edge to the last in the order in which they are encountered.

    • edges 1 and 3 are opposite faces and must have the same length (same number of nodes).

    • edge2 and edge4 must also have the same length.

    • last node of edge1 should be the first of edge2, last node of edge2 should be the first of edge3 and so on…

  • edge2 (list[int]|np.ndarray[int]) –

    ordered node indices of the 4 edges defining the structured surface. The node indices should be given considering the following rules:

    • the node indices must be sorted from the first node on the edge to the last in the order in which they are encountered.

    • edges 1 and 3 are opposite faces and must have the same length (same number of nodes).

    • edge2 and edge4 must also have the same length.

    • last node of edge1 should be the first of edge2, last node of edge2 should be the first of edge3 and so on…

  • edge3 (list[int]|np.ndarray[int]) –

    ordered node indices of the 4 edges defining the structured surface. The node indices should be given considering the following rules:

    • the node indices must be sorted from the first node on the edge to the last in the order in which they are encountered.

    • edges 1 and 3 are opposite faces and must have the same length (same number of nodes).

    • edge2 and edge4 must also have the same length.

    • last node of edge1 should be the first of edge2, last node of edge2 should be the first of edge3 and so on…

  • edge4 (list[int]|np.ndarray[int]) –

    ordered node indices of the 4 edges defining the structured surface. The node indices should be given considering the following rules:

    • the node indices must be sorted from the first node on the edge to the last in the order in which they are encountered.

    • edges 1 and 3 are opposite faces and must have the same length (same number of nodes).

    • edge2 and edge4 must also have the same length.

    • last node of edge1 should be the first of edge2, last node of edge2 should be the first of edge3 and so on…

  • elm_type ({'quad4', 'quad9', 'tri3', 'tri6'}, default = 'quad4') – The type of the element generated.

  • method (int, default = 0) –

    The method used to generate inside nodes:

    • if method == 0: intesection of lines drawn between nodes of oposite edges.

    • if method == 1: nodes are regularly distributed between edge1 and edge3 and moved in the perpendicular direction to be as closed as possible to a regular distribution between edge2 and edge4

    • if method == 2: nodes are regularly distributed between edge1 and edge3 without correction for the perpendicular direction.

    • if method == 3: nodes are regularly distributed between edge2 and edge4 without correction for the perpendicular direction.

  • ndim (int, optional) – dimension of the generated mesh. Default = assert from the given data.

  • name (str, optional) – Name of the returned mesh. If “” and data is a Mesh, the name is the same as data.name.