mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
tuning and output for uniform refinement
This commit is contained in:
parent
5c22bd08c3
commit
4dad700c87
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user