Primitive patch pair agglomerate method. More...
Public Member Functions | |
pairPatchAgglomeration (const polyPatch &patch, const dictionary &controlDict, const bool additionalWeights=false) | |
Construct given mesh and controls. More... | |
~pairPatchAgglomeration () | |
void | agglomerate () |
Agglomerate patch. More... | |
label | size () const |
Return size. More... | |
const labelList & | restrictTopBottomAddressing () const |
Return restriction from top level to bottom level. More... | |
const bPatch & | patchLevel (const label leveli) const |
Return primitivePatch of given level. More... | |
const labelField & | restrictAddressing (const label leveli) const |
Return cell restrict addressing of given level. More... | |
template<class Type > | |
void | restrictField (Field< Type > &cf, const Field< Type > &ff, const label fineLevelIndex) const |
Restrict (integrate by summation) cell field. More... | |
template<class Type > | |
void | prolongField (Field< Type > &ff, const Field< Type > &cf, const label coarseLevelIndex) const |
Prolong (interpolate by injection) cell field. More... | |
Protected Attributes | |
label | mergeLevels_ |
Number of levels to merge, 1 = don't merge, 2 = merge pairs etc. More... | |
label | maxLevels_ |
Max number of levels. More... | |
label | nFacesInCoarsestLevel_ |
Number of faces in coarsest level. More... | |
scalar | featureAngle_ |
Feature angle. More... | |
labelList | nFaces_ |
The number of faces in each level. More... | |
PtrList< labelField > | restrictAddressing_ |
Cell restriction addressing array. More... | |
labelList | restrictTopBottomAddressing_ |
Maps from finest to coarsest. More... | |
PtrList< bPatch > | patchLevels_ |
Hierarchy of patch addressing. More... | |
EdgeMap< scalar > | facePairWeight_ |
Edge weights. More... | |
Private Member Functions | |
bool | agglomeratePatch (const bPatch &patch, const labelList &fineToCoarse, const label fineLevelIndex) |
Assemble coarse patch. More... | |
tmp< labelField > | agglomerateOneLevel (label &nCoarseCells, const bPatch &patchLevel) |
Agglomerate one level. More... | |
void | combineLevels (const label curLevel) |
Combine leves. More... | |
void | compactLevels (const label fineLevelIndex) |
Shrink the number of levels to that specified. More... | |
bool | continueAgglomerating (const label fineLevelIndex) |
Check the need for further agglomeration. More... | |
void | setEdgeWeights (const label indexLevel) |
Set edge weights. More... | |
void | setBasedEdgeWeights () |
Set base patch edge weights. More... | |
void | mapBaseToTopAgglom (const label fineLevelIndex) |
Maps current level with base patch. More... | |
pairPatchAgglomeration (const pairPatchAgglomeration &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const pairPatchAgglomeration &) |
Disallow default bitwise assignment. More... | |
Primitive patch pair agglomerate method.
Definition at line 57 of file pairPatchAgglomeration.H.
|
private |
Disallow default bitwise copy construct.
pairPatchAgglomeration | ( | const polyPatch & | patch, |
const dictionary & | controlDict, | ||
const bool | additionalWeights = false |
||
) |
Construct given mesh and controls.
Definition at line 190 of file pairPatchAgglomeration.C.
References PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), and PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints().
Definition at line 236 of file pairPatchAgglomeration.C.
|
private |
Assemble coarse patch.
Definition at line 266 of file pairPatchAgglomeration.C.
References Foam::abort(), Foam::e, PrimitivePatch< Face, FaceList, PointField, PointType >::edgeLoops(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::invertOneToMany(), Foam::max(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), Foam::min(), patchFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), Foam::renumber(), and List::size().
|
private |
Agglomerate one level.
Definition at line 435 of file pairPatchAgglomeration.C.
References Foam::exit(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceFaces(), Foam::FatalError, FatalErrorInFunction, and forAll.
|
private |
|
private |
Shrink the number of levels to that specified.
Definition at line 32 of file pairPatchAgglomeration.C.
References pairPatchAgglomeration::nFaces_, pairPatchAgglomeration::patchLevels_, pairPatchAgglomeration::restrictAddressing_, and List::setSize().
|
private |
Check the need for further agglomeration.
Definition at line 41 of file pairPatchAgglomeration.C.
|
private |
Set edge weights.
Definition at line 106 of file pairPatchAgglomeration.C.
References Foam::e, PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), forAll, forAllConstIter(), HashTable< nil, word, string::hash >::found(), HashSet< Key, Hash >::insert(), Foam::invertOneToMany(), PrimitivePatch< Face, FaceList, PointField, PointType >::isInternalEdge(), k, PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), Foam::max(), PrimitivePatch< Face, FaceList, PointField, PointType >::nEdges(), and List::size().
|
private |
Set base patch edge weights.
Definition at line 52 of file pairPatchAgglomeration.C.
References Foam::cos(), Foam::degToRad(), PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceNormals(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::isInternalEdge(), k, PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), and List::size().
|
private |
Maps current level with base patch.
Definition at line 252 of file pairPatchAgglomeration.C.
References forAll.
|
private |
Disallow default bitwise assignment.
void agglomerate | ( | ) |
Agglomerate patch.
Definition at line 354 of file pairPatchAgglomeration.C.
References Foam::reduce().
|
inline |
Return size.
Definition at line 162 of file pairPatchAgglomeration.H.
References pairPatchAgglomeration::patchLevels_.
|
inline |
Return restriction from top level to bottom level.
Definition at line 168 of file pairPatchAgglomeration.H.
References pairPatchAgglomeration::restrictTopBottomAddressing_.
const Foam::bPatch & patchLevel | ( | const label | leveli | ) | const |
Return primitivePatch of given level.
Definition at line 243 of file pairPatchAgglomeration.C.
|
inline |
Return cell restrict addressing of given level.
Definition at line 177 of file pairPatchAgglomeration.H.
References pairPatchAgglomeration::restrictAddressing_.
void restrictField | ( | Field< Type > & | cf, |
const Field< Type > & | ff, | ||
const label | fineLevelIndex | ||
) | const |
Restrict (integrate by summation) cell field.
Definition at line 32 of file pairPatchAgglomerationTemplates.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::fv::ff(), forAll, and List::size().
void prolongField | ( | Field< Type > & | ff, |
const Field< Type > & | cf, | ||
const label | coarseLevelIndex | ||
) | const |
Prolong (interpolate by injection) cell field.
Definition at line 60 of file pairPatchAgglomerationTemplates.C.
References Foam::fv::ff(), and forAll.
|
protected |
Number of levels to merge, 1 = don't merge, 2 = merge pairs etc.
Definition at line 64 of file pairPatchAgglomeration.H.
|
protected |
Max number of levels.
Definition at line 67 of file pairPatchAgglomeration.H.
|
protected |
Number of faces in coarsest level.
Definition at line 70 of file pairPatchAgglomeration.H.
|
protected |
Feature angle.
Definition at line 73 of file pairPatchAgglomeration.H.
|
protected |
The number of faces in each level.
Definition at line 76 of file pairPatchAgglomeration.H.
Referenced by pairPatchAgglomeration::compactLevels().
|
protected |
Cell restriction addressing array.
Maps from the finer to coarse level
Definition at line 80 of file pairPatchAgglomeration.H.
Referenced by pairPatchAgglomeration::compactLevels(), and pairPatchAgglomeration::restrictAddressing().
|
protected |
Maps from finest to coarsest.
Definition at line 83 of file pairPatchAgglomeration.H.
Referenced by pairPatchAgglomeration::restrictTopBottomAddressing().
Hierarchy of patch addressing.
Definition at line 86 of file pairPatchAgglomeration.H.
Referenced by pairPatchAgglomeration::compactLevels(), and pairPatchAgglomeration::size().
|
protected |
Edge weights.
Definition at line 89 of file pairPatchAgglomeration.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.