53int main(
int argc,
char *argv[])
57 "Create a cellSet for cells with their centres 'inside' the defined"
59 "Surface must be closed and singly connected."
62 argList::addArgument(
"surfaceFile");
63 argList::addArgument(
"cellSet");
73 Info<<
"Reading surface from " << surfName <<
endl;
77 cellSet insideCells(
mesh, setName, IOobject::NO_READ);
83 boolList inside(querySurf.calcInside(
mesh.cellCentres()));
89 insideCells.insert(celli);
95 <<
" of " <<
mesh.globalData().nTotalCells()
96 <<
" cells" <<
nl <<
nl
97 <<
"Writing selected cells to cellSet " << insideCells.name()
99 <<
"Use this cellSet e.g. with subsetMesh : " <<
nl <<
nl
100 <<
" subsetMesh " << insideCells.name()
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
T get(const label index) const
Get a value from the argument at index.
A collection of cell labels.
A class for handling file names.
Helper class to search on triSurface.
Triangulated surface description with patch information.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.