magnet.generate.dataset_2D_hetero#
- magnet.generate.dataset_2D_hetero(composition: dict[slice(<class 'str'>, <class 'int'>, None)], output_path: str, dataset_name: str, bounds: tuple[int, int], additional_kwargs: dict[str, dict] | None = None, extension: str = 'vtk', base_name: str = 'mesh', seed: int | None = None) None #
Generate dataset of 2D meshes.
Generates dataset of 2D meshes of the unit cube and portions of the unit cube. The meshes are saved together with a .npz file containing adjacency, centroid and volume data of the meshes. A text file containing a summary of the dataset is also saved.
- Parameters:
!!!!!!!!!!!!!!!!!!!!!!
output_path (str) – folder path where the dataset will be saved.
dataset_name (str) – name of the folder containing the dataset
extension (str, optional) – Mesh file format extension (default is ‘vtk’).
base_name (str, optional) – Root name of the mesh files (default is ‘mesh’).
seed (int, optional) – Seed of the Random number generator. If not provided, uses a random seed.
- Return type:
None
See also
load_dataset
load mesh dataset.