Commit 09f6c276 authored by Franjo's avatar Franjo
Browse files

Merge branch 'enhancement-polyMeshEdgeExtraction' into developmentPublicRepo

parents 795704fd cfdc4398
...@@ -45,18 +45,18 @@ defineRunTimeSelectionTable(createFundamentalSheets, polyMeshGen); ...@@ -45,18 +45,18 @@ defineRunTimeSelectionTable(createFundamentalSheets, polyMeshGen);
// Construct from mesh, octree, regions for boundary vertices // Construct from mesh, octree, regions for boundary vertices
createFundamentalSheets::createFundamentalSheets createFundamentalSheets::createFundamentalSheets
( (
polyMeshGen& mesh polyMeshGen& mesh,
const bool createWrapperSheet
) )
: :
mesh_(mesh) mesh_(mesh),
{ createWrapperSheet_(createWrapperSheet)
} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
createFundamentalSheets::~createFundamentalSheets() createFundamentalSheets::~createFundamentalSheets()
{ {}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
...@@ -64,6 +64,9 @@ protected: ...@@ -64,6 +64,9 @@ protected:
//- reference to mesh //- reference to mesh
polyMeshGen& mesh_; polyMeshGen& mesh_;
//- shall the procedure create the intial wrapper sheet
const bool createWrapperSheet_;
// Protected member functions // Protected member functions
//- Disallow default bitwise copy construct //- Disallow default bitwise copy construct
...@@ -80,7 +83,11 @@ public: ...@@ -80,7 +83,11 @@ public:
// Constructors // Constructors
//- Construct from mesh data //- Construct from mesh data
createFundamentalSheets(polyMeshGen& mesh); createFundamentalSheets
(
polyMeshGen& mesh,
const bool createWrapperSheet = true
);
// Declare run-time constructor selection table // Declare run-time constructor selection table
...@@ -90,9 +97,10 @@ public: ...@@ -90,9 +97,10 @@ public:
createFundamentalSheets, createFundamentalSheets,
polyMeshGen, polyMeshGen,
( (
polyMeshGen& mesh polyMeshGen& mesh,
const bool createWrapperSheet
), ),
(mesh) (mesh, createWrapperSheet)
); );
...@@ -101,7 +109,7 @@ public: ...@@ -101,7 +109,7 @@ public:
//- Select constructed from dictionary //- Select constructed from dictionary
static autoPtr<createFundamentalSheets> New static autoPtr<createFundamentalSheets> New
( (
polyMeshGen& mesh polyMeshGen& mesh, const bool createWrapperSheet = true
); );
// Destructor // Destructor
......
...@@ -57,6 +57,9 @@ addToRunTimeSelectionTable ...@@ -57,6 +57,9 @@ addToRunTimeSelectionTable
void createFundamentalSheetsFJ::createInitialSheet() void createFundamentalSheetsFJ::createInitialSheet()
{ {
if( !createWrapperSheet_ )
return;
const PtrList<boundaryPatch>& boundaries = mesh_.boundaries(); const PtrList<boundaryPatch>& boundaries = mesh_.boundaries();
const label start = boundaries[0].patchStart(); const label start = boundaries[0].patchStart();
...@@ -197,10 +200,11 @@ void createFundamentalSheetsFJ::createSheetsAtFeatureEdges() ...@@ -197,10 +200,11 @@ void createFundamentalSheetsFJ::createSheetsAtFeatureEdges()
// Construct from mesh, octree, regions for boundary vertices // Construct from mesh, octree, regions for boundary vertices
createFundamentalSheetsFJ::createFundamentalSheetsFJ createFundamentalSheetsFJ::createFundamentalSheetsFJ
( (
polyMeshGen& mesh polyMeshGen& mesh,
const bool createWrapperSheet
) )
: :
createFundamentalSheets(mesh) createFundamentalSheets(mesh, createWrapperSheet)
{ {
createInitialSheet(); createInitialSheet();
......
...@@ -84,7 +84,11 @@ public: ...@@ -84,7 +84,11 @@ public:
// Constructors // Constructors
//- Construct from mesh data //- Construct from mesh data
createFundamentalSheetsFJ(polyMeshGen& mesh); createFundamentalSheetsFJ
(
polyMeshGen& mesh,
const bool createWrapperSheet = true
);
// Destructor // Destructor
......
...@@ -57,6 +57,9 @@ addToRunTimeSelectionTable ...@@ -57,6 +57,9 @@ addToRunTimeSelectionTable
void createFundamentalSheetsJFS::createInitialSheet() void createFundamentalSheetsJFS::createInitialSheet()
{ {
if( !createWrapperSheet_ )
return;
const PtrList<boundaryPatch>& boundaries = mesh_.boundaries(); const PtrList<boundaryPatch>& boundaries = mesh_.boundaries();
const label start = boundaries[0].patchStart(); const label start = boundaries[0].patchStart();
...@@ -168,10 +171,11 @@ void createFundamentalSheetsJFS::createSheetsAtFeatureEdges() ...@@ -168,10 +171,11 @@ void createFundamentalSheetsJFS::createSheetsAtFeatureEdges()
// Construct from mesh, octree, regions for boundary vertices // Construct from mesh, octree, regions for boundary vertices
createFundamentalSheetsJFS::createFundamentalSheetsJFS createFundamentalSheetsJFS::createFundamentalSheetsJFS
( (
polyMeshGen& mesh polyMeshGen& mesh,
const bool createWrapperSheet
) )
: :
createFundamentalSheets(mesh) createFundamentalSheets(mesh, createWrapperSheet)
{ {
createInitialSheet(); createInitialSheet();
......
...@@ -80,7 +80,11 @@ public: ...@@ -80,7 +80,11 @@ public:
// Constructors // Constructors
//- Construct from mesh data //- Construct from mesh data
createFundamentalSheetsJFS(polyMeshGen& mesh); createFundamentalSheetsJFS
(
polyMeshGen& mesh,
const bool createWrapperSheet = true
);
// Destructor // Destructor
......
...@@ -70,12 +70,14 @@ void meshSurfaceEdgeExtractorFUN::clearOut() ...@@ -70,12 +70,14 @@ void meshSurfaceEdgeExtractorFUN::clearOut()
meshSurfaceEdgeExtractorFUN::meshSurfaceEdgeExtractorFUN meshSurfaceEdgeExtractorFUN::meshSurfaceEdgeExtractorFUN
( (
polyMeshGen& mesh, polyMeshGen& mesh,
const meshOctree& octree const meshOctree& octree,
const bool createWrapperSheet
) )
: :
mesh_(mesh), mesh_(mesh),
meshOctree_(octree), meshOctree_(octree),
surfaceEnginePtr_(NULL) surfaceEnginePtr_(NULL),
createWrapperSheet_(createWrapperSheet)
{ {
if( Pstream::parRun() ) if( Pstream::parRun() )
FatalErrorIn FatalErrorIn
...@@ -84,20 +86,10 @@ meshSurfaceEdgeExtractorFUN::meshSurfaceEdgeExtractorFUN ...@@ -84,20 +86,10 @@ meshSurfaceEdgeExtractorFUN::meshSurfaceEdgeExtractorFUN
"(polyMeshGen&, const meshOctree&)" "(polyMeshGen&, const meshOctree&)"
) << "Cannot run in parallel!" << exit(FatalError); ) << "Cannot run in parallel!" << exit(FatalError);
//distributeBoundaryFaces();
//reviseCorners();
//reviseEdges();
//remapBoundaryPoints();
createBasicFundamentalSheets(); createBasicFundamentalSheets();
smoothMeshSurface(); smoothMeshSurface();
//improveQualityOfFundamentalSheets();
remapBoundaryPoints(); remapBoundaryPoints();
} }
......
...@@ -64,6 +64,9 @@ class meshSurfaceEdgeExtractorFUN ...@@ -64,6 +64,9 @@ class meshSurfaceEdgeExtractorFUN
//- mesh surface pointer //- mesh surface pointer
meshSurfaceEngine* surfaceEnginePtr_; meshSurfaceEngine* surfaceEnginePtr_;
//- shall the procedure generate an initial wrapper sheet
const bool createWrapperSheet_;
// Private member functions // Private member functions
//- return reference to surface engine //- return reference to surface engine
...@@ -115,7 +118,8 @@ public: ...@@ -115,7 +118,8 @@ public:
meshSurfaceEdgeExtractorFUN meshSurfaceEdgeExtractorFUN
( (
polyMeshGen& mesh, polyMeshGen& mesh,
const meshOctree& octree const meshOctree& octree,
const bool createWrapperSheet = true
); );
// Destructor // Destructor
......
...@@ -137,7 +137,7 @@ void meshSurfaceEdgeExtractorFUN::remapBoundaryPoints() ...@@ -137,7 +137,7 @@ void meshSurfaceEdgeExtractorFUN::remapBoundaryPoints()
void meshSurfaceEdgeExtractorFUN::createBasicFundamentalSheets() void meshSurfaceEdgeExtractorFUN::createBasicFundamentalSheets()
{ {
createFundamentalSheetsJFS edgeSheets(mesh_); createFundamentalSheetsJFS edgeSheets(mesh_, createWrapperSheet_);
clearOut(); clearOut();
} }
......
...@@ -128,8 +128,7 @@ void voronoiMeshGenerator::extractPatches() ...@@ -128,8 +128,7 @@ void voronoiMeshGenerator::extractPatches()
void voronoiMeshGenerator::mapEdgesAndCorners() void voronoiMeshGenerator::mapEdgesAndCorners()
{ {
//meshSurfaceEdgeExtractorNonTopo(mesh_, *octreePtr_); meshSurfaceEdgeExtractorFUN(mesh_, *octreePtr_, false);
meshSurfaceEdgeExtractorFUN(mesh_, *octreePtr_);
# ifdef DEBUG # ifdef DEBUG
mesh_.write(); mesh_.write();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment