mmg icon indicating copy to clipboard operation
mmg copied to clipboard

Assertion in MMG3D_solTruncatureForOptim

Open pavanakumar opened this issue 9 months ago • 0 comments

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.

pavanakumar avatar May 08 '24 06:05 pavanakumar