polyCellSet Class Reference

General run-time selected cell set selection class for polyMesh. More...

Inheritance diagram for polyCellSet:
Collaboration diagram for polyCellSet:

Public Types

enum class  selectionTypes { points , cellSet , cellZone , all }
 Enumeration for selection mode types. More...
 

Public Member Functions

 polyCellSet (const polyMesh &mesh)
 Construct from mesh. Will select all. More...
 
 polyCellSet (const polyMesh &mesh, const dictionary &dict)
 Construct from mesh and dictionary. More...
 
 ~polyCellSet ()
 Destructor. More...
 
const selectionTypesselectionType () const
 Return const access to the cell selection type. More...
 
const wordcellSetName () const
 Return const access to the name of cellSet. More...
 
labelUList cells () const
 Return const access to the cell set. More...
 
label nCells () const
 Return the number of cells in the set. More...
 
bool all () const
 Return true if the set comprises all the cells. More...
 
label celli (const label i) const
 Return the cell index corresponding to the cell set index. More...
 
void movePoints ()
 Update for mesh motion. More...
 
void topoChange (const polyTopoChangeMap &)
 Update topology using the given map. More...
 
void mapMesh (const polyMeshMap &)
 Update from another mesh using the given map. More...
 
void distribute (const polyDistributionMap &)
 Redistribute or update using the given distribution map. More...
 
bool read (const dictionary &dict)
 Read coefficients dictionary. More...
 

Static Public Attributes

static const NamedEnum< selectionTypes, 4 > selectionTypeNames
 Word list of selection type names. More...
 

Detailed Description

General run-time selected cell set selection class for polyMesh.

Currently supports cell selection from:

Usage
Examples:
    // Select all cells
    select   all;

    // Select the cells within the given cellSet
    select   cellSet;   // Optional
    cellSet  rotor;

    // Select the cells within the given cellZone
    select   cellZone;  // Optional
    cellZone rotor;

    // Select the cells containing a list of points
    select   points;    // Optional
    points
    (
        (2.25 0.5 0)
        (2.75 0.5 0)
    );
Source files

Definition at line 81 of file polyCellSet.H.

Member Enumeration Documentation

◆ selectionTypes

enum selectionTypes
strong

Enumeration for selection mode types.

Enumerator
points 
cellSet 
cellZone 
all 

Definition at line 88 of file polyCellSet.H.

Constructor & Destructor Documentation

◆ polyCellSet() [1/2]

polyCellSet ( const polyMesh mesh)

Construct from mesh. Will select all.

Definition at line 148 of file polyCellSet.C.

◆ polyCellSet() [2/2]

polyCellSet ( const polyMesh mesh,
const dictionary dict 
)

Construct from mesh and dictionary.

Definition at line 156 of file polyCellSet.C.

References dict, and polyCellSet::read().

Here is the call graph for this function:

◆ ~polyCellSet()

Destructor.

Definition at line 168 of file polyCellSet.C.

Member Function Documentation

◆ selectionType()

const Foam::polyCellSet::selectionTypes & selectionType ( ) const
inline

Return const access to the cell selection type.

Definition at line 31 of file polyCellSetI.H.

◆ cellSetName()

const Foam::word & cellSetName ( ) const
inline

Return const access to the name of cellSet.

Definition at line 37 of file polyCellSetI.H.

◆ cells()

Foam::labelUList cells ( ) const
inline

Return const access to the cell set.

Definition at line 43 of file polyCellSetI.H.

References Foam::identityMap().

Here is the call graph for this function:

◆ nCells()

Foam::label nCells ( ) const
inline

Return the number of cells in the set.

Definition at line 60 of file polyCellSetI.H.

References cells, and List< T >::size().

Here is the call graph for this function:

◆ all()

bool all ( ) const
inline

Return true if the set comprises all the cells.

Definition at line 73 of file polyCellSetI.H.

◆ celli()

Foam::label celli ( const label  i) const
inline

Return the cell index corresponding to the cell set index.

Definition at line 79 of file polyCellSetI.H.

◆ movePoints()

void movePoints ( )

Update for mesh motion.

Definition at line 174 of file polyCellSet.C.

References points.

Referenced by fvCellSet::movePoints().

Here is the caller graph for this function:

◆ topoChange()

void topoChange ( const polyTopoChangeMap )

Update topology using the given map.

Definition at line 183 of file polyCellSet.C.

Referenced by fvCellSet::topoChange().

Here is the caller graph for this function:

◆ mapMesh()

void mapMesh ( const polyMeshMap )

Update from another mesh using the given map.

Definition at line 189 of file polyCellSet.C.

Referenced by fvCellSet::mapMesh().

Here is the caller graph for this function:

◆ distribute()

void distribute ( const polyDistributionMap )

Redistribute or update using the given distribution map.

Definition at line 195 of file polyCellSet.C.

Referenced by fvCellSet::distribute().

Here is the caller graph for this function:

◆ read()

bool read ( const dictionary dict)

Read coefficients dictionary.

Definition at line 201 of file polyCellSet.C.

References dict, Foam::exit(), Foam::FatalError, FatalErrorInFunction, dictionary::found(), dictionary::lookup(), dictionary::lookupBackwardsCompatible(), Foam::nl, and points.

Referenced by polyCellSet::polyCellSet(), and fvCellSet::read().

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

Member Data Documentation

◆ selectionTypeNames

const NamedEnum< polyCellSet::selectionTypes, 4 > selectionTypeNames
static

Word list of selection type names.

Definition at line 97 of file polyCellSet.H.


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