// C++ : La clase principale de Hexa
-// Copyright (C) 2009-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2009-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "HexHexa.hxx"
#include "HexElements.hxx"
-#include "HexCrossElements.hxx"
#include "HexVector.hxx"
#include "HexMatrix.hxx"
DumpStart ("removeHexa", cell);
int ier = HOK;
- if (cell==NULL)
+ if (BadElement (cell))
+ {
ier = HERR;
- else
- cell->remove ();
+ DumpReturn (ier);
+ return ier;
+ }
- DumpReturn (ier);
- return ier;
+ update ();
+ Quads menage;
+ for (int nro = 0 ; nro < HQ_MAXI ; ++nro)
+ {
+ Quad* quad = cell->getQuad (nro);
+ if (EltIsValid(quad) && quad->getNbrParents()<=1)
+ menage.push_back (quad);
+ }
+
+ cell->remove ();
+ int nbdel = menage.size();
+ for (int nro = 0 ; nro < nbdel ; ++nro)
+ menage[nro]->remove();
+
+ DumpReturn (HOK);
+ return HOK;
}
// ========================================================= removeQuad
int Document::removeQuad (Quad* cell)