48 cellToPoint::typeName,
49 "\n Usage: cellToPoint <cellSet> all\n\n" 50 " Select all points of cells in the cellSet\n\n" 57 Foam::cellToPoint::cellActionNames_
59 { cellAction::ALL,
"all" },
65 void Foam::cellToPoint::combine
73 cellSet loadedSet(
mesh_, setName);
77 for (
const label celli : cellLabels)
81 for (
const label facei : cFaces)
97 const cellAction option
101 names_(
one{}, setName),
108 const polyMesh&
mesh,
109 const dictionary&
dict 112 topoSetPointSource(
mesh),
114 option_(cellActionNames_.
get(
"option",
dict))
117 if (!
dict.readIfPresent(
"sets", names_))
127 const polyMesh&
mesh,
131 topoSetPointSource(
mesh),
132 names_(one{}, word(checkIs(is))),
133 option_(cellActionNames_.read(checkIs(is)))
149 Info<<
" Adding points in cell sets: " 153 for (
const word& setName : names_)
162 Info<<
" Removing points in cell sets: " 166 for (
const word& setName : names_)
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
The topoSetPointSource is a intermediate class for handling topoSet sources for selecting points...
void resize(const label len)
Adjust allocated size of list.
Create a new set and ADD elements to it.
Add elements to current set.
cellAction
Enumeration defining the valid options.
constexpr char nl
The newline '\n' character (0x0a)
T & front()
Access first element of the list, position [0].
const cellList & cells() const
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.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
setAction
Enumeration defining various actions.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
virtual const faceList & faces() const
Return raw faces.
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)
defineTypeNameAndDebug(combustionModel, 0)
General set of labels of mesh quantity (points, cells, faces).
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Subtract elements from current set.
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.
messageStream Info
Information stream (stdout output on master, null elsewhere)
List< label > labelList
A List of labels.
cellToPoint(const polyMesh &mesh, const word &setName, const cellAction option)
Construct from components.
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.