Exemplo n.º 1
0
bool WriteUserFormat (const string & format,
		      const Mesh & mesh,
		      const CSGeometry & geom,
		      const string & filename)
{
  PrintMessage (1, "Export mesh to file ", filename,
		", format is ", format);

  if (format == "Neutral Format")
    WriteNeutralFormat (mesh, filename);

  else if (format == "Surface Mesh Format")
    WriteSurfaceFormat (mesh, filename);

  else if (format == "DIFFPACK Format")
    WriteDiffPackFormat (mesh, filename);

  else if (format == "Tochnog Format")
    WriteTochnogFormat (mesh, filename);

  else if (format == "TecPlot Format")
    cerr << "ERROR: TecPlot format currently out of order" << endl;
      // WriteTecPlotFormat (mesh, geom, filename);

  else if (format == "Abaqus Format")
    WriteAbaqusFormat (mesh, filename);

  else if (format == "Fluent Format")
    WriteFluentFormat (mesh, filename);

  else if (format == "Permas Format")
    WritePermasFormat (mesh, filename);

  else if (format == "FEAP Format")
    WriteFEAPFormat (mesh, filename);

  else if (format == "Elmer Format")
    WriteElmerFormat (mesh, filename);

  else if (format == "STL Format")
    WriteSTLFormat (mesh, filename);

  else if (format == "VRML Format")
    WriteVRMLFormat (mesh, 1, filename);

  else if (format == "Fepp Format")
    WriteFEPPFormat (mesh, geom, filename);

  else if (format ==  "EdgeElement Format")
    WriteEdgeElementFormat (mesh, filename);

  else if (format == "Chemnitz Format")
    WriteChemnitz (mesh, filename);

  else if (format == "Gmsh Format")
    WriteGmshFormat (mesh, filename);

  // Philippose - 29/01/2009
  // Added Gmsh v2.xx export capability
  else if (format == "Gmsh2 Format")
    WriteGmsh2Format (mesh, filename);

  else if (format == "VTU Format")
    WriteVTUFormat (mesh, filename, false, false);

  else if (format == "VTU Format, only volume")
    WriteVTUFormat (mesh, filename, true, false);

  else if (format == "DOLFIN Format")
    WriteDolfinFormat (mesh, filename);

  else if (format == "JCMwave Format")
    WriteJCMFormat (mesh, filename);

  else if (format == "TET Format")
    WriteTETFormat( mesh, filename);//, "High Frequency" );

  else
      return 1;

  return 0;
}
Exemplo n.º 2
0
bool WriteUserFormat (const string & format,
                      const Mesh & mesh,
                      const CSGeometry & geom,
                      const string & filename)
{
    PrintMessage (1, "Export mesh to file ", filename,
                  ", format is ", format);

    if (format == "Neutral Format")
        WriteNeutralFormat (mesh, geom, filename);

    else if (format == "Surface Mesh Format")
        WriteSurfaceFormat (mesh, filename);

    else if (format == "DIFFPACK Format")
        WriteDiffPackFormat (mesh, geom, filename);

    else if (format == "Tochnog Format")
        WriteTochnogFormat (mesh, filename);

    else if (format == "TecPlot Format")
        cerr << "ERROR: TecPlot format currently out of order" << endl;
    // WriteTecPlotFormat (mesh, geom, filename);

    else if (format == "Abaqus Format")
        WriteAbaqusFormat (mesh, filename);

    else if (format == "Fluent Format")
        WriteFluentFormat (mesh, filename);

    else if (format == "Permas Format")
        WritePermasFormat (mesh, filename);

    else if (format == "FEAP Format")
        WriteFEAPFormat (mesh, filename);

    else if (format == "Elmer Format")
        WriteElmerFormat (mesh, filename);

    else if (format == "STL Format")
        WriteSTLFormat (mesh, filename);

    else if (format == "VRML Format")
        WriteVRMLFormat (mesh, 1, filename);

    else if (format == "Fepp Format")
        WriteFEPPFormat (mesh, geom, filename);

    else if (format ==  "EdgeElement Format")
        WriteEdgeElementFormat (mesh, geom, filename);

    else if (format == "Chemnitz Format")
        WriteUserChemnitz (mesh, filename);

    else if (format == "Gmsh Format")
        WriteGmshFormat (mesh, geom, filename);

    else if (format == "JCMwave Format")
        WriteJCMFormat (mesh, geom, filename);

#ifdef OLIVER
    else if (format == "TET Format")
        WriteTETFormat (mesh, filename);
#endif

    else
    {
        return 1;
    }

    return 0;
}