magnet.generate#

Mesh generation module.

Contains functions for generating simple 2D and 3D meshes from scratch. 3D meshes are generated using gmsh.

Functions

circular_holes(output_path[, lc, N, r])

Create a mesh with circular holes.

circular_inclusions(output_path[, lc, N, r])

Create a mesh with circular inclusions.

dataset_2D(composition, output_path, ...[, ...])

Generate dataset of 2D meshes.

dataset_2D_hetero(composition, output_path, ...)

Generate dataset of 2D meshes.

dataset_3D(n_cubes, n_cubes_portions, ...[, ...])

Generate dataset of 3D meshes.

delaunay_tria(output_path[, bounds])

Generate a mesh of random triangles.

double_circle(output_path[, r, center, lc])

Create a mesh made by 2 intersecting circles.

generate_Heterogeneous_cube(output_path, N_parts)

Generate a heterogeneous mesh of the unit cube.

generate_cube(output_path[, bounds])

Generate a mesh of the unit cube.

generate_cube_portion(output_path[, bounds])

Generate a mesh of a portion of the unit cube.

generate_dataset_heterogeneous(n_cubes, ...)

Generate dataset of 3D heterogeneous meshes.

heterogeneous_square(output_path[, lc])

Create a mesh of a heterogeneous square.

holed_square(output_path[, lc, r])

Create a square mesh with a circular hole.

mixed_tets_hexa(output_path[, lc])

Generate a mixed mesh of tetrahedra and hexahedra.

structured_quads(output_path[, bounds])

Generate a structured mesh of rectangles.

structured_tria(output_path[, bounds])

Generate a structured mesh of triangles.

tetrahedra_from_stl(surface_path[, ...])

Create a tetrahedral mesh from a STL file.

view_using_gmsh_fltk(mesh_path)

Visualize a mesh using Gmsh GUI.

voronoi_tess(output_path[, bounds])

Generate a Voronoi mesh.