def main():
    mesh = parse_gmsh('../commands.msh', '../boundary_lines.dat')

    # now create the CRTomo grid
    """
    1. Header
    2. Nodes
    3. Elements: Triangles, Boundary elements
    4. Element ids for adjoining boundary elements
    """

    str_header = get_header(mesh)
    str_nodes = get_nodes(mesh)
    str_elements = get_elements(mesh)
    str_adj_boundaries, boundary_elements = get_ajd_bound(mesh)

    crt_mesh = str_header + str_nodes + str_elements + str_adj_boundaries

    fid = open('../elem.dat', 'w')
    fid.write(crt_mesh)
    fid.close()

    write_elec_file('../electrode_positions.dat', mesh)
    debug_plot_mesh(mesh, boundary_elements)
def main ( ) : mesh = parse_gmsh ( '../commands.msh' , '../boundary_lines.dat' ) """
    1. Header
    2. Nodes
    3. Elements: Triangles, Boundary elements
    4. Element ids for adjoining boundary elements
    """ str_header = get_header ( mesh ) str_nodes = get_nodes ( mesh ) str_elements = get_elements ( mesh ) str_adj_boundaries , boundary_elements = get_ajd_bound ( mesh ) crt_mesh = str_header + str_nodes + str_elements + str_adj_boundaries fid = open ( '../elem.dat' , 'w' ) fid . write ( crt_mesh ) fid . close ( ) write_elec_file ( '../electrode_positions.dat' , mesh ) debug_plot_mesh ( mesh , boundary_elements )
1. Header
    2. Nodes
    3. Elements: Triangles, Boundary elements
    4. Element ids for adjoining boundary elements