Workflow utilities

Tools and helper methods for working with Py2DM.

This module includes independent utilities that may be useful when working with Py2DM as part of a larger workflow. This includes compatibility modes, format converters and the likes.

py2dm.utils.triangle_to_2dm(node_file, ele_file, output='')

Create a 2DM mesh from “Triangle” output files.

This converter allows the creation of a Py2DM-compatible mesh from the output files of the Triangle 2D mesh generator: https://www.cs.cmu.edu/~quake/triangle.html.

Parameters
  • node_file (str) – The Triangle NODE file to read.

  • ele_file (str) – The Triangle ELE file to read.

  • output (str) – The output file to write. Defaults to the name of the Triangle output, minus the iteration number.