File tree Expand file tree Collapse file tree 1 file changed +22
-11
lines changed Expand file tree Collapse file tree 1 file changed +22
-11
lines changed Original file line number Diff line number Diff line change @@ -874,11 +874,6 @@ void PatchKernel::finalizeAlterations(bool squeezeStorage)
874874 // Flush interfaces data structures
875875 m_interfaces.flush ();
876876
877- // Squeeze the patch
878- if (squeezeStorage) {
879- squeeze ();
880- }
881-
882877#if BITPIT_ENABLE_MPI==1
883878 // Update partitioning information
884879 bool partitioningInfoDirty = arePartitioningInfoDirty ();
@@ -888,12 +883,12 @@ void PatchKernel::finalizeAlterations(bool squeezeStorage)
888883#endif
889884
890885 // Clear alteration flags
886+ m_alteredCells.clear ();
887+ m_alteredInterfaces.clear ();
888+
889+ // Squeeze the patch
891890 if (squeezeStorage) {
892- AlterationFlagsStorage ().swap (m_alteredCells);
893- AlterationFlagsStorage ().swap (m_alteredInterfaces);
894- } else {
895- m_alteredCells.clear ();
896- m_alteredInterfaces.clear ();
891+ squeeze ();
897892 }
898893
899894 // Synchronize storage
@@ -5391,8 +5386,24 @@ bool PatchKernel::squeezeInterfaces()
53915386*/
53925387bool PatchKernel::squeeze ()
53935388{
5394- bool status = squeezeVertices ();
5389+ bool status = true ;
5390+
5391+ // Alteration flags
5392+ if (m_alteredCells.empty ()) {
5393+ AlterationFlagsStorage ().swap (m_alteredCells);
5394+ }
5395+
5396+ if (m_alteredInterfaces.empty ()) {
5397+ AlterationFlagsStorage ().swap (m_alteredInterfaces);
5398+ }
5399+
5400+ // Vertices
5401+ status |= squeezeVertices ();
5402+
5403+ // Cells
53955404 status |= squeezeCells ();
5405+
5406+ // Interfaces
53965407 status |= squeezeInterfaces ();
53975408
53985409 return status;
You can’t perform that action at this time.
0 commit comments