Reading Gmsh Meshes¶
Element types¶
- class gmsh_interop.reader.GmshElementBase(order)[source]¶
Simplex Elements¶
Tensor Product Elements¶
Receiver interface¶
Receiver example implementation¶
- class gmsh_interop.reader.GmshMeshReceiverNumPy[source]¶
GmshReceiver that emulates the semantics of
meshpy.triangle.MeshInfo
andmeshpy.tet.MeshInfo
by using similar fields, but instead of loading data into ForeignArrays, load into NumPy arrays. Since this class is not wrapping any libraries in other languages – the Gmsh data is obtained via parsing text – usenumpy
arrays as the base array data structure for convenience.Added in version 2014.1.
Reader¶
- class gmsh_interop.reader.ScriptWithFilesSource(source, filenames, source_name='temp.geo')[source]¶
Added in version 2016.1.
- source¶
The script code to be fed to gmsh.
- filenames¶
The names of files to be copied to the temporary directory where gmsh is run.
- gmsh_interop.reader.read_gmsh(receiver, filename, force_dimension=None)[source]¶
Read a gmsh mesh file from filename and feed it to receiver.
- Parameters:
receiver – Implements the
GmshMeshReceiverBase
interface.force_dimension – if not None, truncate point coordinates to this many dimensions.
- gmsh_interop.reader.generate_gmsh(receiver, source, dimensions=None, order=None, other_options=(), extension='geo', gmsh_executable='gmsh', force_dimension=None, target_unit=None, output_file_name=None, save_tmp_files_in=None)[source]¶
Run gmsh and feed the output to receiver.
- Parameters:
receiver – a class that implements the
GmshMeshReceiverBase
interface.source – an instance of
ScriptSource
orFileSource
.