mindelec.data.MaterialConfig

class mindelec.data.MaterialConfig(json_file, material_dir, physical_field, customize_physical_field=None, remove_vacuum=True)[source]

Material properties config for PointCloud-Tensor generation, which influence the material solving stage.

Parameters
  • json_file (str) – Material information for each sub-model json file path.

  • material_dir (str) – Directory path for all material, physical quantities information of each material record in a text file.

  • physical_field (dict) – Standard physical quantities fields that Maxwell equations concern about, material solving stage will deal with these standard physical fields. The key of physical_field dict is physical quantity name, the value is default value for this physical quantity.

  • customize_physical_field (dict, optional) – User can specify physical quantities fields according to their demand, similarly, material solving stage will take care of them. Default: None.

  • remove_vacuum (bool, optional) – Remove sub-solid whose material property is vacuum. Default: True.

Raises
  • TypeError – if json_file is not a str.

  • TypeError – if material_dir is not a str.

  • TypeError – if physical_field is not a dict.

  • TypeError – if customize_physical_field is not a dict.

  • TypeError – if remove_vacuum is not a bool.

Supported Platforms:

Ascend