47 faceZoneToCell::typeName,
48 "\n Usage: faceZoneToCell zone master|slave\n\n"
49 " Select master or slave side of the faceZone."
50 " Note:accepts wildcards for zone.\n\n"
58Foam::faceZoneToCell::faceActionNames_
60 { faceAction::MASTER,
"master" },
61 { faceAction::SLAVE,
"slave" },
83 for (
const label zonei :
zoneIDs)
85 if (zonei < 0 || zonei >=
nZones)
101 Info<<
" Using matching zone " << zone.name()
102 <<
" with " << cellLabels.size() <<
" cells on "
103 << faceActionNames_[option_] <<
" side" <<
endl;
108 for (
const label celli : cellLabels)
122 if (zoneMatcher_.empty())
127 const labelList matched(mesh_.faceZones().indices(zoneMatcher_));
132 <<
"Cannot find any faceZone matching "
134 <<
"Valid names are " <<
flatOutput(mesh_.faceZones().names())
154 zoneMatcher_(zoneSelector),
167 zoneMatcher_(
one{}, zoneName),
180 option_(faceActionNames_.get(
"option",
dict))
186 zoneMatcher_.
first() =
199 zoneMatcher_(
one{},
wordRe(checkIs(is))),
200 option_(faceActionNames_.
read(checkIs(is)))
214 zoneMatcher_ = zonesSelector;
221 zoneMatcher_.first() = zoneName;
233 if (verbose_ && !zoneMatcher_.empty())
235 Info<<
" Adding all " << faceActionNames_[option_]
236 <<
" cells of face zones "
244 if (verbose_ && !zoneMatcher_.empty())
246 Info<<
" Removing all " << faceActionNames_[option_]
247 <<
" cells of face zones "
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void resize(const label len)
Adjust allocated size of list.
T & first()
Return the first element of the list.
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
label size() const noexcept
The number of elements in the list.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T getCompat(const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, enum keyType::option matchOpt=keyType::REGEX) const
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
A topoSetCellSource to select cells based on master or slave side of given faceZone(s).
const wordRes & zones() const noexcept
Return the current zones selector.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
faceAction
Enumeration defining the valid options.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
Mesh consisting of general polyhedral cells.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
label nCells() const noexcept
Number of mesh cells.
The topoSetCellSource is a intermediate class for handling topoSet sources for selecting cells.
Class with constructor to add usage string to table.
Base class of a source for a topoSet.
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
setAction
Enumeration defining various actions.
@ SUBTRACT
Subtract elements from current set.
@ ADD
Add elements to current set.
@ NEW
Create a new set and ADD elements to it.
const polyMesh & mesh_
Reference to the mesh.
General set of labels of mesh quantity (points, cells, faces).
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const labelIOList & zoneIDs
#define WarningInFunction
Report a warning using Foam::Warning.
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
bool read(const char *buf, int32_t &val)
Same as readInt32.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
constexpr char nl
The newline '\n' character (0x0a)
dict add("bounds", meshBb)