Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
shellSurfaces Class Reference

Encapsulates queries for volume refinement ('refine all cells within shell'). More...

Collaboration diagram for shellSurfaces:
Collaboration graph
[legend]

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 labelListshells () 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 searchableSurfacesallGeometry_
 Reference to all geometry. More...
 
labelList shells_
 Indices of surfaces that are shells. More...
 
List< refineModemodes_
 Per shell whether to refine inside or outside. More...
 
List< scalarFielddistances_
 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...
 

Detailed Description

Encapsulates queries for volume refinement ('refine all cells within shell').

Source files

Definition at line 52 of file shellSurfaces.H.

Member Enumeration Documentation

◆ refineMode

enum refineMode

Volume refinement controls.

Enumerator
INSIDE 
OUTSIDE 
DISTANCE 

Definition at line 59 of file shellSurfaces.H.

Constructor & Destructor Documentation

◆ shellSurfaces()

shellSurfaces ( const searchableSurfaces allGeometry,
const dictionary shellsDict 
)

Member Function Documentation

◆ setAndCheckLevels()

void setAndCheckLevels ( const label  shellI,
const List< Tuple2< scalar, label > > &  distLevels 
)
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().

Here is the call graph for this function:

◆ checkGapLevels()

void checkGapLevels ( const dictionary shellDict,
const label  shellI,
const List< FixedList< label, 3 > > &  levels 
)
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().

Here is the call graph for this function:

◆ orient()

void orient ( )
private

◆ findHigherLevel() [1/2]

void findHigherLevel ( const pointField pt,
const label  shellI,
labelList maxLevel 
) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findHigherGapLevel() [1/3]

void findHigherGapLevel ( const pointField pt,
const labelList ptLevel,
const label  shellI,
labelList gapShell,
List< FixedList< label, 3 > > &  gapInfo,
List< volumeType > &  gapMode 
) const
private

Update highest min gap level.

Definition at line 387 of file shellSurfaces.C.

References forAll, volumeType::INSIDE, Foam::mode(), and List::setSize().

Here is the call graph for this function:

◆ findLevel() [1/2]

void findLevel ( const pointField pt,
const label  shellI,
labelList minLevel,
labelList shell 
) const
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().

Here is the call graph for this function:

◆ shells()

const labelList& shells ( ) const
inline

Indices of surfaces that are shells.

Definition at line 167 of file shellSurfaces.H.

References shellSurfaces::shells_.

◆ maxLevel()

Foam::label maxLevel ( ) const

Highest shell level.

Definition at line 741 of file shellSurfaces.C.

References forAll, and Foam::max().

Here is the call graph for this function:

◆ maxGapLevel()

Foam::labelList maxGapLevel ( ) const

Highest shell gap level.

Definition at line 752 of file shellSurfaces.C.

References forAll, and Foam::max().

Here is the call graph for this function:

◆ findHigherLevel() [2/2]

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.

◆ findHigherGapLevel() [2/3]

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().

Here is the call graph for this function:

◆ findHigherGapLevel() [3/3]

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.

◆ findLevel() [2/2]

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().

Here is the call graph for this function:

Field Documentation

◆ allGeometry_

const searchableSurfaces& allGeometry_
private

Reference to all geometry.

Definition at line 72 of file shellSurfaces.H.

Referenced by shellSurfaces::orient().

◆ shells_

labelList shells_
private

Indices of surfaces that are shells.

Definition at line 75 of file shellSurfaces.H.

Referenced by shellSurfaces::orient(), and shellSurfaces::shells().

◆ modes_

List<refineMode> modes_
private

Per shell whether to refine inside or outside.

Definition at line 78 of file shellSurfaces.H.

Referenced by shellSurfaces::orient().

◆ distances_

List<scalarField> distances_
private

Per shell the list of ranges.

Definition at line 81 of file shellSurfaces.H.

◆ levels_

labelListList levels_
private

Per shell per distance the refinement level.

Definition at line 84 of file shellSurfaces.H.

◆ extendedGapLevel_

List<List<FixedList<label, 3> > > extendedGapLevel_
private

Per shell, per region the small-gap level specification.

Definition at line 90 of file shellSurfaces.H.

◆ extendedGapMode_

List<List<volumeType> > extendedGapMode_
private

Per shell, per region the small-gap level specification.

Definition at line 93 of file shellSurfaces.H.

◆ refineModeNames_

const NamedEnum< shellSurfaces::refineMode, 3 > refineModeNames_
staticprivate

refineMode names

Definition at line 99 of file shellSurfaces.H.


The documentation for this class was generated from the following files: