mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-26 21:00:34 +05:00
order elements (for TP)
This commit is contained in:
parent
0e32696492
commit
a53149131e
@ -587,6 +587,7 @@ namespace netgen
|
||||
mp.optsteps2d = hsteps;
|
||||
|
||||
mesh->Compress();
|
||||
mesh->OrderElements();
|
||||
mesh -> SetNextMajorTimeStamp();
|
||||
|
||||
mp.Render();
|
||||
|
@ -3245,6 +3245,24 @@ namespace netgen
|
||||
timestamp = NextTimeStamp();
|
||||
}
|
||||
|
||||
void Mesh :: OrderElements()
|
||||
{
|
||||
for (auto & el : surfelements)
|
||||
{
|
||||
if (el.GetType() == TRIG)
|
||||
while (el[0] > el[1] || el[0] > el[2])
|
||||
{ // rotate element
|
||||
auto hp = el[0];
|
||||
el[0] = el[1];
|
||||
el[1] = el[2];
|
||||
el[2] = hp;
|
||||
auto hgi = el.GeomInfoPi(1);
|
||||
el.GeomInfoPi(1) = el.GeomInfoPi(2);
|
||||
el.GeomInfoPi(2) = el.GeomInfoPi(3);
|
||||
el.GeomInfoPi(3) = hgi;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int Mesh :: CheckConsistentBoundary () const
|
||||
{
|
||||
|
@ -470,6 +470,9 @@ namespace netgen
|
||||
*/
|
||||
DLL_HEADER void Compress ();
|
||||
|
||||
/// first vertex has lowest index
|
||||
void OrderElements();
|
||||
|
||||
///
|
||||
DLL_HEADER void Save (ostream & outfile) const;
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user