64 "\n Usage: haloToCell\n\n" 65 " Select halo cells\n\n" 71 void Foam::haloToCell::combine(topoSet&
set,
const bool add)
const 84 bitSet current(
cells.size());
86 const auto* topoBitsPtr = isA<topoBitSet>(
set);
90 current |= topoBitsPtr->addressing();
94 for (
const label celli :
set)
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]);
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;
List< cell > cellList
List of cell.
bool verbose_
Output verbosity (default: true)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual const labelList & faceNeighbour() const
Return face neighbour.
Create a new set and ADD elements to it.
Add elements to current set.
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type set(const label i, bool val=true)
A bitSet::set() method for a list of bool.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A topoSetCellSource to select cells attached to the outside of this cellSet, and add into/remove from...
const cellList & cells() const
The topoSetCellSource is a intermediate class for handling topoSet sources for selecting cells...
label nFaces() const noexcept
Number of mesh faces.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
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.
bool isInternalFace(const label faceIndex) const noexcept
Return true if given face label is internal to the mesh.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
setAction
Enumeration defining various actions.
virtual const labelList & faceOwner() const
Return face owner.
const polyMesh & mesh_
Reference to the mesh.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
defineTypeNameAndDebug(combustionModel, 0)
label steps() const noexcept
The number of steps to grow/shrink.
General set of labels of mesh quantity (points, cells, faces).
haloToCell(const polyMesh &mesh, const label nsteps=1)
Construct from components.
Subtract elements from current set.
Class with constructor to add usage string to table.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)