[petsc-users] Generation, refinement of the mesh (Sieve mesh) is very slow!

fdkong fd.kong at siat.ac.cn
Mon Mar 28 01:06:13 CDT 2011


Hi everyone
   I have developed my application based on the sieve mesh object in the Pestc. And now, I encountered some  serious problems. 
 1. The generation of mesh takes a lot of time, run very slowly. The following code is used:
       double lower[2] = {-1.0, -1.0};
        double upper[2] = {1.0, 1.0};
        int    edges[2] = {256,256};
        mB = ALE::MeshBuilder<ALE::Mesh>::createSquareBoundary(comm, lower, upper, edges, debug);
  ALE::ISieveConverter::convertMesh(*mB, *meshBd, renumbering, false);
      ierr = PetscPrintf(PETSC_COMM_WORLD," End build convertMesh  \n");CHKERRQ(ierr);
      ierr = MeshSetMesh(boundary, meshBd);CHKERRQ(ierr);
      ierr = PetscPrintf(PETSC_COMM_WORLD," Begin build MeshGenerate  \n");CHKERRQ(ierr);


      ierr = MeshGenerate(boundary,interpolate, &mesh);CHKERRQ(ierr);

   
   2. The refinement of mesh is also very slow. Th code:
     refinementLimit=0.0001;
    if (refinementLimit > 0.0) 
    {
      Mesh refinedMesh;


      ierr = MeshRefine(mesh, refinementLimit,interpolate, &refinedMesh);CHKERRQ(ierr);
      ierr = MeshDestroy(mesh);CHKERRQ(ierr);
      mesh = refinedMesh;
    }


    3. The distribution of mesh is also very slow. The code:
     if (size > 1) 
    {
      Mesh parallelMesh;


      //ierr = DistributeMeshnew(mesh, "chao", &parallelMesh);CHKERRQ(ierr);
      ierr = DistributeMeshnew(mesh, "parmetis", &parallelMesh);CHKERRQ(ierr);
      ierr = MeshDestroy(mesh);CHKERRQ(ierr);
      mesh = parallelMesh;
    }.
   
    Does anyone encounter these similar problem? If anyone can help, thank you very much!  
  
   And I wonder to consult which parallel mesh can work  with Petsc very well, when we develop some complex problem? 
   
     
------------------
Fande Kong
ShenZhen Institutes of Advanced Technology
Chinese Academy of Sciences
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110328/0545b6a0/attachment.htm>


More information about the petsc-users mailing list