43 rotatedBoxToCell::typeName,
44 "\n Usage: rotatedBoxToCell (originx originy originz)" 45 " (ix iy iz) (jx jy jz) (kx ky kz)\n\n" 46 " Select all cells with cellCentre within parallelepiped\n\n" 52 void Foam::rotatedBoxToCell::combine(topoSet&
set,
const bool add)
const 56 boxPoints[0] = origin_;
57 boxPoints[1] = origin_ + i_;
58 boxPoints[2] = origin_ + i_ + j_;
59 boxPoints[3] = origin_ + j_;
60 boxPoints[4] = origin_ + k_;
61 boxPoints[5] = origin_ + k_ + i_;
62 boxPoints[6] = origin_ + k_ + i_ + j_;
63 boxPoints[7] = origin_ + k_ + j_;
74 faceList boxFaces(cellShape(hex, boxVerts).faces());
80 boxFaceNormals[i] = boxFaces[i].area(boxPoints);
93 const face& f = boxFaces[i];
95 if (((ctrs[celli] - boxPoints[f[0]]) & boxFaceNormals[i]) > 0)
104 addOrDelete(
set, celli, add);
136 origin_(dict.
lookup(
"origin")),
169 Info<<
" Adding cells with center within rotated box " <<
endl;
175 Info<<
" Removing cells with center within rotated box " <<
endl;
#define forAll(list, i)
Loop across all elements in list.
static const cellModel * lookup(const word &)
Look up a model by name and return a pointer to the model or nullptr.
A list of keyword definitions, which are a keyword followed by any number of values (e...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Ostream & endl(Ostream &os)
Add newline and flush stream.
Macros for easy insertion into run-time selection tables.
Base class of a source for a topoSet.
vectorField pointField
pointField is a vectorField.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
setAction
Enumeration defining the valid actions.
List< label > labelList
A List of labels.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
General set of labels of mesh quantity (points, cells, faces).
Class with constructor to add usage string to table.
Field< vector > vectorField
Specialisation of Field<T> for vector.
Mesh consisting of general polyhedral cells.
virtual ~rotatedBoxToCell()
Destructor.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
rotatedBoxToCell(const polyMesh &mesh, const vector &origin, const vector &i, const vector &j, const vector &k)
Construct from components.