Mondaic
This API reference is not for the latest stable Salvus version.

salvus.mesh.mesh.run_mesher

Function that takes the well defined inputs and actually generates meshes.

Functions

run_mesher()

def run_mesher(
    inputs: Union[str, Dict],
    output_filename: Optional[str] = None,
    verbose: bool = True,
    overwrite_file: bool = True,
    generate_plots: bool = False,
    write_mesh_to_file: bool = True,
    mesh_processing_callback: Optional[
        Callable, SurfaceMaskGenerator, RayMaskGenerator
    ] = None,
) -> Union[
    Tuple[
        salvus.mesh.unstructured_mesh.UnstructuredMesh,
        Union[Dict, NoneType],
        Union[str, NoneType],
    ],
    Tuple[numpy.ndarray, int],
    numpy.ndarray,
]:
    ...

Convert the input parameters into a mesh.

The job of this function is to turn the input parameters from the higher level interfaces into an actual mesh by calling the appropriate lower level functions.

It aims to make the creation of the most common meshes as easy as possible.

Parameters
  • inputs Union[str, Dict] — The input parameters as definied by the JSONSchema.
  • output_filename Optional[str] — The output filename.
  • verbose bool — Control verbosity.
  • overwrite_file bool — Overwrite files if they already exist.
  • generate_plots bool — Show plots while meshing. Slow and potentially memory intensive and mainly useful for debugging.
  • write_mesh_to_file bool — Write mesh to file, or not.
  • mesh_processing_callback Optional[Callable, SurfaceMaskGenerator, RayMaskGenerator] — Callback function to customize the mesh processing.
Returns Union[Tuple[salvus.mesh.unstructured_mesh.UnstructuredMesh, Union[Dict, NoneType], Union[str, NoneType]], Tuple[numpy.ndarray, int], numpy.ndarray]