Encapsulates queries for volume refinement ('refine all cells within shell'). More...
Public Types | |
enum | refineMode { INSIDE, OUTSIDE, DISTANCE } |
Volume refinement controls. More... | |
Public Member Functions | |
shellSurfaces (const searchableSurfaces &allGeometry, const dictionary &shellsDict) | |
Construct from geometry and dictionary. More... | |
const labelList & | shells () const |
Indices of surfaces that are shells. More... | |
label | maxLevel () const |
Highest shell level. More... | |
labelList | maxGapLevel () const |
Highest shell gap level. More... | |
void | findHigherLevel (const pointField &pt, const labelList &ptLevel, labelList &maxLevel) const |
Find shell level higher than ptLevel. More... | |
void | findHigherGapLevel (const pointField &pt, const labelList &ptLevel, labelList &gapShell, List< FixedList< label, 3 > > &gapInfo, List< volumeType > &gapMode) const |
Find a shell whose minimum gap level is >= ptLevel. More... | |
void | findHigherGapLevel (const pointField &pt, const labelList &ptLevel, List< FixedList< label, 3 > > &gapInfo, List< volumeType > &gapMode) const |
Find a shell whose minimum gap level is >= ptLevel. gapInfo. More... | |
void | findLevel (const pointField &pt, const labelList &ptLevel, labelList &shell) const |
Find first shell (or -1) with level equal or lower than ptLevel. More... | |
Private Member Functions | |
void | setAndCheckLevels (const label shellI, const List< Tuple2< scalar, label > > &) |
Helper function for initialisation of levels. More... | |
void | checkGapLevels (const dictionary &, const label shellI, const List< FixedList< label, 3 > > &levels) |
Helper function for checking of gap information. More... | |
void | orient () |
void | findHigherLevel (const pointField &pt, const label shellI, labelList &maxLevel) const |
Find first shell with a level higher than maxLevel. More... | |
void | findHigherGapLevel (const pointField &pt, const labelList &ptLevel, const label shellI, labelList &gapShell, List< FixedList< label, 3 > > &gapInfo, List< volumeType > &gapMode) const |
Update highest min gap level. More... | |
void | findLevel (const pointField &pt, const label shellI, labelList &minLevel, labelList &shell) const |
Find first shell with a level lower or equal to minLevel. Update. More... | |
Private Attributes | |
const searchableSurfaces & | allGeometry_ |
Reference to all geometry. More... | |
labelList | shells_ |
Indices of surfaces that are shells. More... | |
List< refineMode > | modes_ |
Per shell whether to refine inside or outside. More... | |
List< scalarField > | distances_ |
Per shell the list of ranges. More... | |
labelListList | levels_ |
Per shell per distance the refinement level. More... | |
List< List< FixedList< label, 3 > > > | extendedGapLevel_ |
Per shell, per region the small-gap level specification. More... | |
List< List< volumeType > > | extendedGapMode_ |
Per shell, per region the small-gap level specification. More... | |
Static Private Attributes | |
static const NamedEnum< refineMode, 3 > | refineModeNames_ |
refineMode names More... | |
Encapsulates queries for volume refinement ('refine all cells within shell').
Definition at line 52 of file shellSurfaces.H.
enum refineMode |
Volume refinement controls.
Enumerator | |
---|---|
INSIDE | |
OUTSIDE | |
DISTANCE |
Definition at line 59 of file shellSurfaces.H.
shellSurfaces | ( | const searchableSurfaces & | allGeometry, |
const dictionary & | shellsDict | ||
) |
Construct from geometry and dictionary.
Definition at line 580 of file shellSurfaces.C.
References dict, entry::dict(), Foam::endl(), HashTable< nil, word, string::hash >::erase(), forAll, dictionary::found(), IOWarningInFunction, entry::keyword(), dictionary::lookup(), dictionary::lookupEntryPtr(), dictionary::lookupOrDefault(), volumeType::MIXED, volumeType::names, searchableSurfaces::names(), List::size(), HashTable< nil, word, string::hash >::size(), HashTable< nil, word, string::hash >::sortedToc(), dictionary::subDict(), and dictionary::toc().
|
private |
Helper function for initialisation of levels.
Definition at line 61 of file shellSurfaces.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, searchableSurface::hasVolumeType(), Foam::Info, and IOobject::name().
|
private |
Helper function for checking of gap information.
Definition at line 146 of file shellSurfaces.C.
References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, forAll, Foam::Info, and IOobject::name().
|
private |
Definition at line 185 of file shellSurfaces.C.
References shellSurfaces::allGeometry_, shellSurfaces::DISTANCE, Foam::endl(), forAll, Foam::Info, boundBox::invertedBox, boundBox::max(), Foam::max(), boundBox::min(), Foam::min(), shellSurfaces::modes_, orientedSurface::orient(), points, triSurfaceMesh::points(), s(), shellSurfaces::shells_, and boundBox::span().
|
private |
Find first shell with a level higher than maxLevel.
Definition at line 267 of file shellSurfaces.C.
References Foam::findLower(), forAll, forAllReverse, volumeType::INSIDE, Foam::mag(), volumeType::OUTSIDE, List::setSize(), and Foam::sqr().
Referenced by refinementSurfaces::findHigherLevel(), and refinementSurfaces::setMinLevelFields().
|
private |
Update highest min gap level.
Definition at line 387 of file shellSurfaces.C.
References forAll, volumeType::INSIDE, Foam::mode(), and List::setSize().
|
private |
Find first shell with a level lower or equal to minLevel. Update.
minLevel and shell.
Definition at line 453 of file shellSurfaces.C.
References Foam::findLower(), forAll, forAllReverse, volumeType::INSIDE, Foam::mag(), volumeType::OUTSIDE, List::setSize(), and Foam::sqr().
|
inline |
Indices of surfaces that are shells.
Definition at line 167 of file shellSurfaces.H.
References shellSurfaces::shells_.
Foam::label maxLevel | ( | ) | const |
Highest shell level.
Definition at line 741 of file shellSurfaces.C.
References forAll, and Foam::max().
Foam::labelList maxGapLevel | ( | ) | const |
Highest shell gap level.
Definition at line 752 of file shellSurfaces.C.
References forAll, and Foam::max().
void findHigherLevel | ( | const pointField & | pt, |
const labelList & | ptLevel, | ||
labelList & | maxLevel | ||
) | const |
Find shell level higher than ptLevel.
Definition at line 769 of file shellSurfaces.C.
References forAll.
void findHigherGapLevel | ( | const pointField & | pt, |
const labelList & | ptLevel, | ||
labelList & | gapShell, | ||
List< FixedList< label, 3 > > & | gapInfo, | ||
List< volumeType > & | gapMode | ||
) | const |
Find a shell whose minimum gap level is >= ptLevel.
Definition at line 786 of file shellSurfaces.C.
References forAll, volumeType::MIXED, List::setSize(), and FixedList::setSize().
void findHigherGapLevel | ( | const pointField & | pt, |
const labelList & | ptLevel, | ||
List< FixedList< label, 3 > > & | gapInfo, | ||
List< volumeType > & | gapMode | ||
) | const |
Find a shell whose minimum gap level is >= ptLevel. gapInfo.
is (0 0 0) if no shell found
Definition at line 816 of file shellSurfaces.C.
void findLevel | ( | const pointField & | pt, |
const labelList & | ptLevel, | ||
labelList & | shell | ||
) | const |
Find first shell (or -1) with level equal or lower than ptLevel.
Definition at line 829 of file shellSurfaces.C.
References forAll, and List::setSize().
|
private |
Reference to all geometry.
Definition at line 72 of file shellSurfaces.H.
Referenced by shellSurfaces::orient().
|
private |
Indices of surfaces that are shells.
Definition at line 75 of file shellSurfaces.H.
Referenced by shellSurfaces::orient(), and shellSurfaces::shells().
|
private |
Per shell whether to refine inside or outside.
Definition at line 78 of file shellSurfaces.H.
Referenced by shellSurfaces::orient().
|
private |
Per shell the list of ranges.
Definition at line 81 of file shellSurfaces.H.
|
private |
Per shell per distance the refinement level.
Definition at line 84 of file shellSurfaces.H.
Per shell, per region the small-gap level specification.
Definition at line 90 of file shellSurfaces.H.
|
private |
Per shell, per region the small-gap level specification.
Definition at line 93 of file shellSurfaces.H.
|
staticprivate |
refineMode names
Definition at line 99 of file shellSurfaces.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.