core icon indicating copy to clipboard operation
core copied to clipboard

MeshAdapt: add mesh modification operator counts

Open bobpaw opened this issue 9 months ago • 3 comments

For MeshAdapt we would like to know how many mesh modification operations occur. The feature should allow for breakdowns by major step (refine, coarsen, snap, fix) or a summary. For efficiency, I also think it should be compiled conditionally (CMake, pre-processor macro, function to query support).

  • [ ] Add a field to ma::Input. If it's requested without support, we print a warning and continue with MeshAdapt.
  • [ ] Add counters to all MeshAdapt routines that use mesh modification operators.
    • Since we have to track this information and pass it around, it might be good to make an object (say ma::Stats or ma::MeshModStats) that is public and can be returned to the user by ma::adapt. It could be added as a member of ma::Adapt class that's already passed around.
  • [ ] Return an object or print statistics.
    • An object is better if people need to use it, but it might be annoying if people just want to print the data every time and that's it. Might be best to create an object for the duration of MeshAdapt, print the stats, and destroy it. Gets the job done now and if someone wants the full object later on a patch is easy.

bobpaw avatar Apr 26 '25 17:04 bobpaw

May not be the perfect strategy, but I often use this: https://github.com/UO-OACISS/perfstubs and wrap in a project specific macro. The advantage is that it can provide the instrumentation data to tau or other profiling tools.

jacobmerson avatar Apr 30 '25 14:04 jacobmerson

@bobpaw @Angelyr Is support for this part of https://github.com/SCOREC/core/pull/514?

cwsmith avatar Aug 26 '25 15:08 cwsmith

@cwsmith No this is not part of #514

Angelyr avatar Aug 27 '25 19:08 Angelyr