43 void Foam::rotatedBoxToCell::combine(topoSet& set,
const bool add)
const
55 origin_ + k_ + i_ + j_,
60 const labelList boxVerts({0, 1, 2, 3, 4, 5, 6, 7});
65 const faceList boxFaces(cellShape(
hex, boxVerts).faces());
71 boxFaceNormals[i] = boxFaces[i].area(boxPoints);
86 ((ctrs[celli] - boxPoints[boxFaces[i][0]]) & boxFaceNormals[i])
134 if (
dict.found(
"box"))
147 origin_ = (
R & (bb.
min() -
c)) +
c;
148 i_ =
R & (bbPoints[1] - bb.
min());
149 j_ =
R & (bbPoints[3] - bb.
min());
150 k_ =
R & (bbPoints[4] - bb.
min());
178 Info<<
" Adding cells with center within rotated box " <<
endl;
184 Info<<
" Removing cells with center within rotated box " <<
endl;
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
A bounding box defined in terms of the points at its extremities.
const point & min() const
Minimum point defining the bounding box.
point midpoint() const
The midpoint of the bounding box.
tmp< pointField > points() const
Return corner points in an order corresponding to a 'hex' cell.
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....
Mesh consisting of general polyhedral cells.
const vectorField & cellCentres() const
A topoSetSource to select cells based on cell centres inside a rotated and/or skewed box.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
rotatedBoxToCell(const polyMesh &mesh, const vector &origin, const vector &i, const vector &j, const vector &k)
Construct from components.
virtual ~rotatedBoxToCell()
Destructor.
Base class of a source for a topoSet.
void addOrDelete(topoSet &set, const label celli, const bool) const
Add (if bool) celli to set or delete celli from set.
setAction
Enumeration defining the valid actions.
General set of labels of mesh quantity (points, cells, faces).
A class for handling words, derived from string.
const dimensionedScalar c
Speed of light in a vacuum.
tensor rotationTensor(const vector &n1, const vector &n2)
Rotational transformation tensor from unit vector n1 to n2.
List< label > labelList
A List of labels.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimless
IOstream & hex(IOstream &io)
const dimensionSet dimLength
vectorField pointField
pointField is a vectorField.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
dimensionSet normalised(const dimensionSet &)
defineTypeNameAndDebug(combustionModel, 0)
Field< vector > vectorField
Specialisation of Field<T> for vector.
static scalar R(const scalar a, const scalar x)
treeBoundBox combine(const treeBoundBox &a, const treeBoundBox &b)