discretize.base.BaseMesh.to_dict#
- BaseMesh.to_dict()[source]#
Represent the mesh’s attributes as a dictionary.
The dictionary representation of the mesh class necessary to reconstruct the object. This is useful for serialization. All of the attributes returned in this dictionary will be JSON serializable.
The mesh class is also stored in the dictionary as strings under the __module__ and __class__ keys.
- Returns:
dict
Dictionary of {attribute: value} for the attributes of this mesh.