From 4dad700c87d592f88583270dd882d26603166aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Mon, 29 Feb 2016 11:24:07 +0100 Subject: [PATCH] tuning and output for uniform refinement --- libsrc/meshing/refine.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/libsrc/meshing/refine.cpp b/libsrc/meshing/refine.cpp index 164ab8e6..efea21f5 100644 --- a/libsrc/meshing/refine.cpp +++ b/libsrc/meshing/refine.cpp @@ -13,6 +13,8 @@ namespace netgen void Refinement :: Refine (Mesh & mesh) { + PrintMessage (3, "Refine mesh"); + // reduce 2nd order mesh.ComputeNVertices(); mesh.SetNP(mesh.GetNV()); @@ -99,6 +101,8 @@ namespace netgen throw NgException ("currently refinement for non-tet elements is not supported"); } } + + PrintMessage (5, "have points"); Array par_nr(parents.Size()); for (int i = 0; i < par_nr.Size(); i++) @@ -115,6 +119,8 @@ namespace netgen Array pointset(mesh.GetNP()); pointset = false; + PrintMessage (5, "sorting complete"); + // refine edges Array epgi; @@ -162,7 +168,8 @@ namespace netgen mesh.AddSegment (ns2); } - + PrintMessage (5, "have 1d elements"); + // refine surface elements Array surfgi (8*mesh.GetNP()); for (int i = PointIndex::BASE; @@ -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;