fedoo.mesh.generate_nodes
- generate_nodes(mesh, N, data, type_gen='straight')
Add regularly espaced nodes to an existing mesh between to existing nodes.
This function serves to generated structured meshes. To create a 2D stuctured mesh:
Create and mesh with only sigular nodes that will serve to build the edges
Use the generate_nodes functions to add some nodes to the edge
Use the structured_mesh_2D from the set of nodes corresponding the egdes to build the final mesh.
- Parameters:
mesh (Mesh) – the existing mesh
N (int) – Number of generated nodes.
data (list or tuple) –
if type_gen == ‘straight’, data should contain the indices of the starting (data[0]) and ending (data[1]). if type_gen == ‘circular’, data should contain the indices
of the starting (data[0]) and ending (data[1]) nodes and the coordinates of the center of the circle (data[2]). The nodes are generated using a trigonometric rotation.
type_gen (str in {'straight', 'circular'}) – Type of line generated. The default is ‘straight’.
- Returns:
array containing indices of the new generated nodes
- Return type:
np.ndarray[int]