[Gmsh] Quad

Fabrizio De Stefani deste.fabrizio at gmail.com
Tue Jan 11 14:07:08 CET 2011


Hello,

I'm trying to build an application using the API provided by gmsh but I 
cannot find an example or a way to construct a mesh composed by only quads.
This is the code I've written:

int main(int argc, char **argv)
{
     if(argc < 2)
     {
         cout << "Use: pass the file to read as argument" << endl;
         return -1;
     }

     GmshInitialize(argc,argv);

     GModel *m = new GModel();

     cout << "Loading Geometry..." << endl;
     m->readGEO(argv[1]);
     m->mesh(2);

     unsigned int c = 0;

     for(GModel::fiter it = m->firstFace(); it != m->lastFace(); ++it)
     {
         GFace *face = *it;
         recombineIntoQuads(face);
     }
     m->writeVTK("test.vtk");

     GmshFinalize();

     system("pause");
     return 0;
}

Any suggestion?


Thanks,
Fabrizio De Stefani