48 rotatedBoxToCell::typeName,
49 "\n Usage: rotatedBoxToCell (originx originy originz)" 50 " (ix iy iz) (jx jy jz) (kx ky kz)\n\n" 51 " Select all cells with cellCentre within parallelopiped\n\n" 57 void Foam::rotatedBoxToCell::combine(topoSet&
set,
const bool add)
const 61 boxPoints[0] = origin_;
62 boxPoints[1] = origin_ + i_;
63 boxPoints[2] = origin_ + i_ + j_;
64 boxPoints[3] = origin_ + j_;
65 boxPoints[4] = origin_ + k_;
66 boxPoints[5] = origin_ + k_ + i_;
67 boxPoints[6] = origin_ + k_ + i_ + j_;
68 boxPoints[7] = origin_ + k_ + j_;
79 faceList boxFaces(cellShape(hex, boxVerts).faces());
85 boxFaceNormals[i] = boxFaces[i].normal(boxPoints);
101 const face& f = boxFaces[i];
103 if (((ctrs[celli] - boxPoints[f[0]]) & boxFaceNormals[i]) > 0)
112 addOrDelete(
set, celli, add);
146 origin_(dict.
lookup(
"origin")),
180 Info<<
" Adding cells with center within rotated box " <<
endl;
186 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.