mammos_mumag.mesh#
Mesh functions.
Functions
|
Find available meshes matching given name. |
Load mesh JSON file. |
Classes
Mesh class. |
- class mammos_mumag.mesh.Mesh[source]#
Mesh class.
This class supports both local mesh (i.e. found on disk and defined by the user) and remote meshes stored on Zenodo. The Zenodo URL is found in the
README.jsonand a list of all available meshes is found usingfind_mesh().- name#
If local mesh, path to the file.
If remote mesh, its name is as it appears on the Zenodo record or in the
README.json.
- info#
dictionary of available information about the mesh. If the mesh is local, this dictionary is initialized with the couple “description”: “User defined mesh.”.
- __init__(mesh_name)[source]#
Initialize Mesh.
The input
mesh_nameis initially understood as a location and tried for matches on disk. If such file exists, the mesh is intended as local.Otherwise,
mesh_nameis given tofind_mesh()for matches in the Zenodo record. If multiple matches are found, the initialization will return an error.
- Parameters:
mesh_name (str | Path) – Location of local mesh or name of remote mesh.
- Raises:
RuntimeError – Multiple matches found in the Zenodo record.
RuntimeError – No match found, either local or remote.