33 template<>
const char* NamedEnum
52 void Foam::polyCellSet::setCells()
56 switch (selectionType_)
69 selectedCells.insert(
celli);
76 <<
"Unable to find owner cell for point " << points_[i]
82 cells_ = selectedCells.toc();
89 <<
"- selecting cells using cellSet " << cellSetName_ <<
endl;
91 cells_ = cellSet(mesh_, cellSetName_).toc();
98 <<
"- selecting cells using cellZone " << cellSetName_ <<
endl;
104 <<
"Cannot find cellZone " << cellSetName_ <<
endl
132 if (len > map.size())
142 return SubList<label>(map, len);
152 cellSetName_(
word::null)
160 cellSetName_(
word::null)
205 selectionType_ = selectionTypeNames.read
216 selectionType_ = selectionTypes::cellSet;
220 selectionType_ = selectionTypes::cellZone;
227 switch (selectionType_)
234 case selectionTypes::cellSet:
239 case selectionTypes::cellZone:
244 case selectionTypes::all:
251 <<
"Unknown selection type "
252 << selectionTypeNames[selectionType_]
253 <<
nl <<
"Valid selection type:"
254 << selectionTypeNames.toc()
#define forAll(list, i)
Loop across all elements in list.
wordList toc() const
Return the table of contents.
void resize(const label)
Alias for setSize(const label)
Initialise the NamedEnum HashTable from the static list of names.
label findIndex(const word &key) const
Return the index of the given the key or -1 if not found.
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
ITstream & lookupBackwardsCompatible(const wordList &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream, trying a list of keywords.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
polyCellSet(const polyMesh &mesh)
Construct from mesh. Will select all.
label celli(const label i) const
Return the cell index corresponding to the cell set index.
~polyCellSet()
Destructor.
void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
void movePoints()
Update for mesh motion.
bool read(const dictionary &dict)
Read coefficients dictionary.
void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
static const NamedEnum< selectionTypes, 4 > selectionTypeNames
Word list of selection type names.
selectionTypes
Enumeration for selection mode types.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Mesh consisting of general polyhedral cells.
const cellZoneList & cellZones() const
Return cell zones.
label findCell(const point &p, const cellDecomposition=CELL_TETS) const
Find cell enclosing this location and return index.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
Ostream & indent(Ostream &os)
Indent stream.