tuning and output for uniform refinement

This commit is contained in:
Joachim Schöberl 2016-02-29 11:24:07 +01:00
parent 5c22bd08c3
commit 4dad700c87

View File

@ -13,6 +13,8 @@ namespace netgen
void Refinement :: Refine (Mesh & mesh)
{
PrintMessage (3, "Refine mesh");
// reduce 2nd order
mesh.ComputeNVertices();
mesh.SetNP(mesh.GetNV());
@ -100,6 +102,8 @@ namespace netgen
}
}
PrintMessage (5, "have points");
Array<int> par_nr(parents.Size());
for (int i = 0; i < par_nr.Size(); i++)
par_nr[i] = i;
@ -115,6 +119,8 @@ namespace netgen
Array<bool, PointIndex::BASE> pointset(mesh.GetNP());
pointset = false;
PrintMessage (5, "sorting complete");
// refine edges
Array<EdgePointGeomInfo,PointIndex::BASE> epgi;
@ -162,6 +168,7 @@ namespace netgen
mesh.AddSegment (ns2);
}
PrintMessage (5, "have 1d elements");
// refine surface elements
Array<PointGeomInfo,PointIndex::BASE> surfgi (8*mesh.GetNP());
@ -342,8 +349,11 @@ namespace netgen
}
}
PrintMessage (5, "have 2d elements");
// refine volume elements
int oldne = mesh.GetNE();
mesh.VolumeElements().SetAllocSize(8*oldne);
for (ElementIndex ei = 0; ei < oldne; ei++)
{
const Element & el = mesh.VolumeElement(ei);
@ -717,8 +727,10 @@ namespace netgen
}
PrintMessage (5, "have 3d elements");
mesh.ComputeNVertices();
mesh.RebuildSurfaceElementLists();
PrintMessage (5, "mesh updates complete");
return;
int cnttrials = 10;