Do not break harmonization by mistakenly resetting coeff caches

Resetting is only for trisegment IDs!!
This commit is contained in:
Mael Rouxel-Labbé 2023-03-27 23:23:31 +02:00
parent 4a1c862335
commit 5372f6737d
1 changed files with 8 additions and 1 deletions

View File

@ -96,7 +96,14 @@ struct Caches
{
void Reset ( std::size_t i )
{
mCoeff_cache.Reset(i) ;
// !WARNING! subtlety here:
// - The coefficient caches are attached to *contour edge IDs*.
// There is never any reason to reset coefficient caches because the geometry does not change.
// - The time and point caches are attached to *trisegment IDs*
// There is a reason to reset trisegment caches to not waste memory when a trisegment is ignored.
//
// mCoeff_cache.Reset(i) ;
mTime_cache.Reset(i) ;
mPoint_cache.Reset(i) ;
}