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" 58 Foam::faceZoneToCell::faceActionNames_
60 { faceAction::MASTER,
"master" },
61 { faceAction::SLAVE,
"slave" },
68 void Foam::faceZoneToCell::combine
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)
120 void Foam::faceZoneToCell::combine(topoSet&
set,
const bool add)
const 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())
150 const faceAction option
154 zoneMatcher_(zoneSelector),
163 const faceAction option
167 zoneMatcher_(
one{}, zoneName),
174 const polyMesh&
mesh,
175 const dictionary&
dict 178 topoSetCellSource(
mesh),
180 option_(faceActionNames_.
get(
"option",
dict))
183 if (!
dict.readIfPresent(
"zones", zoneMatcher_))
187 dict.getCompat<
wordRe>(
"zone", {{
"name", 1806}});
194 const polyMesh&
mesh,
198 topoSetCellSource(
mesh),
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 " List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
const labelIOList & zoneIDs
void resize(const label len)
Adjust allocated size of list.
Create a new set and ADD elements to it.
Add elements to current set.
const wordRes & zones() const noexcept
Return the current zones selector.
constexpr char nl
The newline '\n' character (0x0a)
faceZoneToCell(const polyMesh &mesh, const wordRes &zoneSelector, const faceAction option)
Construct from mesh, zones selector and selection option.
T & first()
Access first element of the list, position [0].
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
The topoSetCellSource is a intermediate class for handling topoSet sources for selecting cells...
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
Macros for easy insertion into run-time selection tables.
UList< label > labelUList
A UList of labels.
faceAction
Enumeration defining the valid options.
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
label size() const noexcept
The number of elements in the list.
setAction
Enumeration defining various actions.
A List of wordRe with additional matching capabilities.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings...
const polyMesh & mesh_
Reference to the mesh.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
defineTypeNameAndDebug(combustionModel, 0)
General set of labels of mesh quantity (points, cells, faces).
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Subtract elements from current set.
#define WarningInFunction
Report a warning using Foam::Warning.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Class with constructor to add usage string to table.
label nCells() const noexcept
Number of mesh cells.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.