64 "\n Usage: haloToCell\n\n"
65 " Select halo cells\n\n"
71void Foam::haloToCell::combine(topoSet& set,
const bool add)
const
84 bitSet current(
cells.size());
90 current |= topoBitsPtr->addressing();
94 for (
const label celli : set)
101 bitSet outsideFaces(
mesh_.nFaces());
103 bitSet updates(
cells.size());
105 for (label stepi = 0; stepi < steps_; ++stepi)
112 outsideFaces.reset();
113 for (
const label celli : current)
115 for (
const label facei :
cells[celli])
117 outsideFaces.flip(facei);
128 bitXorEqOp<unsigned int>()
133 for (
const label facei : outsideFaces)
135 updates.set(faceOwn[facei]);
136 if (
mesh_.isInternalFace(facei))
138 updates.set(faceNei[facei]);
150 <<
returnReduce(current.count(), sumOp<label>()) <<
" by "
165 <<
returnReduce(current.count(), sumOp<label>()) <<
" by "
188 const polyMesh&
mesh,
204 steps_(
dict.getOrDefault<label>(
"steps", 1))
244 Info<<
" action=new option is not available for haloToCell" <<
nl
245 <<
" Cannot create new of halo (needs a starting set)"
255 Info<<
" Adding halo cells to the current set, using "
256 << steps_ <<
" step ..." <<
endl;
265 Info<<
" Removing cells on the perimeter of current set, using "
266 << steps_ <<
" step ..." <<
endl;
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A topoSetCellSource to select cells attached to the outside of this cellSet, and add into/remove from...
label steps() const noexcept
The number of steps to grow/shrink.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
haloToCell(const polyMesh &mesh, const label nsteps=1)
Construct from components.
Mesh consisting of general polyhedral cells.
The topoSetCellSource is a intermediate class for handling topoSet sources for selecting cells.
topoSetCellSource(const polyMesh &mesh)
Construct from mesh.
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.
bool verbose_
Output verbosity (default: true).
const polyMesh & mesh() const noexcept
Reference to the mesh.
const polyMesh & mesh_
Reference to the mesh.
General set of labels of mesh quantity (points, cells, faces).
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere).
T returnReduce(const T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void add(DimensionedField< scalar, GeoMesh > &result, const dimensioned< scalar > &dt1, const DimensionedField< scalar, GeoMesh > &f2)
List< cell > cellList
List of cell.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
constexpr char nl
The newline '\n' character (0x0a).
dict add("bounds", meshBb)