From 4c7c21fb32fd7870c2a646b87411c89e6db9a48f Mon Sep 17 00:00:00 2001 From: Mike Taverne Date: Mon, 26 Apr 2010 23:04:29 +0200 Subject: [PATCH] made point removal during boundary layer creation optional --- src/guicreateboundarylayer.cpp | 14 ++++++-------- src/guicreateboundarylayer.h | 1 + src/guicreateboundarylayer.ui | 7 +++++++ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/guicreateboundarylayer.cpp b/src/guicreateboundarylayer.cpp index ff01f3f..9fd96b8 100644 --- a/src/guicreateboundarylayer.cpp +++ b/src/guicreateboundarylayer.cpp @@ -35,6 +35,7 @@ GuiCreateBoundaryLayer::GuiCreateBoundaryLayer() { getSet("boundary layer", "number of smoothing iterations", 10, m_NumIterations); + getSet("boundary layer", "remove points", true, m_RemovePoints); connect(ui.pushButton_SelectAll_BC, SIGNAL(clicked()), this, SLOT(SelectAll_BC())); connect(ui.pushButton_ClearAll_BC, SIGNAL(clicked()), this, SLOT(ClearAll_BC())); @@ -50,6 +51,7 @@ void GuiCreateBoundaryLayer::before() break; } } + ui.checkBoxRemovePoints->setChecked(m_RemovePoints); populateBoundaryCodes(ui.listWidgetBC); populateVolumes(ui.listWidgetVC); ui.spinBoxIterations->setValue(m_NumIterations); @@ -201,16 +203,12 @@ void GuiCreateBoundaryLayer::operate() smooth.setAllCells(); smooth(); del.setAllCells(); - saveGrid(m_Grid,"del_before"); del();// does not delete prismatic boundary layer! (->remove points must handle wedges) - saveGrid(m_Grid,"del_after"); - remove_points(); - cout << "!!!!!!!!!!!!!! REMOVED POINTS: " << remove_points.getNumRemoved() << endl; -// if(remove_points.getNumRemoved()>0) EG_BUG; - - saveGrid(m_Grid,"after_removepoints"); -// EG_BUG; + if(ui.checkBoxRemovePoints->isChecked()) { + remove_points(); + qDebug() << "removed points: " << remove_points.getNumRemoved(); + } swap(); vol.setTraceCells(layer_cells); diff --git a/src/guicreateboundarylayer.h b/src/guicreateboundarylayer.h index 8a8caea..c2486a8 100644 --- a/src/guicreateboundarylayer.h +++ b/src/guicreateboundarylayer.h @@ -43,6 +43,7 @@ private: // attributes int m_NumPreSteps; int m_NumPostSteps; bool m_WriteDebugFile; + bool m_RemovePoints; double m_PostStrength; QSet m_LayerAdjacentBoundaryCodes; /// Boundary codes of the surface we want to remove points on. Normally the one next to the prismatic boundary layer. diff --git a/src/guicreateboundarylayer.ui b/src/guicreateboundarylayer.ui index 79140a4..cae023a 100644 --- a/src/guicreateboundarylayer.ui +++ b/src/guicreateboundarylayer.ui @@ -200,6 +200,13 @@ + + + + remove points? + + + -- 2.11.4.GIT