mfem: ex3.cpp crash when disable/change the mesh refinement

Dear all,

I am trying to use mfem for my problem. I focus on the electromagnetic 
calculation and use ex3.cpp for my test. For debugging and learning the code of 
mfem, I disabled the refinement from the example:

...
   // 2. Refine the mesh to increase the resolution. In this example we do
   //    'ref_levels' of uniform refinement. We choose 'ref_levels' to be the
   //    largest number that gives a final mesh with no more than 50,000
   //    elements.
   if(0){   /// disable refinement for test
      int ref_levels =
         (int)floor(log(50000./mesh->GetNE())/log(2.)/mesh->Dimension());
      for (int l = 0; l < ref_levels; l++)
         mesh->UniformRefinement();
   }
   mesh->ReorientTetMesh();
...


The program crashed. Furthermore, the program still crash even I set a smaller 
number refinement number:

      int ref_levels =
         (int)floor(log(30000./mesh->GetNE())/log(2.)/mesh->Dimension());


Could anyone help me to take a look at it?


Thanks,
Tang Laoya 

Original issue reported on code.google.com by tanglaoy...@gmail.com on 8 Dec 2014 at 2:18

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 21

Most upvoted comments