MmgTools / mmg

open source software for bidimensional and tridimensional remeshing
http://www.mmgtools.org
Other
369 stars 118 forks source link

Assertion in MMG3D_solTruncatureForOptim #268

Open pavanakumar opened 6 months ago

pavanakumar commented 6 months ago

Am transitioning from using MMG3D 5.5 into 5.7 and facing few issues with assertions in MMG compiled in Debug mode.

MMG3/2D_doSol function fails due to an assert that checks if optim flag is set.

The call structure goes as shown below,

MMG2/3D_doSol -> MMG2/3D_doSol_ani -> MMG2/3D_solTruncatureForOptim

Note: A call to MMG2/3D_setfunc was necessary to ensure MMG2/3D_doSol function pointer is assigned to the right function call i.e., MMG2/3D_doSol_ani

libmmg3D_tools.c:(1261-1267)

static inline
int MMG3D_solTruncatureForOptim(MMG5_pMesh mesh, MMG5_pSol met,int ani) {
  MMG5_pTetra pt;
  MMG5_int    k;
  int         i,ier;

  assert ( mesh->info.optim );  // <--- PROBLEMATIC LINE
...

Note that I set the optim flag to MMG_DISABLE. This function ran without problems in the older version 5.5. Am trying to recover back the metric used by MMG to check for adapt convergence in parallel adaptation.