Ejemplo n.º 1
0
def ugrid3d_to_tecplot_filename(ugrid_filename, tecplot_filename, log=None):
    """
    Converts a UGRID to a Tecplot ASCII file.

    Parameters
    ----------
    ugrid_filename : str
        the input UGRID filename
    bdf_filename : str
        the output Tecplot filename
    """
    model = UGRID(log=log)
    assert os.path.exists(ugrid_filename), '%r doesnt exist' % ugrid_filename
    model.read_ugrid(ugrid_filename)
    model.write_tecplot(tecplot_filename)
Ejemplo n.º 2
0
def ugrid3d_to_tecplot_filename(ugrid_filename, tecplot_filename, log=None):
    """
    Converts a UGRID to a Tecplot ASCII file.

    Parameters
    ----------
    ugrid_filename : varies
        str : the input UGRID filename
        UGRID : the UGRID object
    bdf_filename : str
        the output Tecplot filename
    log : logger; default=None
        a logger object
    """
    if isinstance(ugrid_filename, str):
        #assert os.path.exists(ugrid_filename), '%r doesnt exist' % ugrid_filename
        model = UGRID(log=log)
        model.read_ugrid(ugrid_filename)
    else:
        model = ugrid_filename
    model.write_tecplot(tecplot_filename)
Ejemplo n.º 3
0
def ugrid3d_to_tecplot_filename(ugrid_filename, tecplot_filename,
                                log=None, debug=False):
    """
    Converts a UGRID to a Tecplot ASCII file.

    Parameters
    ----------
    ugrid_filename : varies
        str : the input UGRID filename
        UGRID : the UGRID object
    tecplot_filename : str
        the output Tecplot filename
    log : logger; default=None
        a logger object
    debug : bool; default=False
        developer debug
    """
    if isinstance(ugrid_filename, str):
        #assert os.path.exists(ugrid_filename), '%r doesnt exist' % ugrid_filename
        model = UGRID(log=log, debug=debug)
        model.read_ugrid(ugrid_filename)
    else:
        model = ugrid_filename
    model.write_tecplot(tecplot_filename)