cr_trig_parse_gmsh module

Parse a GMSH mesh and produce a FEM grid for CRMod/CRTomo. This script should not be called directly, as it requires the input and output files from “cr_trig_create.py”.

class cr_trig_parse_gmsh._line(p1, p2)[source]

Bases: object

get_center()[source]

Return (x,y) coordinate of central point

get_diff()[source]
get_distance()[source]
cr_trig_parse_gmsh.debug_plot_mesh(mesh, boundary_elements)[source]
cr_trig_parse_gmsh.get_adj_bound_v1(mesh)[source]

Determine triangular elements adjacent to the boundary elements

cr_trig_parse_gmsh.get_adj_bound_v2(mesh)[source]

Determine triangular elements adjacent to the boundary elements

cr_trig_parse_gmsh.get_elements(mesh)[source]
cr_trig_parse_gmsh.get_header(mesh)[source]

For now we only know Element types 1 (line) and 2 (triangle)

cr_trig_parse_gmsh.get_nodes(mesh)[source]
cr_trig_parse_gmsh.main()[source]
cr_trig_parse_gmsh.parse_gmsh(filename, boundary_file)[source]

Parse a GMSH .msh file and return a dictionary containing the data neccessary to create CRTomo grids

cr_trig_parse_gmsh.write_elec_file(filename, mesh)[source]

Read in the electrode positions and return the indices of the electrodes

# TODO: Check if you find all electrodes