Go to the documentation of this file.
63 "\n Usage: zoneToFace zone\n\n"
64 " Select all faces in the faceZone."
65 " Note:accepts wildcards for zone.\n\n"
71 void Foam::zoneToFace::combine
86 for (
const label zonei :
zoneIDs)
88 if (zonei < 0 || zonei >=
nZones)
97 Info<<
" Using zone " << zone.name()
98 <<
" with " << zone.size() <<
" faces." <<
endl;
101 for (
const label facei : zone)
113 void Foam::zoneToFace::combine(topoSet&
set,
const bool add)
const
115 if (!zoneIDs_.empty())
121 if (zoneMatcher_.empty())
126 const labelList matched(mesh_.faceZones().indices(zoneMatcher_));
131 <<
"Cannot find any faceZone matching "
133 <<
"Valid names are " <<
flatOutput(mesh_.faceZones().names())
152 zoneMatcher_(zoneSelector)
163 zoneMatcher_(
one{}, zoneName)
191 zoneMatcher_.resize(1);
192 zoneMatcher_.first() =
218 zoneMatcher_ = zonesSelector;
226 zoneMatcher_.first() = zoneName;
233 zoneMatcher_.
clear();
240 zoneMatcher_.
clear();
242 zoneIDs_.first() =
zoneID;
254 if (verbose_ && !zoneMatcher_.empty())
256 Info<<
" Adding all faces of face zones "
264 if (verbose_ && !zoneMatcher_.empty())
266 Info<<
" Removing all faces of face zones "
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
List< label > labelList
A List of labels.
Add elements to current set.
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
void resize(const label len)
Adjust allocated size of list.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
const wordRes & zones() const noexcept
Return the current zones selector.
Class with constructor to add usage string to table.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
Ostream & endl(Ostream &os)
Add newline and flush stream.
setAction
Enumeration defining the valid actions.
The topoSetFaceSource is a intermediate class for handling topoSet sources for selecting faces.
T getCompat(const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const
Create a new set and ADD elements to it.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
const labelIOList & zoneIDs
Mesh consisting of general polyhedral cells.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
messageStream Info
Information stream (stdout output on master, null elsewhere)
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
A topoSetFaceSource to convert faceZone(s) to a faceSet.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
General set of labels of mesh quantity (points, cells, faces).
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Macros for easy insertion into run-time selection tables.
Subtract elements from current set.
const labelIOList & zoneID
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
void clear()
Clear string and regular expression.
A List of wordRe with additional matching capabilities.
void clear()
Clear the list, i.e. set size to zero.
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
label nFaces() const noexcept
Number of mesh faces.
zoneToFace(const polyMesh &mesh, const wordRes &zoneSelector)
Construct from mesh and zones selector.
UList< label > labelUList
A UList of labels.
const polyMesh & mesh_
Reference to the mesh.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const