# Path: sucemfem/Utilities/MeshConverters.py
# def listmesh_2_dolfin_mesh(listmesh, reorder=False):
# def dolfin_mesh_2_listmesh(dolfin_mesh):
# def femmesh_reader_2_dolfin_mesh(femmesh_reader, reorder=True):


import numpy as N
import re, os
from sucemfem.Utilities import MeshConverters
        fo = open(self.mesh_filename)
        for l in fo:
            bfun = self.find_block_fun(l)
            if bfun: bfun(fo)
        self.read = True

    @uninit_error
    def get_mesh_filename(self):
        return os.path.basename(self.mesh_filename)

    @uninit_error
    def get_mesh_dirname(self):
        return os.path.dirname(self.mesh_filename)

    @uninit_error
    def get_tet_nodes(self):
        return self.tet_nodes

    @uninit_error
    def get_tet_property_nos(self):
        return self.tet_property_nos

    @uninit_error
    def get_nodes(self):
        return self.nodes

    
def femmesh_2_dolfin_mesh(femmesh_file):
    """Convert a femmesh file to a dolfin mesh object"""
    femmesh_reader = FemmeshReader(femmesh_file)

# Path: sucemfem/Utilities/MeshConverters.py
# def listmesh_2_dolfin_mesh(listmesh, reorder=False):
# def dolfin_mesh_2_listmesh(dolfin_mesh):
# def femmesh_reader_2_dolfin_mesh(femmesh_reader, reorder=True):


# Path: sucemfem/Utilities/MeshIO.py
import numpy as N
import re, os
from sucemfem.Utilities import MeshConverters

        fo = open(self.mesh_filename)
        for l in fo:
            bfun = self.find_block_fun(l)
            if bfun: bfun(fo)
        self.read = True

    @uninit_error
    def get_mesh_filename(self):
        return os.path.basename(self.mesh_filename)

    @uninit_error
    def get_mesh_dirname(self):
        return os.path.dirname(self.mesh_filename)

    @uninit_error
    def get_tet_nodes(self):
        return self.tet_nodes

    @uninit_error
    def get_tet_property_nos(self):
        return self.tet_property_nos

    @uninit_error
    def get_nodes(self):
        return self.nodes

    
def femmesh_2_dolfin_mesh(femmesh_file):
    """Convert a femmesh file to a dolfin mesh object"""
    femmesh_reader = FemmeshReader(femmesh_file)

    return MeshConverters.femmesh_reader_2_dolfin_mesh(femmesh_reader)