Skip to content
Snippets Groups Projects
Commit d51967d7 authored by mattijs's avatar mattijs
Browse files

ENH: faceAgglomerate: more robust. Fixes #2741

- feature angle compared to real angle
- stop agglomerating if number of marked edges does not change
parent 5de59417
Branches
Tags
No related merge requests found
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2016-2020,2023 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -101,9 +101,30 @@ private: ...@@ -101,9 +101,30 @@ private:
( (
const bPatch& patch, const bPatch& patch,
const labelList& fineToCoarse, const labelList& fineToCoarse,
const label fineLevelIndex const label fineLevelIndex,
label& nMarkedEdges
); );
//- Does combining facei with faceIDs produce a single face?
bool isSingleEdgeLoop
(
const bPatch& patch,
const labelList& faceIDs,
const label facei
) const;
//- Select neighbour with highest inbetween edge weight. Either looks
//- at already clustered faces (addToCluster=true) or only
// unclustered
label maxValidNeighbour
(
const bool addToCluster,
const bPatch& patch,
const label facei,
const labelList& coarseCellMap
//const labelListList& coarseToFine
) const;
//- Agglomerate one level //- Agglomerate one level
tmp<labelField> agglomerateOneLevel tmp<labelField> agglomerateOneLevel
( (
...@@ -121,7 +142,8 @@ private: ...@@ -121,7 +142,8 @@ private:
bool continueAgglomerating bool continueAgglomerating
( (
const label nLocal, const label nLocal,
const label nLocalOld const label nLocalOld,
const label nMarkedEdges
); );
//- Set edge weights //- Set edge weights
...@@ -142,6 +164,10 @@ private: ...@@ -142,6 +164,10 @@ private:
public: public:
//- Runtime type information
TypeName("pairPatch");
// Constructors // Constructors
//- Construct given faces, points and control dictionary //- Construct given faces, points and control dictionary
...@@ -166,7 +192,7 @@ public: ...@@ -166,7 +192,7 @@ public:
// Destructor // Destructor
~pairPatchAgglomeration(); virtual ~pairPatchAgglomeration();
// Member Functions // Member Functions
......
...@@ -14,9 +14,26 @@ FoamFile ...@@ -14,9 +14,26 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
writeViewFactorMatrix true;
writePatchViewFactors false; writeViewFactorMatrix true;
// dumpRays true; writePatchViewFactors false;
// Write rays as lines to .obj file
//dumpRays true;
// Switch on debug for faceAgglomerate
//debug 1;
writeFacesAgglomeration true;
patchAgglomeration
{
// Do all of the view-factor patches
viewFactorWall
{
nFacesInCoarsestLevel 10;
featureAngle 45;
}
}
maxDynListLength 200000; maxDynListLength 200000;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment